A production-grade multi-agent research system powered by LangGraph. Searches the web, reads documents, synthesizes findings, and iteratively refines results—all autonomous, all automated.
- Multi-Agent Orchestration — Web search, document parsing, summarization, and critique agents work together
- Reflection Loop — Automatically refines low-quality summaries (max 3 iterations)
- Citation Tracking — Every claim is traceable back to source URLs
- Fast LLM — Powered by Groq's 70B model (inference in <2s)
- Interactive CLI — Persistent chat for multi-turn research
- Quality Evaluation — Built-in golden set testing framework
graph TD
A["Research Question"] --> B["Web Search Agent\n(Perplexity API)"]
B --> C["Document Reader Agent\n(BeautifulSoup)"]
C --> D["Summarizer Agent\n(Groq LLM)"]
D --> E["Critic Agent\n(Groq LLM)"]
E --> F{Score < 7?}
F -->|YES\nMax 3x| B
F -->|NO| G["Finalize Report\n(with Citations)"]
style A fill:#3498db,stroke:#2c3e50,color:#fff
style B fill:#2ecc71,stroke:#2c3e50,color:#fff
style C fill:#9b59b6,stroke:#2c3e50,color:#fff
style D fill:#e74c3c,stroke:#2c3e50,color:#fff
style E fill:#f39c12,stroke:#2c3e50,color:#fff
style F fill:#34495e,stroke:#2c3e50,color:#fff
style G fill:#1abc9c,stroke:#2c3e50,color:#fff
- LangGraph — Agent orchestration and routing
- Perplexity API — Real-time web search with citations
- Groq API — Fast LLM for synthesis (llama-3.3-70b)
- BeautifulSoup + Requests — Document parsing
- Python 3.11+
git clone <repo>
cd research-assistant
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtAll free/generous tiers:
- Perplexity: https://www.perplexity.ai/settings/api → Copy key to
.envasPERPLEXITY_API_KEY - Groq: https://console.groq.com/keys → Copy key to
.envasGROQ_API_KEY - LangSmith (optional): https://smith.langchain.com → Copy key to
.envasLANGSMITH_API_KEY
cp .env.example .env
# Edit .env with your API keyspython main.pyReal example output from Perplexity + Groq
ResearchFlow
Type your research question and press Enter. Type 'exit' to quit.
> What are the latest breakthroughs in quantum computing?
Researching...
Final Report:
# Research Report
## Question
What are the latest breakthroughs in quantum computing?
## Summary
The landscape of quantum computing has witnessed significant breakthroughs as of
early 2026, with advancements in areas such as Majorana qubit readout, scalable
ion-trap systems, error correction in superconducting qubits, and the development
of molecular qubits for quantum networks [1][2][3][5]. One of the key milestones
was the experimental readout of a Majorana qubit using quantum capacitance, which
enables millisecond coherence times and reduces error rates [1]. Furthermore,
Quantinuum's Helios system, launched in November 2025, is claimed to be the most
accurate quantum computer yet, capable of performing quantum AI tasks that would
require immense classical computational power [2]. Google's Quantum Echoes
algorithm, announced in October 2025, demonstrates verifiable quantum advantage
on the Willow chip, computing molecular structures significantly faster than
classical supercomputers [3].
## Evaluation
Score: 8/10
Feedback: The summary provides a comprehensive overview of the latest breakthroughs
in quantum computing, covering significant advancements in areas such as Majorana
qubits, scalable ion-trap systems, and molecular qubits. The inclusion of specific
examples adds depth to the summary.
## Citations
1. Majorana Qubit Readout and Scalable Ion-Trap Systems
URL: https://www.perplexity.ai
Snippet: Breakthroughs in Majorana qubit readout, scalable ion-trap systems...
2. Quantinuum Helios System: Most Accurate Quantum Computer
URL: https://www.perplexity.ai
Snippet: Quantinuum's Helios system launched November 2025, most accurate yet...
3. Google Quantum Echoes and Topological Superconductors
URL: https://www.perplexity.ai
Snippet: Google's Quantum Echoes algorithm demonstrates quantum advantage...
- Web Search Agent — Searches using Perplexity's sonar model, real-time with citations
- Document Reader — Fetches and parses full content from URLs
- Summarizer — Uses Groq LLM to synthesize documents into coherent findings
- Critic — Scores 1-10 based on factual grounding and comprehensiveness
- Reflection Loop — If score < 7 and iterations < 3, loops back to web search for refinement
research-assistant/
├── agents/ # Individual agents
│ ├── web_search_agent.py
│ ├── document_reader_agent.py
│ ├── summarizer_agent.py
│ └── critic_agent.py
├── graph/ # Orchestration
│ ├── state.py # ResearchState TypedDict
│ └── supervisor.py # LangGraph routing
├── evals/ # Testing
│ ├── golden_set.json
│ └── run_evals.py
├── main.py # CLI entrypoint
├── requirements.txt
├── .env.example
└── LICENSE
python evals/run_evals.pyTests against 5 golden-set research questions with keyword and citation validation.
GROQ_API_KEY not found
- Ensure
.envexists in project root - Check:
echo $GROQ_API_KEY - On Windows: restart terminal after setting .env
Document parsing failed
- Some sites block requests; add more sources
- Timeout is 5 seconds
Score stays below 7
- Try a more specific question
- Check API keys are valid
MIT License - see LICENSE for details.
Built with LangGraph, Perplexity AI, and Groq