How willierhart/langgraph-multi-agent works
This repository is a single-script LangGraph research assistant. A user query enters shared state at the coordinator, which either finalizes immediately or dispatches a research → critique → writing cycle; the writer returns control to the coordinator for another decision. Agent responses come from GPT-4o via LangChain. The README describes the same capabilities, though its example script name differs from the actual tree. The graph below follows the sampled implementation; research is prompt-driven rather than a separately evidenced search integration.
Main entry points: multi-agent.py Coordinator
Components 9
Workflow
- Script Entry
multi-agent.py - Research State
multi-agent.py - Output Node
multi-agent.py
Research Agents
- Coordinator
multi-agent.py - Researcher
multi-agent.py - Critic
multi-agent.py - Writer
multi-agent.py
LLM Service
- GPT-4o
Other components
- User
Connections 13
- User → Script Entry: submits query
multi-agent.py - Script Entry → Research State: initializes
multi-agent.py - Script Entry → Coordinator: invokes graph
multi-agent.py - Coordinator → GPT-4o: requests decision
multi-agent.py - Coordinator → Researcher: routes if needed
multi-agent.py - Coordinator → Output Node: routes if done
multi-agent.py - Researcher → GPT-4o: requests research
multi-agent.py - Researcher → Critic: dispatches next
multi-agent.py - Critic → GPT-4o: requests review
multi-agent.py - Critic → Writer: dispatches next
multi-agent.py - Writer → GPT-4o: requests synthesis
multi-agent.py - Writer → Coordinator: returns control
multi-agent.py - Output Node → User: returns state
multi-agent.py