agent-tasks

Pipeline-driven task management for AI coding agents. An MCP server with stage-gated pipelines, multi-agent collaboration, a native Claude Code /pipeline pane, a web dashboard for every other tool, and an MCP Apps view that draws task results inline in Claude Desktop, claude.ai and VS Code. Tasks flow through configurable stages — backlog, spec, plan, implement, test, review, done — with dependency tracking, stage gates, artifact versioning, and threaded comments.
Built for AI coding agents (Claude Code, Codex CLI, Gemini CLI, Aider) but works equally well with any MCP client or REST consumer.
The user manual shows every view and action of the pane, with screenshots and short clips from the real CLI.
For Codex, Cursor, OpenCode, Aider or anyone with a browser there is a web dashboard on the REST port.
From 1.x
- The 1.x dashboard and the agent-desk Tasks tab are gone. In Claude Code open the board with
/pipeline (install the plugin, below); anywhere else, the new web dashboard is back on http://127.0.0.1:3422.
- REST:
GET /api/overview and PUT /api/tasks/:id/stage are gone (use GET /api/board and POST /api/tasks/:id/stage with {"action": "advance"}), and so are the routes nothing called; see the REST API.
- A 1.x process still holding port 3422 is named by the pane (
An older agent-tasks (1.10.13) holds the port) and in the status line (old server 1.10.13 on the port): end the Claude Code sessions still running it (or kill the old agent-tasks process) so a 2.x process takes the port, then Refresh.
Why agent-tasks?
When you run multiple AI agents on the same codebase, they need a shared task pipeline — not just a flat todo list. They need stages, dependencies, stage gates, and visibility.
Features
- Pipeline stages — configurable per project:
backlog > spec > plan > implement > test > review > done
- Task dependencies — DAG with automatic cycle detection; blocks advancement until resolved
- Multi-agent claiming — claim, assign, send back to an earlier stage with a reason
- Subtask hierarchies — parent/child task trees with progress tracking
- Threaded comments — async discussions between agents on any task
- Artifact versioning — per-stage document attachments with automatic versioning
- Full-text search — FTS5 search across task titles and descriptions
- Claude Code
/pipeline pane — the board beside the conversation, keyboard-first: one line per task under its stage with priority, assignee and age in columns, task detail with artifacts and comments, advance, send back, complete, fail, cancel, comment and delete, a status line entry, a link to the web dashboard; a kanban board in the Claude desktop app
- 2 transport layers — MCP (stdio) and a loopback REST API (HTTP) that the pane reads
- Stage gates — configurable per-project gates with per-stage rules: require named artifacts, minimum artifact counts or a comment before advancing (the schema also has
require_approval, but no MCP tool or REST route records an approval, so a stage with it set cannot be left; keep it off)
- Decisions log — structured decision artifacts (chose X over Y because Z) via
task_artifact(type: "decision")
- Learnings propagation —
task_artifact(type: "learning") captures insights (technique, pitfall, decision, pattern); auto-propagated to parent and sibling tasks on completion
- Agent affinity —
task_list(next: true) prefers routing tasks to agents with related history (parent, dependency, project) as a tie-breaker
- Claims live with their session — a claimed task stays with the session that claimed it, idle or not, and fails only once that session has ended or stopped answering (a grace later)
- Opt-in pipeline reminder — with the plugin's
enforcePipeline option, a work prompt in a session that holds no claimed task reminds the model to claim one first
- Agent bridge — notifies connected agents on task events (claim, advance, comment)
- Knowledge bridge — auto-pushes learning and decision artifacts to agent-knowledge on task completion, with embedding indexing and auto-linking
Quick Start
Install from npm
npm install -g agent-tasks
Or clone from source
git clone https://github.com/keshrath/agent-tasks.git
cd agent-tasks
npm install
npm run build
Option 1: MCP server (for AI agents)
Add to your MCP client config (Claude Code, Cline, etc.):
{
"mcpServers": {
"agent-tasks": {
"command": "npx",
"args": ["agent-tasks"]
}
}
}
The first MCP process to start also serves the REST API on http://localhost:3422; the others retry every 5 s and take over when it exits.
Option 2: Claude Code plugin (MCP server + /pipeline pane)
claude plugin marketplace add keshrath/agent-tasks
claude plugin install agent-tasks@agent-tasks
The plugin runs the MCP server and adds a Claude Code mod (function hooks, Claude Code 2.1.289+): /pipeline opens the board beside the conversation, and the session holds the claims its agents make. Nothing goes into settings.json. The tutorial walks through it. Remove any hand-written agent-tasks entry from ~/.claude.json so tools do not appear twice; coming from 2.x, remove the agent-tasks command hooks from settings.json too (what replaced them).
Option 3: Standalone REST server
node dist/server.js --port 3422
Dashboard (Codex, Cursor, any browser)
The REST server serves a web dashboard at http://127.0.0.1:3422/: the board as a column per stage, a Done tab, Stats (open by stage, finished per day, per project and assignee), filters (find, project, assignee) and the open task beside the board with its description, artifacts, comments, subtasks and dependencies. Advance, Complete, Send back, Fail, Cancel, Reopen, Delete, comments and new tasks all work from it, as the person set in AGENT_TASKS_USER (else the OS user). It polls every 3 s, so what agents do shows within seconds. Light and dark follow the system; it works from phone width up.
npx agent-tasks dashboard # prints the URL and opens the browser
The dashboard lives on the REST server, which runs while any agent-tasks MCP process runs (the first one holds the port). With none running, npx agent-tasks dashboard serves it itself until Ctrl+C. GET /health names the URL as dashboard_url. docs/DASHBOARD.md has every view.
Codex. Add the MCP server to ~/.codex/config.toml (or run codex mcp add agent-tasks -- npx -y agent-tasks), then open the dashboard beside it:
[mcp_servers.agent-tasks]
command = "npx"
args = ["-y", "agent-tasks"]
[mcp_servers.agent-tasks.env]
AGENT_TASKS_USER = "your-name"
MCP Apps hosts (Claude Desktop, claude.ai, VS Code, ...) need nothing extra: task_list, task_get and task_create point at the ui://agent-tasks/app.html view, so the host draws their results as the same board and task detail, with the same actions, right in the chat.
Claude Code Integration
Once configured (see Quick Start above), Claude Code can use all 8 MCP tools directly — creating tasks, advancing stages, adding artifacts, commenting, and more. With the plugin installed, /pipeline opens the board in a pane beside the conversation (Claude Code 2.1.289+). See the Setup Guide for detailed integration steps.
MCP Tools (8)
| Category |
Tools |
| Task CRUD (4) |
task_create, task_get (include subtasks/artifacts/comments/transitive_deps), task_list (search, next), task_delete |
| Metadata (1) |
task_update (title, description, priority, tags, project, assignment, dependencies) |
| Lifecycle (1) |
task_stage (claim, assign, advance, regress, complete, fail, cancel) |
| Artifacts (1) |
task_artifact (general, decision, learning, comment) |
| Config & utils (1) |
task_config (pipeline, session, cleanup, rules) |
See full API reference for detailed descriptions of every tool and endpoint.
REST API (10 endpoints)
All endpoints return JSON (and GET / the dashboard). Loopback only: a foreign Host gets 403, so does any request whose Origin is not the server's own (only the dashboard it serves may call from a browser), and request bodies must be application/json. Everything else goes through the MCP tools. See full API reference for details.
GET / The web dashboard (and /app.js, /app.css)
GET /health Health check with version, uptime, dashboard_url
GET /api/tasks/:id One task, as task_get (?include=subtasks,comments,transitive_deps)
GET /api/pipeline Pipeline stage configuration
GET /api/board Open and recently closed tasks (what the pane polls)
POST /api/tasks Create a task
POST /api/tasks/:id/stage Lifecycle action (claim, assign, advance, regress, complete, fail, cancel, reopen)
POST /api/tasks/:id/comments Add a comment
DELETE /api/tasks/:id Delete a task
POST /api/holders/:holder A host session as claim holder: beat, adopt tasks
DELETE /api/holders/:holder The holder's session ended
Testing
npm test # vitest: 484 tests across 25 files
npm run test:watch # Watch mode
npm run test:coverage # Coverage report
npm run check # Full CI: typecheck + lint + format + test
npm run plugin:check # the /pipeline pane: claude plugin validate + its tests (needs the claude CLI)
npm run e2e:claude # the pane in the real Claude Code CLI (see CONTRIBUTING.md)
Environment variables
| Variable |
Default |
Description |
AGENT_TASKS_DB |
~/.agent-tasks/agent-tasks.db |
SQLite database file path |
AGENT_TASKS_PORT |
3422 |
REST API port (the /pipeline pane reads it) |
AGENT_TASKS_HOST |
127.0.0.1 |
REST bind address (0.0.0.0 exposes it to the network) |
AGENT_TASKS_USER |
the OS user |
Who the /pipeline pane acts as (created_by, comment author, by) |
AGENT_TASKS_INSTRUCTIONS |
enabled |
Set to 0 to disable response-embedded instructions |
AGENT_TASKS_RETENTION_DAYS |
30 |
Days the cleanup keeps resolved approval records |
AGENT_TASKS_COMPLETED_RETENTION_DAYS |
7 |
Days a completed task is kept (and listed under the pane's Done) before purge |
AGENT_TASKS_FAILED_RETENTION_DAYS |
7 |
Days a failed task is kept before purge |
AGENT_TASKS_CANCELLED_RETENTION_DAYS |
1 |
Days a cancelled task is kept before purge |
AGENT_TASKS_ORPHAN_TIMEOUT_MINUTES |
360 |
Minutes before an in-progress task with no assignee is cancelled |
AGENT_TASKS_DEAD_SESSION_GRACE_MINUTES |
10 |
Minutes a claiming session may be ended or silent before its open tasks fail |
AGENT_COMM_URL |
http://localhost:3421 |
Agent-comm REST URL for bridge notifications |
AGENT_KNOWLEDGE_URL |
http://localhost:3423 |
Agent-knowledge REST URL for knowledge bridge |
Dependencies
Required: Node.js >= 20.11, better-sqlite3 (bundled)
Optional (soft dependencies — fail-open, HTTP-only, no npm dep):
-
agent-comm — Event notifications: direct messages on claim/advance and a channel post on comments. Without agent-comm, notifications are skipped gracefully.
-
agent-knowledge — Knowledge persistence for task learnings and decisions. On task completion, the KnowledgeBridge pushes learning and decision artifacts to agent-knowledge via POST /api/knowledge. Entries are auto-indexed with embeddings, auto-linked to similar entries, and git-synced. Without agent-knowledge, artifacts stay in agent-tasks only.
Documentation
- Tutorial — the
/pipeline pane step by step, recorded from the real CLI
- User Manual — the
/pipeline pane view by view (screenshots and GIFs), every tool, the pipeline, gates, cleanup
- Dashboard — the web dashboard and the MCP Apps view, for every host without the pane
- API Reference — all 8 MCP tools and the REST endpoints
- Session hooks — what the plugin does in a Claude Code session: claims held by the session, the pipeline reminder
- Architecture — source structure, design principles, database schema
- Setup Guide — installation, client setup (Claude Code, OpenCode, Cursor, Windsurf), claimed tasks and sessions
- Contributing — development, tests, the e2e run in the real CLI
- Changelog
License
MIT — see LICENSE