ArxivTools enable an Assistant to search for papers on Arxiv.

Example

The following assistant will run seach arXiv for “language models” and print the response.

cookbook/tools/arxiv_tools.py
from phi.assistant import Assistant
from phi.tools.arxiv_toolkit import ArxivToolkit

assistant = Assistant(tools=[ArxivToolkit()], show_tool_calls=True)
assistant.print_response("Search arxiv for 'language models'", markdown=True)

Toolkit Params

search_arxiv
bool
default: "True"

Enables the functionality to search the arXiv database.

read_arxiv_papers
bool
default: "True"

Allows reading of arXiv papers directly.

download_dir
Path

Specifies the directory path where downloaded files will be saved.

Toolkit Functions

search_arxiv_and_update_knowledge_base

This function searches arXiv for a topic, adds the results to the knowledge base and returns them.

search_arxiv
Searches arXiv for a query.