A command-line research assistant that combines local LLM conversation with a small multi-agent research pipeline. The app chats normally, and when the user asks to research a topic it searches the web, summarizes findings, checks the summary, and formats citations into a report.
- Conversational CLI interface
- Local LLM calls through Ollama
- Research trigger routing via
ConversationManager - DuckDuckGo web search helper
- Summarization, fact-checking, and citation agents
- Formatted research report output
.
├── main.py # CLI entry point
├── conversation_manager.py # Chat loop, tool-call parsing, research routing
├── orchestrator.py # Coordinates the research pipeline
├── Agents/
│ ├── base_agent.py # Shared Ollama chat helper and tool-call parsing
│ ├── search_agent.py # Builds/searches research queries
│ ├── summariser_agent.py # Produces concise summaries
│ ├── fact_checker_agent.py # Reviews summaries for unsupported claims
│ └── citation_agent.py # Formats source citations
└── Tools/
├── web_search.py # DuckDuckGo search helper
├── summariser.py # Lightweight extractive summarizer
└── citation.py # Basic APA-style citation formatter
- Python 3.10+
- Ollama installed and running locally
- The
llama3model pulled in Ollama - Python package:
requests
Install Python dependencies:
pip install requestsStart Ollama:
ollama servePull the default model if needed:
ollama pull llama3The model name is configured in conversation_manager.py and Agents/base_agent.py:
MODEL = 'llama3'Change that value if you want to use a smaller or different local model.
Run the assistant:
python main.pyYou can chat normally:
You: hello
To trigger the research pipeline, ask for research explicitly:
You: research renewable energy storage trends
Exit with:
quit
main.pystarts a terminal chat loop.ConversationManagersends user input to the local Ollama model.- If the model returns a
run_researchtool call, the manager passes the topic toResearchOrchestrator. ResearchOrchestratorruns:SearchAgentSummariserAgentFactCheckerAgentCitationAgent
- The compiled report is sent back through the conversation manager for a final assistant response.
- Some agent methods currently treat
_chat()as if it returns a full Ollama response object, butBaseAgent._chat()returns only the message content string. Those methods may need to parse the returned string directly. - Package directories are named
AgentsandTools, while imports use lowercaseagentsandtools. This may work on case-insensitive filesystems like Windows, but can fail on case-sensitive systems. Agents/_init_.pyandTools/_init_.pyare named with one underscore on each side. Python package initializers are normally named__init__.py.
This is a local-first prototype. It depends on Ollama for LLM responses and DuckDuckGo's public instant-answer endpoint for search results, so research quality and coverage can vary by topic.