> ## Documentation Index
> Fetch the complete documentation index at: https://phidatainc-studio-tools-doc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Valyu

> Use Valyu with Agno agents.

Enables Agno agents to get specialized access to academic, institutional, and high-fidelity web content for technical and scientific research.

## Prerequisites:

* Install Valyu: `uv pip install valyu`
* Get API key: [https://platform.valyu.network](https://platform.valyu.network)
* Set environment variable: export VALYU\_API\_KEY with your api key or pass the api key while initializing the toolkit

```python theme={null}

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,
    )
```

## Run the Example

```bash theme={null}
# Clone and setup repo
git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/91_tools

# Create and activate virtual environment
./scripts/demo_setup.sh
source .venvs/demo/bin/activate

python valyu_tools.py
```

For details, see [Valyu tool cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/91_tools/valyu_tools.py).
