Features
- Async tool for Wikipedia API calls
- Multi-step research workflow
- Streaming output for real-time feedback
Complete Code
How It Works
- User asks a question - “Tell me about the history of Python”
-
AI searches Wikipedia - Calls
search_wikipedia("Python programming language") -
AI reads articles - Calls
get_article("Python (programming language)") - AI summarizes - Generates a comprehensive response based on the article content
Sample Output
Customization Ideas
Add more research tools
Add more research tools
Add tools for other APIs like news search, academic papers, or documentation.
Save research results
Save research results
Add a tool to save summaries to files or a database.
Interactive mode
Interactive mode
Wrap in a loop to allow follow-up questions about the research.