| title | Multi-Agent Research Assistant |
|---|---|
| emoji | 🧠 |
| colorFrom | blue |
| colorTo | indigo |
| sdk | streamlit |
| sdk_version | 1.39.0 |
| app_file | app.py |
| pinned | false |
| license | mit |
A multi-agent system where four specialized AI agents collaborate to research
any topic — one searches the web, one summarizes findings, one fact-checks
claims, and one writes the final structured report. Orchestrated with
LangGraph and powered by
Groq running llama-3.3-70b-versatile (the current
production replacement for the now-decommissioned llama3-70b-8192).
You can override the model at any time by setting GROQ_MODEL in .env.
┌──────────────────────────────┐
│ User research topic │
└──────────────┬───────────────┘
│
▼
┌──────────────────────────────┐
│ 1. Search Agent │
│ (Tavily web search) │
└──────────────┬───────────────┘
│ top 5 results
▼
┌──────────────────────────────┐
│ 2. Summarizer Agent │
│ (Groq · llama3-70b-8192) │
└──────────────┬───────────────┘
│ structured summary
▼
┌──────────────────────────────┐
│ 3. Fact-Check Agent │
│ (claims + Tavily evidence) │
└──────────────┬───────────────┘
│ VERIFIED / UNVERIFIED / DISPUTED
▼
┌──────────────────────────────┐
│ 4. Writer Agent │
│ (final structured report) │
└──────────────┬───────────────┘
│
▼
┌──────────────────────────────┐
│ outputs/reports/*.txt │
│ logs/research_log.json │
└──────────────────────────────┘
If any node sets state["error"], the graph short-circuits to END
gracefully and the UI surfaces the failure.
multi-agent-research/
├── agents/
│ ├── __init__.py
│ ├── search_agent.py
│ ├── summarizer_agent.py
│ ├── factcheck_agent.py
│ └── writer_agent.py
├── graph/
│ ├── __init__.py
│ ├── state.py
│ └── pipeline.py
├── frontend/
│ └── app.py
├── utils/
│ ├── __init__.py
│ └── helpers.py
├── logs/
│ └── research_log.json
├── outputs/
│ └── reports/
├── .env
├── requirements.txt
└── README.md
-
Clone / open the project and
cdintomulti-agent-research/. -
Create a virtual environment (recommended)
python -m venv .venv # Windows .venv\Scripts\activate # macOS / Linux source .venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Configure your API keys in
.envGROQ_API_KEY=your_groq_key_here TAVILY_API_KEY=your_tavily_key_here
- Groq API keys: https://console.groq.com/keys
- Tavily API keys (free tier available): https://app.tavily.com/
# Either file path works — they share the same main()
streamlit run app.py
# or
streamlit run frontend/app.pyOpen the printed http://localhost:8501 URL, type a topic, click
Start Research, and watch the four-step progress tracker fill in.
Use the sidebar to swap models, change the number of search results, adjust how many claims to fact-check, and browse past reports.
See DEPLOYMENT.md for step-by-step deploys to
Streamlit Community Cloud, Hugging Face Spaces, and Docker
(Render / Railway / Fly.io / Cloud Run).
from graph.pipeline import run_pipeline
result = run_pipeline("artificial intelligence trends 2024")
print(result["status"])
print(result["final_report"])A timestamped .txt copy of every report is saved under
outputs/reports/, and a summary of each run is appended to
logs/research_log.json.
artificial intelligence trends 2024quantum computing breakthroughs 2024state of renewable energy in 2024latest developments in CRISPR gene editinglarge language model evaluation benchmarksstate of fusion energy researchMars exploration missions 2024cybersecurity threats facing the financial industry
Uses the Tavily client to run an advanced search and returns up to 5
results, each normalized to {title, url, content}. Any Tavily failure
yields a graceful fallback result so downstream agents still have
something to work with.
Sends the raw search results to llama-3.3-70b-versatile via Groq with a
research-summarizer system prompt that requires the output to contain
Key Findings, Important Statistics, and Main Themes.
- Asks the LLM to extract 5 atomic, independently verifiable claims from the summary.
- Searches Tavily for evidence on each claim.
- Asks the LLM to label each claim as
VERIFIED,UNVERIFIED, orDISPUTEDand to cite the strongest snippet.
Feeds the summary, fact-check verdicts, and original sources to the LLM
and asks for a full report with these sections:
Executive Summary, Key Findings, Verified Facts,
Areas of Uncertainty, Conclusion. The result is automatically
saved to outputs/reports/<timestamp>_<topic>.txt.
class AgentState(TypedDict, total=False):
topic: str
search_results: list
summary: str
fact_check: dict
final_report: str
status: str
error: str
report_path: strEvery pipeline run appends a JSON record to logs/research_log.json:
{
"timestamp": "2026-05-20T01:23:45",
"topic": "artificial intelligence trends 2024",
"status": "success",
"error": "",
"search_result_count": 5,
"summary_length": 1842,
"fact_check_summary": {
"verified": 3,
"unverified": 1,
"disputed": 1,
"total": 5
},
"report_length": 4321,
"total_time_seconds": 17.412
}- Tavily free tier has monthly request caps and rate limits. The fact-check agent issues one Tavily request per claim, so a single run uses ~6 requests.
- LLM hallucination: even with fact-checking, summaries and reports can contain inaccuracies — always treat the output as a starting point, not a final source of truth.
- JSON parsing of LLM output in the fact-check agent is best-effort.
If the model returns malformed JSON, the agent falls back to
line-based parsing or marks the claim as
UNVERIFIED. - No persistent agent memory — every run starts fresh.
- English-first: prompts and parsing assume English; non-English topics may work but quality is not validated.
sentence-transformersis listed as a dependency for theall-MiniLM-L6-v2embeddings model (downloaded on first use). It is imported lazily so the pipeline still runs if the model has not yet been pulled.- Groq rate limits apply per minute / per day depending on your account tier.