agent-tasks

agent-tasks

Enables pipeline-driven task management for AI coding agents, with stage-gated workflows, dependency tracking, artifact versioning, and multi-agent collaboration.

Category
访问服务器

README

agent-tasks

License: MIT Node.js Tests MCP Tools REST Endpoints

Pipeline-driven task management for AI coding agents. An MCP 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.

Built for AI coding agents (Claude Code, Codex CLI, Gemini CLI, Aider) but works equally well with any MCP client, REST consumer, or WebSocket listener.


Light Theme Dark Theme
Light mode dashboard Dark mode dashboard

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, approvals, 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
  • Approval workflows — stage-gated approve/reject with auto-regress on rejection
  • Multi-agent collaboration — roles (collaborator, reviewer, watcher), claiming, assignment
  • 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 and diff viewer
  • Full-text search — FTS5 search across task titles and descriptions
  • Real-time kanban dashboard — drag-and-drop, side panel, inline creation, dark/light theme
  • 3 transport layers — MCP (stdio), REST API (HTTP), WebSocket (real-time events)
  • TodoWrite bridge — intercepts Claude Code's built-in TodoWrite and syncs to the pipeline
  • Stage gates — configurable per-project gates with per-stage rules: require named artifacts, minimum artifact counts, comments, or approvals before advancing
  • 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
  • Heartbeat-based cleanup — auto-fails tasks from dead agents using agent-comm heartbeat data
  • Task cleanup hooks — auto-fails orphaned tasks on session stop and cleans up stale tasks on session start
  • Agent bridge — notifies connected agents on task events (claim, advance, comment, approval)
  • 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 dashboard auto-starts at http://localhost:3422 on the first MCP connection.

Option 2: Standalone server (for REST/WebSocket clients)

node dist/server.js --port 3422

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. See the Setup Guide for detailed integration steps.


MCP Tools (8)

Category Tools
Task CRUD (4) task_create, task_get (include subtasks/artifacts/comments), task_list (search, next), task_delete
Metadata (1) task_update (title, description, priority, tags, project, assignment, dependencies)
Lifecycle (1) task_stage (claim, 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 (18 endpoints)

All endpoints return JSON. CORS enabled. See full API reference for details.

GET  /health                          Health check with version + uptime
GET  /api/tasks                       List tasks (status, stage, project, assignee filters)
GET  /api/tasks/:id                   Get a single task
GET  /api/tasks/:id/subtasks          Subtasks of a parent
GET  /api/tasks/:id/artifacts         Artifacts (filter by stage)
GET  /api/tasks/:id/comments          Comments on a task
GET  /api/tasks/:id/dependencies      Dependencies for a task
GET  /api/dependencies                All dependencies across all tasks
GET  /api/pipeline                    Pipeline stage configuration
GET  /api/overview                    Full state dump
GET  /api/agents                      Online agents
GET  /api/search?q=                   Full-text search

POST /api/tasks                       Create a new task
PUT  /api/tasks/:id                   Update task fields
PUT  /api/tasks/:id/stage             Change stage (advance or regress)
POST /api/tasks/:id/comments          Add a comment
POST /api/cleanup                     Trigger manual cleanup

Testing

npm test              # 355 tests across 13 files
npm run test:watch    # Watch mode
npm run test:coverage # Coverage report
npm run check         # Full CI: typecheck + lint + format + test

Environment variables

Variable Default Description
AGENT_TASKS_DB ~/.agent-tasks/agent-tasks.db SQLite database file path
AGENT_TASKS_PORT 3422 Dashboard HTTP/WebSocket port
AGENT_TASKS_INSTRUCTIONS enabled Set to 0 to disable response-embedded instructions
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 — 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.

  • 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

  • API Reference — all 8 MCP tools, 18 REST endpoints, WebSocket protocol
  • Architecture — source structure, design principles, database schema
  • Dashboard — kanban board features, keyboard shortcuts, screenshots
  • Setup Guide — installation, client setup (Claude Code, OpenCode, Cursor, Windsurf), hooks
  • Changelog

License

MIT — see LICENSE

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选