Skip to main content

Overview

Best for: building Valyu into your product / agents. Add Valyu tools to an Agno agent for web and specialised data.
Valyu integrates with Agno as a toolkit, providing your AI agents with access to web search and specialised data sources including life sciences, finance, SEC filings, patents, economics, and academic papers.
Also see the Agno documentation for Valyu for additional examples and usage patterns.

Paste into your AI assistant to wire Valyu tools into an Agno agent.

Open in Cursor
The integration provides 8 specialised search tools:
  • search - General search across all Valyu sources
  • web_search - Search the web for current information and news
  • life_sciences_search - Search biomedical data (PubMed, clinical trials, FDA, ChEMBL, PubChem, Open Targets)
  • sec_search - Search SEC filings (10-K, 10-Q, 8-K) and insider transactions (Form 4)
  • patent_search - Search patent databases for inventions and IP
  • finance_search - Search financial data (stocks, earnings, balance sheets, crypto, forex)
  • economics_search - Search economic data (BLS, FRED, World Bank)
  • paper_search - Search academic papers (arXiv, PubMed, bioRxiv, medRxiv)

Installation

Install the Valyu library:
pip install valyu
Configure your API key:
export VALYU_API_KEY="your-api-key-here"

Free Credits

Get your API key with $10 free credits ($20 with a work email) from the Valyu Platform.

Quick Start

Add Valyu tools to your Agno agent:
from agno.agent import Agent
from agno.tools.valyu import ValyuTools

agent = Agent(
    tools=[ValyuTools()],
    markdown=True,
)

# General search across all sources
agent.print_response("What are the latest developments in AI safety research?")

Multi-tool research

The agent picks the right tool per query. Combine domains in one request:
from agno.agent import Agent
from agno.tools.valyu import ValyuTools

agent = Agent(
    tools=[ValyuTools()],
    markdown=True,
    instructions="""You are a research assistant with specialised search tools.
    Route each query to the most specific tool (life_sciences_search, finance_search,
    sec_search, patent_search, economics_search, paper_search, web_search).
    Always cite sources with URLs.""",
)

agent.print_response(
    "Research the commercialisation of CRISPR technology - "
    "find recent clinical trials, patent filings, and company financials"
)
ValyuTools(
    api_key="your-api-key",    # defaults to VALYU_API_KEY
    max_results=10,            # results per search
    relevance_threshold=0.5,   # 0.0-1.0
    max_price=30.0,            # max cost per query
    text_length=1000,          # chars of content per result
    search_type="all",         # "web", "proprietary", or "all"
)
Lower max_price/max_results and raise relevance_threshold to cut cost and keep only high-quality results.

Toolkit Functions Reference

FunctionDescription
searchGeneral search across all Valyu sources. Supports included_sources and excluded_sources filters.
web_searchSearch the web for current information, news, and articles. Supports domain filtering.
life_sciences_searchSearch biomedical data: PubMed, clinical trials, FDA drug labels, ChEMBL, PubChem, Open Targets.
sec_searchSearch SEC filings (10-K, 10-Q, 8-K) and insider transactions (Form 4).
patent_searchSearch patent databases for inventions and intellectual property.
finance_searchSearch financial data: stocks, earnings, balance sheets, dividends, crypto, forex.
economics_searchSearch economic data from BLS, FRED, and World Bank.
paper_searchSearch academic papers from arXiv, PubMed, bioRxiv, and medRxiv.

Additional Resources

Agno Documentation

Official Agno Valyu toolkit documentation

API Reference

Complete Valyu API documentation

Agno GitHub

Agno framework source code

Get API Key

Sign up for $10 free credits ($20 with a work email)