Prerequisites
The following example requires thewikipedia library.
Example
The following agent will run seach wikipedia for “ai” and print the response.cookbook/tools/wikipedia_tools.py
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
You are viewing v1 docs. For the latest documentation, visit docs.agno.com
wikipedia library.
pip install -U wikipedia
from agno.agent import Agent
from agno.tools.wikipedia import WikipediaTools
agent = Agent(tools=[WikipediaTools()], show_tool_calls=True)
agent.print_response("Search wikipedia for 'ai'")
| Name | Type | Default | Description |
|---|---|---|---|
knowledge_base | WikipediaKnowledgeBase | - | The knowledge base associated with Wikipedia, containing various data and resources linked to Wikipedia’s content. |
| Function Name | Description |
|---|---|
search_wikipedia_and_update_knowledge_base | This function searches wikipedia for a topic, adds the results to the knowledge base and returns them. |
search_wikipedia | Searches Wikipedia for a query. |
Was this page helpful?