Skip to content

SuStackx0/ReAct-agent-flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReAct Agent Flow

A local multi-agent system demonstrating the ReAct (Reasoning + Acting) loop using LangGraph, FastAPI, and Ollama.

Architecture

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

Stack

  • Backend: FastAPI + LangGraph + LangChain
  • LLM: Ollama (llama3.1:8b by default, configurable via .env)
  • Frontend: Streamlit (live WebSocket event stream)
  • Containerization: Docker Compose

Run

docker compose up --build

Open http://localhost:8501. On first run, Ollama pulls the configured model automatically (~4.7 GB).

Configuration

Copy .env.example and set your model:

MODEL=llama3.1:8b
OLLAMA_BASE_URL=http://ollama:11434

Agents

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages