A local multi-agent system demonstrating the ReAct (Reasoning + Acting) loop using LangGraph, FastAPI, and Ollama.
The supervisor agent reasons over tool results iteratively — calling specialist agents, reading their outputs, and deciding whether to delegate further or return a final answer. Max 3 iterations per query.
User query
→ Supervisor (iteration 1) → research / coding / summarizer / critic tools
→ Supervisor (iteration 2) → reads all results → critic if needed → final answer
- Backend: FastAPI + LangGraph + LangChain
- LLM: Ollama (
llama3.1:8bby default, configurable via.env) - Frontend: Streamlit (live WebSocket event stream)
- Containerization: Docker Compose
docker compose up --buildOpen http://localhost:8501. On first run, Ollama pulls the configured model automatically (~4.7 GB).
Copy .env.example and set your model:
MODEL=llama3.1:8b
OLLAMA_BASE_URL=http://ollama:11434
| Agent | Role |
|---|---|
research |
Factual questions, explanations, comparisons |
coding |
Writing, debugging, explaining code |
summarizer |
Merging multiple outputs into one answer |
critic |
Reviewing and improving a draft |
The supervisor decides which agents to call and in what order using native LLM tool calling (bind_tools), not text parsing.