JinaReaderTools enable an Agent to perform web search tasks using Jina.

Prerequisites

The following example requires the jina library.
pip install -U jina

Example

The following agent will use Jina API to summarize the content of https://github.com/AgnoAgi
cookbook/tools/jinareader.py
from agno.agent import Agent
from agno.tools.jina import JinaReaderTools

agent = Agent(tools=[JinaReaderTools()])
agent.print_response("Summarize: https://github.com/AgnoAgi")

Toolkit Params

ParameterTypeDefaultDescription
api_keyOptional[str]NoneThe API key for authentication purposes. If not provided, uses JINA_API_KEY environment variable.
base_urlstr"https://r.jina.ai/"The base URL of the API.
search_urlstr"https://s.jina.ai/"The URL used for search queries.
max_content_lengthint10000The maximum length of content allowed.
timeoutOptional[int]NoneTimeout in seconds for API requests.
search_query_contentboolTrueInclude content in search query results.
enable_read_urlboolTrueEnable the read_url functionality.
enable_search_queryboolFalseEnable the search_query functionality.
allboolFalseEnable all functionality.

Toolkit Functions

FunctionDescription
read_urlReads the content of a specified URL using Jina Reader API. Parameters include url for the URL to read. Returns the truncated content or an error message if the request fails.
search_queryPerforms a web search using Jina Reader API based on a specified query. Parameters include query for the search term. Returns the truncated search results or an error message if the request fails.

Developer Resources