Valyu
Search academic papers, arXiv, and high-fidelity web sources with ValyuTools.
Enables Agno agents to get specialized access to academic, institutional, and high-fidelity web content for technical and scientific research.
Prerequisites:
- Install dependencies:
uv pip install -U agno openai valyu. - Get API key: https://platform.valyu.network
- Set the required environment variables:
export VALYU_API_KEY=your_api_keyandexport OPENAI_API_KEY=your_openai_key.
from agno.agent import Agent
from agno.tools.valyu import ValyuTools
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
agent = Agent(
tools=[ValyuTools()],
markdown=True,
)
# Example 1: Basic Academic Paper Search
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
agent.print_response(
"What are the latest safety mechanisms and mitigation strategies for CRISPR off-target effects?",
markdown=True,
)
# Example 2: Focused ArXiv Search with Date Filtering
agent.print_response(
"Search for transformer architecture papers published between June 2023 and January 2024, focusing on attention mechanisms",
markdown=True,
)
# Example 3: Search Within Specific Paper
agent.print_response(
"Search within the paper https://arxiv.org/abs/1706.03762 for details about the multi-head attention mechanism architecture",
markdown=True,
)
# Example 4: Search Web
agent.print_response(
"What are the main developments in large language model reasoning capabilities published in 2024?",
markdown=True,
)Each result’s content is truncated to 1,000 characters by default. The date-filtered request can pass start_date and end_date to the search tools. search_within_paper sends the paper URL as a provider source filter; it does not download or parse the full paper locally. Academic search selects its own configured dataset list. See Valyu toolkit parameters before customizing sources or limits.
Run the Example
# Clone and setup repo
git clone https://github.com/agno-agi/agno.git
cd agno
git checkout d703c34f3abf3c41275d3fb2da6e0518a8881f24
# Create and activate virtual environment
./scripts/demo_setup.sh
source .venvs/demo/bin/activate
uv pip install -U agno openai valyu
python cookbook/91_tools/valyu_tools.pyFor details, see Valyu tool cookbook.