How koushiksamudrala/langgraph-multi-agent-research-assistant works
A web research assistant takes a user question through a Streamlit UI and FastAPI endpoint into a LangGraph search–critique loop, then synthesizes a structured report. The API loads related research memories before graph execution; completed reports are compressed and persisted for future runs. The graph and agents use a shared typed state, while Gemini, Tavily, and Chroma provide model, search, and storage services. The README documents these capabilities; sampled source confirms the main calls and routing. The request’s max_iterations field is reserved; the graph currently uses a fixed limit.
Main entry points: graph.py Graph Orchestrator · api.py Research API · agents.py Report Synthesis · memory.py Chroma Collection
Components 16
User Interface
- Streamlit UI
frontend/streamlit_app.py - Research API
app/api.py
Research Workflow
- Research State
app/state.py - Graph Orchestrator
app/graph.py - Loop Decision
app/graph.py
Research Agents
- Web Search
app/agents.py - Results Critique
app/agents.py - Report Synthesis
app/agents.py - Gemini Factory
app/llm.py
Research Memory
- Memory Retrieval
app/memory.py - Report Compression
app/memory.py - Chroma Collection
app/memory.py
Other components
- Research User
- Google Gemini
- Tavily Search
- Hugging Face Embeddings
Connections 21
- Research User → Streamlit UI: asks question
frontend/streamlit_app.py - Streamlit UI → Research API: posts query
frontend/streamlit_app.py - Research API → Memory Retrieval: loads memories
app/api.py - Memory Retrieval → Chroma Collection: similarity search
app/memory.py - Chroma Collection → Hugging Face Embeddings: embeds queries
app/memory.py - Research API → Graph Orchestrator: invokes graph
app/api.py - Graph Orchestrator → Web Search: dispatches
app/graph.py - Web Search → Tavily Search: searches web
app/agents.py - Graph Orchestrator → Results Critique: dispatches
app/graph.py - Graph Orchestrator → Loop Decision: routes by critique
app/graph.py - Loop Decision → Web Search: repeats search
app/graph.py - Graph Orchestrator → Report Synthesis: dispatches
app/graph.py - Results Critique → Gemini Factory: gets model
app/agents.py - Report Synthesis → Gemini Factory: gets model
app/agents.py - Gemini Factory → Google Gemini: configures model
app/llm.py - Report Synthesis → Memory Retrieval: uses past reports
app/agents.py - Report Synthesis → Report Compression: saves report
app/agents.py - Report Compression → Gemini Factory: summarizes report
app/memory.py - Report Compression → Chroma Collection: stores summary
app/memory.py - Chroma Collection → Hugging Face Embeddings: embeds documents
app/memory.py - Research API → Streamlit UI: returns report
README.md