Build production-ready AI agents with Valyu search tools on AWS infrastructure
Enterprise-Ready AI Agents — Combine Valyu’s real-time search capabilities with AWS Bedrock AgentCore for secure, scalable, and auditable AI agent deployments.
Build sophisticated AI agents that can search financial data, academic papers, SEC filings, patents, and more — all with enterprise-grade security, OAuth authentication, and CloudTrail audit logging.
# For local development with Strands Agentspip install "valyu-agentcore[strands]"# For AWS AgentCore Gateway/Runtime deploymentpip install "valyu-agentcore[agentcore]"
Combine multiple search tools for comprehensive research:
Copy
from valyu_agentcore import webSearch, financeSearch, secSearch, paperSearchfrom strands import Agentfrom strands.models import BedrockModel# Financial research agent with multiple data sourcesagent = Agent( model=BedrockModel(model_id="us.anthropic.claude-sonnet-4-20250514-v1:0"), tools=[ webSearch(), # Current news and web content financeSearch(), # Stock prices and financial data secSearch(), # SEC filings and disclosures paperSearch(), # Academic research ],)response = agent("Analyze NVIDIA's competitive position in the AI chip market")print(response)
from valyu_agentcore import financeSearchtool = financeSearch( api_key="val_xxx", # Valyu API key (or use VALYU_API_KEY env var) search_type="all", # "all", "web", "proprietary", or "news" max_num_results=10, # Number of results (default: 5) max_price=0.50, # Max cost per query in CPM relevance_threshold=0.7, # Quality filter (0-1) excluded_sources=["reddit.com"], # Domains to exclude included_sources=["reuters.com"], # Restrict to specific domains category="quarterly earnings", # Natural language search context)
Build an investment research assistant that analyzes companies across multiple data sources:
Copy
from valyu_agentcore import financeSearch, secSearch, webSearchfrom strands import Agentfrom strands.models import BedrockModelFINANCIAL_ANALYST_PROMPT = """You are a senior financial analyst at a top investment firm.When analyzing a company:1. Use financeSearch for stock prices, earnings, and financial metrics2. Use secSearch for 10-K/10-Q filings, risk factors, and disclosures3. Use webSearch for recent news and market sentimentStructure your analysis with:- Executive Summary- Financial Performance- Key Risks- Competitive Position- Investment ThesisBe specific with numbers and cite your sources."""agent = Agent( model=BedrockModel(model_id="us.anthropic.claude-sonnet-4-20250514-v1:0"), system_prompt=FINANCIAL_ANALYST_PROMPT, tools=[financeSearch(), secSearch(), webSearch()],)response = agent("Analyze Apple's most recent quarterly earnings and outlook")
Literature review and academic research across multiple databases:
Copy
from valyu_agentcore import paperSearch, patentSearch, webSearchfrom strands import Agentfrom strands.models import BedrockModelRESEARCH_ASSISTANT_PROMPT = """You are a research assistant specializing in technical literature review.When researching a topic:1. Use paperSearch for peer-reviewed academic papers (arXiv, PubMed)2. Use patentSearch for prior art and IP landscape3. Use webSearch for recent developments and newsOrganize findings by:- Key Papers (with citations)- State of the Art- Patent Landscape- Recent DevelopmentsAlways cite sources with URLs."""agent = Agent( model=BedrockModel(model_id="us.anthropic.claude-sonnet-4-20250514-v1:0"), system_prompt=RESEARCH_ASSISTANT_PROMPT, tools=[paperSearch(), patentSearch(), webSearch()],)response = agent("Survey recent advances in transformer architecture efficiency")
M&A and investment due diligence across financial, legal, and market data:
Copy
from valyu_agentcore import secSearch, financeSearch, webSearch, patentSearchfrom strands import Agentfrom strands.models import BedrockModelDUE_DILIGENCE_PROMPT = """You are conducting due diligence for a potential investment or acquisition.Generate a comprehensive report covering:1. Company Overview - Use webSearch for background2. Financial Analysis - Use financeSearch for metrics3. Regulatory Filings - Use secSearch for SEC documents4. IP Portfolio - Use patentSearch for patents5. Market Position - Use webSearch for competitive analysis6. Risk Factors - Synthesize from all sourcesBe thorough and flag any red flags or concerns."""agent = Agent( model=BedrockModel(model_id="us.anthropic.claude-sonnet-4-20250514-v1:0"), system_prompt=DUE_DILIGENCE_PROMPT, tools=[secSearch(), financeSearch(), webSearch(), patentSearch()],)response = agent("Conduct due diligence on Anthropic for a potential investment")
Gateway targets take ~2 minutes to sync. The add_valyu_target() function waits automatically. If it times out, check the Gateway status in the AWS console.
OAuth token errors
Ensure your Cognito client has the correct scope (gateway-name/invoke) and the client_credentials grant type is enabled.
Bedrock model access
Ensure you have access to the Bedrock model in your AWS account. Request access in the AWS Bedrock console if needed.