{
  "markdown": "# agent-tasks\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Node.js](https://img.shields.io/badge/node-%3E%3D20.11-brightgreen)](https://nodejs.org/)\n[![Tests](https://img.shields.io/badge/tests-355%20passing-brightgreen)]()\n[![MCP Tools](https://img.shields.io/badge/MCP%20tools-8-purple)]()\n[![REST Endpoints](https://img.shields.io/badge/REST-18%20endpoints-orange)]()\n\n**Pipeline-driven task management for AI coding agents.** An [MCP](https://modelcontextprotocol.io/) server with stage-gated pipelines, multi-agent collaboration, and a real-time kanban dashboard. Tasks flow through configurable stages — `backlog`, `spec`, `plan`, `implement`, `test`, `review`, `done` — with dependency tracking, approval workflows, artifact versioning, and threaded comments.\n\nBuilt for AI coding agents (Claude Code, Codex CLI, Gemini CLI, Aider) but works equally well with any MCP client, REST consumer, or WebSocket listener.\n\n---\n\n| Light Theme                                              | Dark Theme                                             |\n| -------------------------------------------------------- | ------------------------------------------------------ |\n| ![Light mode dashboard](docs/assets/dashboard-light.png) | ![Dark mode dashboard](docs/assets/dashboard-dark.png) |\n\n---\n\n## Why agent-tasks?\n\nWhen 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, approvals, and visibility.\n\n---\n\n## Features\n\n- **Pipeline stages** — configurable per project: `backlog` > `spec` > `plan` > `implement` > `test` > `review` > `done`\n- **Task dependencies** — DAG with automatic cycle detection; blocks advancement until resolved\n- **Approval workflows** — stage-gated approve/reject with auto-regress on rejection\n- **Multi-agent collaboration** — roles (collaborator, reviewer, watcher), claiming, assignment\n- **Subtask hierarchies** — parent/child task trees with progress tracking\n- **Threaded comments** — async discussions between agents on any task\n- **Artifact versioning** — per-stage document attachments with automatic versioning and diff viewer\n- **Full-text search** — FTS5 search across task titles and descriptions\n- **Real-time kanban dashboard** — drag-and-drop, side panel, inline creation, dark/light theme\n- **3 transport layers** — MCP (stdio), REST API (HTTP), WebSocket (real-time events)\n- **TodoWrite bridge** — intercepts Claude Code's built-in TodoWrite and syncs to the pipeline\n- **Stage gates** — configurable per-project gates with per-stage rules: require named artifacts, minimum artifact counts, comments, or approvals before advancing\n- **Decisions log** — structured decision artifacts (chose X over Y because Z) via `task_artifact(type: \"decision\")`\n- **Learnings propagation** — `task_artifact(type: \"learning\")` captures insights (technique, pitfall, decision, pattern); auto-propagated to parent and sibling tasks on completion\n- **Agent affinity** — `task_list(next: true)` prefers routing tasks to agents with related history (parent, dependency, project) as a tie-breaker\n- **Heartbeat-based cleanup** — auto-fails tasks from dead agents using agent-comm heartbeat data\n- **Task cleanup hooks** — auto-fails orphaned tasks on session stop and cleans up stale tasks on session start\n- **Agent bridge** — notifies connected agents on task events (claim, advance, comment, approval)\n- **Knowledge bridge** — auto-pushes learning and decision artifacts to agent-knowledge on task completion, with embedding indexing and auto-linking\n\n---\n\n## Quick Start\n\n### Install from npm\n\n```bash\nnpm install -g agent-tasks\n```\n\n### Or clone from source\n\n```bash\ngit clone https://github.com/keshrath/agent-tasks.git\ncd agent-tasks\nnpm install\nnpm run build\n```\n\n### Option 1: MCP server (for AI agents)\n\nAdd to your MCP client config (Claude Code, Cline, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"agent-tasks\": {\n      \"command\": \"npx\",\n      \"args\": [\"agent-tasks\"]\n    }\n  }\n}\n```\n\nThe dashboard auto-starts at http://localhost:3422 on the first MCP connection.\n\n### Option 2: Standalone server (for REST/WebSocket clients)\n\n```bash\nnode dist/server.js --port 3422\n```\n\n---\n\n## Claude Code Integration\n\nOnce configured (see [Quick Start](#quick-start) above), Claude Code can use all 8 MCP tools directly — creating tasks, advancing stages, adding artifacts, commenting, and more. See the [Setup Guide](docs/SETUP.md) for detailed integration steps.\n\n---\n\n## MCP Tools (8)\n\n| Category               | Tools                                                                                                      |\n| ---------------------- | ---------------------------------------------------------------------------------------------------------- |\n| **Task CRUD** (4)      | `task_create`, `task_get` (include subtasks/artifacts/comments), `task_list` (search, next), `task_delete` |\n| **Metadata** (1)       | `task_update` (title, description, priority, tags, project, assignment, dependencies)                      |\n| **Lifecycle** (1)      | `task_stage` (claim, advance, regress, complete, fail, cancel)                                             |\n| **Artifacts** (1)      | `task_artifact` (general, decision, learning, comment)                                                     |\n| **Config & utils** (1) | `task_config` (pipeline, session, cleanup, rules)                                                          |\n\nSee [full API reference](docs/API.md) for detailed descriptions of every tool and endpoint.\n\n## REST API (18 endpoints)\n\nAll endpoints return JSON. CORS enabled. See [full API reference](docs/API.md#rest-api-18-endpoints) for details.\n\n```\nGET  /health                          Health check with version + uptime\nGET  /api/tasks                       List tasks (status, stage, project, assignee filters)\nGET  /api/tasks/:id                   Get a single task\nGET  /api/tasks/:id/subtasks          Subtasks of a parent\nGET  /api/tasks/:id/artifacts         Artifacts (filter by stage)\nGET  /api/tasks/:id/comments          Comments on a task\nGET  /api/tasks/:id/dependencies      Dependencies for a task\nGET  /api/dependencies                All dependencies across all tasks\nGET  /api/pipeline                    Pipeline stage configuration\nGET  /api/overview                    Full state dump\nGET  /api/agents                      Online agents\nGET  /api/search?q=                   Full-text search\n\nPOST /api/tasks                       Create a new task\nPUT  /api/tasks/:id                   Update task fields\nPUT  /api/tasks/:id/stage             Change stage (advance or regress)\nPOST /api/tasks/:id/comments          Add a comment\nPOST /api/cleanup                     Trigger manual cleanup\n```\n\n---\n\n## Testing\n\n```bash\nnpm test              # 355 tests across 13 files\nnpm run test:watch    # Watch mode\nnpm run test:coverage # Coverage report\nnpm run check         # Full CI: typecheck + lint + format + test\n```\n\n---\n\n## Environment variables\n\n| Variable                   | Default                         | Description                                          |\n| -------------------------- | ------------------------------- | ---------------------------------------------------- |\n| `AGENT_TASKS_DB`           | `~/.agent-tasks/agent-tasks.db` | SQLite database file path                            |\n| `AGENT_TASKS_PORT`         | `3422`                          | Dashboard HTTP/WebSocket port                        |\n| `AGENT_TASKS_INSTRUCTIONS` | enabled                         | Set to `0` to disable response-embedded instructions |\n| `AGENT_COMM_URL`           | `http://localhost:3421`         | Agent-comm REST URL for bridge notifications         |\n| `AGENT_KNOWLEDGE_URL`      | `http://localhost:3423`         | Agent-knowledge REST URL for knowledge bridge        |\n\n---\n\n## Dependencies\n\n**Required**: Node.js >= 20.11, better-sqlite3 (bundled)\n\n**Optional (soft dependencies — fail-open, HTTP-only, no npm dep):**\n\n- [agent-comm](https://github.com/keshrath/agent-comm) — Heartbeat-based task cleanup and event notifications. agent-comm tracks heartbeats → agent-tasks checks heartbeats → auto-fails tasks from dead agents. Also sends direct messages on claim/advance and posts to channels on comments/approvals. Without agent-comm, stale agent detection and notifications are skipped gracefully.\n\n- [agent-knowledge](https://github.com/keshrath/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.\n\n---\n\n## Documentation\n\n- [API Reference](docs/API.md) — all 8 MCP tools, 18 REST endpoints, WebSocket protocol\n- [Architecture](docs/ARCHITECTURE.md) — source structure, design principles, database schema\n- [Dashboard](docs/DASHBOARD.md) — kanban board features, keyboard shortcuts, screenshots\n- [Setup Guide](docs/SETUP.md) — installation, client setup (Claude Code, OpenCode, Cursor, Windsurf), hooks\n- [Changelog](CHANGELOG.md)\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE)\n",
  "bytes": 9301,
  "sha": "4d574600974ab44bde8569c0f1f1cca2894bc387b58297067e7f595abcd7be6e",
  "repo_slug": "keshrath/agent-tasks",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_keshrath_agent_tasks_agent_tasks_ce342ebe/readme"
}