
Available search tools
Quick start
Installation
Environment Setup
Your First Agent
Create an AI agent with web search capability in just a few lines:Multi-Tool Agent
Combine multiple search tools for comprehensive research:Tool groups
TheValyuTools wrapper provides ready-made groupings - tools.all(), tools.financial_tools() (finance, SEC, economics), and tools.research_tools() (paper, bio, patent):
Deployment options
Gateway setup
Gateway setup
add_valyu_target(gateway_id="...", region="us-east-1").Runtime deployment
Runtime deployment
CloudFormation
CloudFormation
Deploy the full stack (IAM role, Cognito OAuth pool, Secrets Manager secret, CloudWatch logs) in one command:
Tool configuration
Example: financial analyst agent
Use a system prompt to route requests between tools. This example demonstrates retrieval and synthesis; evaluate outputs and configure operational controls before using it in a production workflow:Security best practices
Security best practices
- Keep API keys in
VALYU_API_KEYor AWS Secrets Manager - never hardcode. - Configure CloudTrail for supported AWS events and application logs for tool activity.
- Use AgentCore Gateway with Cognito OAuth in production.
- Apply least-privilege IAM (invoke-only for applications).
- Rotate Valyu API keys and Cognito client secrets regularly.
Troubleshooting
Troubleshooting
No module named 'strands'- install withpip install "valyu-agentcore[strands]".- Gateway sync slow - targets take ~2 minutes;
add_valyu_target()waits automatically. - OAuth token errors - check the Cognito client scope (
gateway-name/invoke) and thatclient_credentialsis enabled. - Bedrock model access - request model access in the AWS Bedrock console.
API reference
API reference
Tools:
webSearch, financeSearch, paperSearch, bioSearch, patentSearch, secSearch, economicsSearch.ValyuTools: .all(), .financial_tools() (finance, SEC, economics), .research_tools() (paper, bio, patent).Gateway: setup_valyu_gateway(), add_valyu_target(), cleanup_valyu_gateway(), GatewayAgent.from_config().Additional resources
GitHub Repository
Source code, examples, and CloudFormation templates
AWS Bedrock AgentCore
Official AWS Bedrock AgentCore documentation
Strands Agents
Learn more about the Strands Agents framework
Get API Key
Sign up for $10 free credits ($20 with a company email) - no credit card required
Pricing
Valyu charges per query based on the data sources accessed. With AWS AgentCore, you pay:- Valyu API costs - Per-query pricing based on data sources (see Pricing)
- AWS costs - AgentCore Gateway, Cognito, CloudWatch (standard AWS rates)