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

# Arxiv

> Search arXiv and read papers with ArxivTools using search_arxiv_and_return_articles and read_arxiv_papers.

**ArxivTools** enable an Agent to search for publications on Arxiv.

## Prerequisites

The following example requires the `arxiv`, `pypdf`, and `openai` libraries.

```shell theme={null}
uv pip install -U arxiv pypdf openai
export OPENAI_API_KEY="your_openai_api_key_here"
```

## Example

The following agent will search arXiv for "language models" and print the response.

```python cookbook/91_tools/arxiv_tools.py theme={null}
from agno.agent import Agent
from agno.tools.arxiv import ArxivTools

agent = Agent(tools=[ArxivTools()])
agent.print_response("Search arxiv for 'language models'", markdown=True)
```

## Toolkit Params

| Parameter | Type | Default | Description |
| - | - | - | - |
| `enable_search_arxiv` | `bool` | `True` | Enables the functionality to search the arXiv database. |
| `enable_read_arxiv_papers` | `bool` | `True` | Allows reading of arXiv papers directly. |
| `all` | `bool` | `False` | Enable all functionality. |
| `download_dir` | `Path` | - | Specifies the directory path where downloaded files will be saved. |

## Toolkit Functions

| Function | Description |
| - | - |
| `search_arxiv_and_return_articles` | Searches arXiv for a query and returns the top articles with title, authors, PDF URL and summary. |
| `read_arxiv_papers` | Downloads papers by arXiv ID and returns their content, optionally limited to a number of pages. |

## Developer Resources

* [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/arxiv.py)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.