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

# Valyu

> ValyuTools provides academic and web search capabilities with advanced filtering and relevance scoring.

## Example

The following agent can perform academic and web searches:

```python theme={null}
from agno.agent import Agent
from agno.tools.valyu import ValyuTools

agent = Agent(
    instructions=[
        "You are a research assistant that helps find academic papers and web content",
        "Use Valyu to search for high-quality, relevant information",
        "Provide detailed analysis of search results with relevance scores",
        "Focus on credible sources and academic publications",
    ],
    tools=[ValyuTools()],
)

agent.print_response("Find recent research papers about machine learning in healthcare", stream=True)
```

## Toolkit Params

| Parameter                | Type                  | Default | Description                                     |
| ------------------------ | --------------------- | ------- | ----------------------------------------------- |
| `api_key`                | `Optional[str]`       | `None`  | Valyu API key. Uses VALYU\_API\_KEY if not set. |
| `enable_academic_search` | `bool`                | `True`  | Enable academic sources search functionality.   |
| `enable_web_search`      | `bool`                | `True`  | Enable web search functionality.                |
| `enable_paper_search`    | `bool`                | `True`  | Enable search within paper functionality.       |
| `text_length`            | `int`                 | `1000`  | Maximum length of text content per result.      |
| `max_results`            | `int`                 | `10`    | Maximum number of results to return.            |
| `relevance_threshold`    | `float`               | `0.5`   | Minimum relevance score for results.            |
| `content_category`       | `Optional[str]`       | `None`  | Content category for filtering.                 |
| `search_start_date`      | `Optional[str]`       | `None`  | Start date for search filtering (YYYY-MM-DD).   |
| `search_end_date`        | `Optional[str]`       | `None`  | End date for search filtering (YYYY-MM-DD).     |
| `search_domains`         | `Optional[List[str]]` | `None`  | List of domains to search within.               |
| `sources`                | `Optional[List[str]]` | `None`  | List of specific sources to search.             |
| `max_price`              | `float`               | `30.0`  | Maximum price for API calls.                    |

## Toolkit Functions

| Function          | Description                                                   |
| ----------------- | ------------------------------------------------------------- |
| `academic_search` | Search academic sources for research papers and publications. |
| `web_search`      | Search web sources for general information and content.       |
| `paper_search`    | Search within specific papers for detailed information.       |

## Developer Resources

* View [Tools Source](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/valyu.py)
* [Valyu API Documentation](https://valyu.ai/docs)
* [Academic Search Best Practices](https://valyu.ai/academic-search)
