Multi-agent long-chain reasoning system that turns any research question into a fully-cited PDF report.
Powered by Xiaomi MiMo · Built with Hermes Agent patterns
🌐 Live demo: teguh407.github.io/deepresearch-agent
Doing real research is painful. You search, lose tabs, copy quotes, forget sources, and end up with a hallucinated mess.
DeepResearch Agent solves this with a 5-agent pipeline that mimics how a human research team actually works:
Plan → Search → Verify → Synthesize → Write
Drop in a question. Get back a structured PDF with inline citations, source list, and a claim-by-claim confidence map. No hallucinated URLs. No forgotten sources.
- 🧩 5 specialized agents — each with one job, coordinated by an orchestrator
- 🔗 Long-chain reasoning — multi-step decomposition, not one giant prompt
- 🔍 Real sources — arXiv + DuckDuckGo, scraped & quoted, never invented
- ✅ Fact-checker layer — every claim re-verified against source text before it lands in the report
- 📄 PDF output — clean typography, numbered citations, references page
- 🔌 MiMo-native — uses Xiaomi MiMo as the reasoning engine (drop-in OpenAI-compatible)
- 💾 Inspectable runs — every agent's input/output saved as JSON for audit
┌─────────────────────┐
│ USER QUESTION │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ 🗺️ PlannerAgent │ decomposes question
│ (MiMo reasoning) │ into sub-questions
└──────────┬──────────┘
│
┌─────────────────┼─────────────────┐
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ 🔎 Searcher │ │ 🔎 Searcher │ │ 🔎 Searcher │
│ (web) │ │ (arXiv) │ │ (web) │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
└─────────────────┼─────────────────┘
▼
┌─────────────────────┐
│ ✅ FactCheckerAgent │ drops unsupported
│ (MiMo verify) │ claims
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ 🧬 SynthesizerAgent │ cross-refs sources,
│ (MiMo reasoning) │ resolves conflicts
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ ✍️ WriterAgent │ formats final
│ (MiMo + ReportLab)│ PDF + citations
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ 📄 report.pdf │
└─────────────────────┘
Each agent is a thin wrapper around an LLM call + a tool. They communicate through structured Pydantic messages and never share state directly.
git clone https://github.com/teguh407/deepresearch-agent.git
cd deepresearch-agent
python3.11 -m venv venv
source venv/bin/activate
pip install -r requirements.txtSign up at platform.xiaomimimo.com and grab your API key.
cp .env.example .env
# Edit .env and paste your key:
# MIMO_API_KEY=sk-...python -m src.main "What are the latest breakthroughs in retrieval-augmented generation in 2025?"Output:
🧠 DeepResearch Agent v0.1.0
[1/5] 🗺️ Planning sub-questions ............ ✓ 6 sub-questions
[2/5] 🔎 Searching sources .................. ✓ 23 sources
[3/5] ✅ Fact-checking claims ............... ✓ 18/23 verified
[4/5] 🧬 Synthesizing findings .............. ✓
[5/5] ✍️ Writing report .................... ✓
📄 Report saved → out/report-20260518-1432.pdf
📊 Run trace → out/trace-20260518-1432.json
deepresearch-agent/
├── src/
│ ├── main.py # CLI entrypoint
│ ├── orchestrator.py # multi-agent coordinator
│ ├── config.py # settings + MiMo client
│ ├── agents/
│ │ ├── base.py # BaseAgent (LLM call + retries)
│ │ ├── planner.py # decomposes question
│ │ ├── searcher.py # web + arXiv search
│ │ ├── fact_checker.py # verifies claims
│ │ ├── synthesizer.py # cross-references sources
│ │ └── writer.py # builds PDF
│ └── tools/
│ ├── web_search.py # DuckDuckGo HTML scrape
│ ├── arxiv_search.py # arXiv API
│ └── pdf_export.py # ReportLab PDF builder
├── examples/
│ └── demo_run.py # end-to-end example
├── tests/
│ └── test_agents.py
├── requirements.txt
├── .env.example
└── README.md
python -m src.main "How does Mixture-of-Experts compare to dense models for inference cost?"Generates a 4-page PDF like:
1. Introduction Mixture-of-Experts (MoE) architectures activate a subset of parameters per token, theoretically reducing compute [1]. Recent work shows...
2. Findings 2.1 MoE inference cost is bounded by routing overhead [2]...
References [1] Fedus et al. Switch Transformers. arXiv:2101.03961 [2] DeepSeek-AI. DeepSeek-V3 Technical Report. 2024 ...
Every citation links back to a real source the agent actually read.
All knobs live in .env:
MIMO_API_KEY=sk-...
MIMO_MODEL=mimo-pro # or mimo-reasoner-v2 for harder questions
MIMO_BASE_URL=https://platform.xiaomimimo.com/v1
MAX_SUB_QUESTIONS=6 # planner output cap
MAX_SOURCES_PER_QUERY=5 # searcher cap
ENABLE_ARXIV=true
ENABLE_WEB=true
OUTPUT_DIR=./outThe system was built and tuned against Xiaomi MiMo V2.5:
- mimo-pro for planning, synthesis, and writing — strong long-context reasoning at low cost
- mimo-reasoner-v2 as an optional upgrade for fact-checking when claims need deep verification
Drop-in OpenAI-compatible endpoint means you can also run with Claude / GPT for benchmarking, but the default mimo-pro config is the recommended path.
- 5-agent pipeline
- arXiv + web search
- PDF export with citations
- Run-trace JSON for audit
- Streaming progress over WebSocket
- Web UI (Next.js)
- Vector store for cross-report knowledge retention
- Multi-language reports (CN / ID)
- Telegram bot delivery
PRs welcome. Run pytest before opening one. Style: ruff format.
MIT — see LICENSE.
- Xiaomi MiMo — the reasoning engine powering every agent
- Hermes Agent — multi-agent patterns and skill system
- arXiv — the open scientific record that makes this possible