When you have AI agents working on complex tasks, things go wrong fast. Agents lose context, skip steps, forget to coordinate. Task Graph solves this with structured workflows: phases to guide work, prompts for automatic guidance, gates to enforce quality, and coordination primitives for multi-agent scenarios—all through the Model Context Protocol.
MCP server for agent task workflows with phases, prompts, gates, and multi-agent coordination
0.3.0
ตรวจสอบล่าสุด
2026-11-09
ดาว
—
เครื่องมือ
—
อัปไทม์
—
Why Task Graph?
The problem: You've got complex tasks that need structured execution. Maybe a single agent working through phases, or multiple agents coordinating in parallel. Without proper workflows, agents lose track, skip steps, and produce inconsistent results.
What you get:
Structured workflows — Phases (explore, implement, review, test) guide agents through work. Transition prompts provide automatic guidance at each step.
Quality gates — Require tests to pass, code to be committed, or reviews to complete before transitions. Enforce your standards automatically.
Ready-to-use topologies — Pre-built workflows for solo work, parallel swarms, specialist relays, or hierarchical delegation. Start immediately, customize later.
Configurable workflows — Define your own states, phases, prompts, and gates. Match your process, not ours.
Multi-agent coordination — Advisory file locks, DAG dependencies, atomic claiming. No more conflicts or duplicate work.
Token-efficient — Designed for LLM context limits. Compact queries, minimal round-trips, structured outputs.
Built-in accounting — Track tokens, cost, and time per task. Know exactly what your agents are spending.
Zero infrastructure — SQLite with WAL mode. No database server to run. Just point at a file.
Features
Feature
Description
Task Hierarchy
Unlimited nesting with parent/child relationships
DAG Dependencies
Typed edges (blocks, follows, contains) with cycle detection
Phases
Categorize work type (explore, implement, review, test, deploy)
Workflows
Named workflow topologies (solo, swarm, relay, hierarchical)
Transition Prompts
Automatic agent guidance on status/phase changes
Gates
Exit requirements for status/phase transitions
Atomic Claiming
Strict locking with limits and tag-based routing
File Coordination
Advisory locks with reasons and change polling
Cost Tracking
Token usage and USD cost per task
Time Tracking
Automatic accumulation from state transitions
Live Status
Real-time "current thought" visible to other agents
Full-text Search
FTS5-powered search across tasks and attachments
Attachments
Inline content, file references, or media storage
Agent Feedback
Inter-agent communication with categorized feedback (conditional on config)
Dynamic Overlays
Runtime workflow customization via add/remove overlay tools
Quick Start
# Install
cargo install task-graph-mcp
# Add to your MCP client (Claude Code, etc.)
Transition prompts — Automatic guidance when entering/exiting phases
Gates — Requirements that must be satisfied before phase transitions
Role-based routing — In relay workflows, specialists own specific phases
Named Workflows
Pre-built workflow topologies optimize for different coordination patterns:
Workflow
Description
Best For
solo
Single agent, full autonomy
Simple tasks, prototyping
swarm
Parallel generalists, pull-based
High throughput, independent tasks
relay
Sequential specialists, handoffs
Complex tasks, domain expertise
hierarchical
Lead/worker delegation
Large projects, team coordination
push
Push-based task distribution topology
Centralized assignment, load balancing
kanban
Board-style task management with WIP limits
Continuous flow, visual tracking
sprint
Time-boxed iteration planning
Scrum teams, fixed cadence
Select a workflow on connect:
connect(worker_id="agent-1", workflow="swarm")
Each workflow provides tailored prompts and coordination guidance. See WORKFLOW_TOPOLOGIES.md for detailed patterns.
Transition Prompts
Agents receive automatic guidance when status or phase changes:
# workflows.yaml
states:
working:
prompts:
enter: |
You are now working on this task.
From {{current_status}} you can transition to: {{valid_exits}}
exit: |
Before leaving:
- [ ] Attach results
- [ ] Log costs
Prompts support template variables: {{current_status}}, {{valid_exits}}, {{current_phase}}, {{valid_phases}}
Gates
Gates are requirements that must be satisfied before status or phase transitions: