Overview
The Wikipedia Search tool is a tool that allows you to search and retrieve information from Wikipedia.How It Works
Getting Started
1
Simple Usage
- Install dependencies (see Overview above)
- Set required API keys in your environment
- Run the agent example in Overview
2
With Configuration
Use the same tool with an agent — see the Overview example, or pass env vars from the sections above.
Best Practices
No provider key needed
No provider key needed
Wikipedia search is free — only
OPENAI_API_KEY for the agent’s LLM is required. WikipediaAPIWrapper needs no API key.Limit returned characters
Limit returned characters
WikipediaAPIWrapper accepts doc_content_chars_max. Cap it so long articles do not overflow the agent’s context window.Disambiguate queries
Disambiguate queries
Ambiguous terms return the wrong page. Feed the agent specific titles (e.g. “Lionel Messi”) so results match intent.
Related Tools
Wikipedia
Wikipedia tool
Tavily
AI-powered search
ArXiv
Academic papers

