How ki11e6/langgraph-multi-agent works
A CLI research assistant turns a user query into a cited report or an explicit grounding refusal. The CLI builds and streams a LangGraph workflow; its supervisor dispatches research and initial drafting, then deterministic validation gates review and revision. Optional human review can override the reviewer's decision. Research uses DuckDuckGo and page fetching, while agent reasoning uses a configurable LLM provider. The graph and tool excerpts establish core calls; broader workflow routing and optional integrations are documented in the README, so those edges cite it.
Main entry points: graph.py Writer · main.py CLI runner · tools.py Web search tool · config.py Provider configuration
Components 16
Query interface
- CLI runner
main.py
Agent workflow
- Graph builder
agents/graph.py - Supervisor
agents/graph.py - Researcher
agents/graph.py - Writer
agents/graph.py - Grounding validator
agents/graph.py - Reviewer
agents/graph.py - Human review pause
agents/graph.py - Shared agent state
agents/graph.py
Web research
- Web search tool
agents/tools.py - DuckDuckGo
- Page text fetch
agents/tools.py - Web pages
Model access
- Provider configuration
agents/config.py - LLM providers
Other components
- Research user
Connections 26
- Research user → CLI runner: submits query
README.md - CLI runner → Graph builder: builds graph
main.py - CLI runner → Shared agent state: streams updates
main.py - Graph builder → Supervisor: registers node
README.md - Supervisor → Researcher: routes research
README.md - Researcher → Web search tool: searches sources
README.md - Web search tool → DuckDuckGo: searches web
agents/tools.py - Web search tool → Page text fetch: fetches pages
agents/tools.py - Page text fetch → Web pages: reads text
agents/tools.py - Researcher → Supervisor: returns sources
README.md - Supervisor → Writer: routes drafting
README.md - Writer → Grounding validator: submits draft
README.md - Grounding validator → Reviewer: routes grounded draft
README.md - Grounding validator → CLI runner: reports refusal
README.md - Reviewer → Writer: routes revision
README.md - Reviewer → Human review pause: pauses optionally
README.md - Human review pause → Writer: requests revision
README.md - Human review pause → CLI runner: returns decision
main.py - Writer → Provider configuration: gets model
agents/graph.py - Reviewer → Provider configuration: gets model
agents/graph.py - Supervisor → Provider configuration: gets model
agents/graph.py - Provider configuration → LLM providers: selects provider
agents/config.py - Web search tool → Shared agent state: returns sources
README.md - Writer → Shared agent state: updates draft
README.md - Grounding validator → Shared agent state: records validation
README.md - Reviewer → Shared agent state: records verdict
README.md