Skip to content

Repository files navigation

Multi-Agent Research Assistant

LangGraph-powered autonomous research with source validation

Python LangGraph FastAPI Groq Streamlit


4 specialized agents · Web search · Confidence scoring · Structured JSON + Markdown reports



Highlights

Capability Implementation
Multi-agent orchestration 4-agent LangGraph workflow (Search → Summarize → Critic → Report)
Factual reliability Critic agent cross-checks sources, flags contradictions, scores claim confidence
Production API FastAPI endpoint with structured JSON outputs for downstream apps
Interactive demo Streamlit UI with live agent progress, tabs, and report download
Cost-efficient stack Groq free tier + DuckDuckGo search (no paid search API required)


Architecture

Architecture

Each agent is a LangGraph node sharing typed state. The pipeline runs sequentially: retrieve sources, extract facts, validate claims, then compile a markdown report.



The 4 Agents

Agent Role Output
Search Queries DuckDuckGo, fetches page content Top 5 URLs + text snippets
Summarizer Extracts key facts from each source Structured per-source summaries
Critic Cross-checks claims across sources Contradictions + confidence assessments
Report Synthesizes verified material Final markdown research report


Quick Start

1. Clone and install

git clone https://github.com/AnvitDevadiga/research-assistant.git
cd research-assistant
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

2. Configure environment

cp .env.example .env
# Add GROQ_API_KEY from https://console.groq.com (free tier)

3. Launch Streamlit UI (recommended for demos)

streamlit run streamlit_app.py

Open http://localhost:8501 — enter a query, watch the 4-agent pipeline progress, and explore results in tabs (Report · Sources · Validation · Raw JSON).

4. Or run the REST API

uvicorn app.api:app --reload
curl -X POST http://localhost:8000/research \
  -H "Content-Type: application/json" \
  -d '{"query": "latest trends in AI agents"}'


API Reference

POST /research

Request:

{
  "query": "your research question here"
}

Response:

{
  "query": "latest trends in AI agents",
  "report": "## Overview\n...",
  "overview": "Short summary extracted from the report",
  "key_findings": ["Finding 1", "Finding 2"],
  "contradictions": ["Source A says X; Source B says Y"],
  "assessments": [
    {
      "claim": "LangGraph adoption grew in 2026",
      "confidence": "high",
      "notes": "Supported by multiple sources"
    }
  ],
  "sources": [
    {
      "url": "https://example.com",
      "title": "Example Article",
      "summary": "Brief summary of the source"
    }
  ],
  "confidence": "HIGH",
  "source_count": 5,
  "errors": [],
  "current_agent": "report"
}

Interactive docs: http://localhost:8000/docs



Project Structure

Multi-AgentResearchAssistant/
├── app/
│   ├── agents/
│   │   ├── search_agent.py       # DuckDuckGo search + content fetch
│   │   ├── summarizer_agent.py   # LLM-powered summarization
│   │   ├── critic_agent.py       # Contradiction detection + confidence
│   │   └── report_agent.py       # Final report compilation
│   ├── graph.py                  # LangGraph state machine
│   ├── api.py                    # FastAPI REST endpoints
│   ├── structured_output.py      # Structured JSON from pipeline state
│   ├── llm.py                    # Groq LLM configuration
│   └── state.py                  # Shared agent state schema
├── streamlit_app.py              # Interactive demo UI
├── requirements.txt
├── Procfile                      # Render.com deployment
└── .env.example


Live Demo

Deployed API: research-assistant-k824.onrender.com

Free tier may sleep after inactivity. First request can take ~30s to wake up.



Skills Demonstrated

  • Agentic AI: Multi-step LangGraph workflows with typed shared state
  • LLM engineering: Structured JSON extraction, fallbacks, prompt design per agent role
  • Backend: FastAPI REST API with Pydantic models and CORS
  • Frontend: Streamlit dashboard with live progress and export
  • DevOps: Render deployment via Procfile


Built by Anvit Devadiga

GitHub Email

About

LangGraph multi-agent pipeline with Search, Summarizer, Critic and Report agents — deployed via FastAPI on Render.com

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages