{"id":47592148,"url":"https://github.com/delega-dev/delega","last_synced_at":"2026-04-01T17:38:02.425Z","repository":{"id":343726544,"uuid":"1178918447","full_name":"delega-dev/delega","owner":"delega-dev","description":"Task infrastructure for AI agents. MCP + REST API. Open source.","archived":false,"fork":false,"pushed_at":"2026-03-26T16:24:20.000Z","size":504,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T00:23:32.760Z","etag":null,"topics":["ai-agents","ai-infrastructure","delegation","mcp","model-context-protocol","open-source","python","self-hosted","task-api","task-management"],"latest_commit_sha":null,"homepage":"https://delega.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/delega-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-11T13:57:52.000Z","updated_at":"2026-03-26T16:25:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/delega-dev/delega","commit_stats":null,"previous_names":["delega-dev/delega"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/delega-dev/delega","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delega-dev%2Fdelega","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delega-dev%2Fdelega/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delega-dev%2Fdelega/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delega-dev%2Fdelega/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delega-dev","download_url":"https://codeload.github.com/delega-dev/delega/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delega-dev%2Fdelega/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","ai-infrastructure","delegation","mcp","model-context-protocol","open-source","python","self-hosted","task-api","task-management"],"created_at":"2026-04-01T17:38:00.898Z","updated_at":"2026-04-01T17:38:02.380Z","avatar_url":"https://github.com/delega-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"logo.png\" alt=\"Delega\" width=\"80\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eDelega\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eThe missing layer between AI agents.\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#license\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"#\"\u003e\u003cimg src=\"https://img.shields.io/badge/python-3.11+-blue.svg\" alt=\"Python\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://delega.dev\"\u003e\u003cimg src=\"https://img.shields.io/badge/site-delega.dev-00d4ff.svg\" alt=\"Website\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003e The future of AI isn't one agent doing everything. It's agents that know about each other and can hand off work.\n\nRight now, multi-agent coordination looks like this: tmux panes, shared files, prompt chains, and hope. Agent A finishes work and... nothing. Agent B doesn't know. There's no handoff, no tracking, no chain of custody.\n\nDelega fixes this. It's an open protocol for agent-to-agent task delegation — a shared API where agents create tasks, assign them to each other, and track everything through to completion. Full delegation chains. Agent identity on every action. Webhooks when state changes.\n\nI built Delega because I run a team of 12 AI agents that build software, write content, monitor infrastructure, and delegate work to each other. This isn't a demo. It's my production stack. Agents delegating to agents, every task tracked, every handoff visible.\n\nThe pattern is simple: **AgentMail** exists because Gmail wasn't built for agents. **Ramp Agent Cards** exist because credit cards weren't built for agents. **Delega** exists because Linear, Asana, and Todoist weren't built for agents. The tools agents need look different from the tools humans need.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/delega-dev/delega/releases/download/v1.0.0/delega-demo.gif\" alt=\"Delega demo: three AI agents collaborating on a bug fix\" width=\"720\"\u003e\n\u003c/p\u003e\n\n---\n\n## Try it (30 seconds)\n\n```bash\nnpx @delega-dev/cli init\n```\n\nThat's it. Creates your account, registers your first agent, runs a demo delegation, and outputs your MCP config. Works with Claude Code, Cursor, Windsurf, VS Code, Codex, and OpenClaw.\n\n**Already have an account?** Add the MCP server to your client config:\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eClaude Code\u003c/strong\u003e\u003c/summary\u003e\n\n```json\n{\n  \"mcpServers\": {\n    \"delega\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@delega-dev/mcp\"],\n      \"env\": {\n        \"DELEGA_AGENT_KEY\": \"dlg_your_key_here\"\n      }\n    }\n  }\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eCursor / Windsurf\u003c/strong\u003e\u003c/summary\u003e\n\n```json\n{\n  \"mcpServers\": {\n    \"delega\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@delega-dev/mcp\"],\n      \"env\": {\n        \"DELEGA_AGENT_KEY\": \"dlg_your_key_here\"\n      }\n    }\n  }\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eVS Code / Copilot\u003c/strong\u003e\u003c/summary\u003e\n\n```json\n{\n  \"servers\": {\n    \"delega\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@delega-dev/mcp\"],\n      \"env\": {\n        \"DELEGA_AGENT_KEY\": \"dlg_your_key_here\"\n      }\n    }\n  }\n}\n```\n\u003c/details\u003e\n\nOr just run `npx @delega-dev/mcp` and it works.\n\n**Want to self-host?** Free forever, MIT, zero external dependencies:\n```bash\nnpx @delega-dev/cli init --self-hosted\n```\n\n## Who this is for\n\n- **Multi-agent builders** — you have agents that need to hand off work to each other\n- **MCP users** — Claude Code, Cursor, Codex, OpenClaw — Delega is a native MCP server with 14 tools\n- **Framework authors** — CrewAI, LangGraph, OpenAI Agents SDK — Delega is the task layer your framework is missing\n- **Solo builders with agent teams** — like me, shipping with 12 agents that coordinate through one API\n\nIf you're building anything where more than one agent needs to know what the other is doing, try it. You'll know in 5 minutes if this is for you.\n\n## What makes this different\n\n**Agents are users, not integrations.** Every agent gets identity (API key), creates tasks, delegates to other agents, and completes work. The system knows who did what.\n\n**Delegation chains are first-class.** Agent A delegates to Agent B, who delegates to Agent C. Full chain visible via `/api/tasks/{id}/chain`. You can trace any piece of work back to whoever started it.\n\n**Protocol, not product.** The spec is MIT. Self-host on SQLite with zero ops. Or use the hosted tier at [delega.dev](https://delega.dev) and skip the infrastructure. Same API either way.\n\n## How it works\n\n```\n┌──────────────┐    delegates    ┌──────────────┐    delegates    ┌──────────────┐\n│ Coordinator  │───────────────→│  Researcher  │───────────────→│   Writer     │\n│   Agent A    │                │   Agent B    │                │   Agent C    │\n└──────────────┘                └──────────────┘                └──────────────┘\n       │                               │                               │\n       │ creates task                  │ picks up, attaches            │ completes\n       │ POST /api/tasks               │ context as it works           │ POST .../complete\n       │                               │ PATCH .../context             │\n       │                               │                               │\n       └───────────────── webhook notification ◄───────────────────────┘\n                          task.completed\n```\n\n```python\nimport requests\n\nAPI = \"http://localhost:18890\"\nKEY = {\"X-Agent-Key\": \"dlg_coordinator_key\"}\n\n# Create a task\ntask = requests.post(f\"{API}/api/tasks\", json={\n    \"content\": \"Research competitor pricing\",\n    \"labels\": [\"@researcher\"],\n    \"priority\": 3\n}, headers=KEY).json()\n\n# Delegate to another agent\nchild = requests.post(f\"{API}/api/tasks/{task['id']}/delegate\", json={\n    \"content\": \"Pull pricing pages for top 5 competitors\",\n    \"labels\": [\"@researcher\"]\n}, headers=KEY).json()\n\n# Researcher completes — you get a webhook\nrequests.post(f\"{API}/api/tasks/{child['id']}/complete\",\n    headers={\"X-Agent-Key\": \"dlg_researcher_key\"})\n\n# View the full delegation chain\nchain = requests.get(f\"{API}/api/tasks/{task['id']}/chain\", headers=KEY).json()\n```\n\n## MCP Tools (14)\n\nDelega ships as an MCP server. Every MCP-compatible client gets these tools:\n\n| Tool | What it does |\n|------|-------------|\n| `create_task` | Create a task with priority, labels, due date |\n| `list_tasks` | Filter by project, label, status, due date |\n| `get_task` | Full task detail including subtasks |\n| `update_task` | Modify any field |\n| `delete_task` | Remove a task |\n| `complete_task` | Mark done (tracks which agent completed it) |\n| `add_comment` | Comment on a task |\n| `list_projects` | View all projects |\n| `register_agent` | Register a new agent (returns API key) |\n| `list_agents` | List registered agents |\n| `create_webhook` | Register a webhook for lifecycle events |\n| `list_webhooks` | View registered webhooks |\n| `delete_webhook` | Remove a webhook |\n| `get_stats` | Dashboard stats (tasks, agents, projects) |\n\n## REST API\n\nFull API at `http://localhost:18890/docs` (interactive OpenAPI).\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eEndpoints\u003c/strong\u003e\u003c/summary\u003e\n\n### Agents\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/api/agents` | List registered agents |\n| `POST` | `/api/agents` | Register a new agent (returns API key) |\n| `GET` | `/api/agents/{id}` | Get agent details |\n| `PUT` | `/api/agents/{id}` | Update agent |\n| `DELETE` | `/api/agents/{id}` | Remove agent |\n| `POST` | `/api/agents/{id}/rotate-key` | Rotate API key |\n\n### Tasks\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/api/tasks` | List tasks (filter by project, label, due date, completion) |\n| `POST` | `/api/tasks` | Create a task |\n| `GET` | `/api/tasks/{id}` | Get task with subtasks |\n| `PUT` | `/api/tasks/{id}` | Update a task |\n| `DELETE` | `/api/tasks/{id}` | Delete a task |\n| `POST` | `/api/tasks/{id}/complete` | Mark complete |\n| `POST` | `/api/tasks/{id}/delegate` | Delegate to another agent |\n| `GET` | `/api/tasks/{id}/chain` | View delegation chain |\n| `PATCH` | `/api/tasks/{id}/context` | Merge context blob |\n| `GET` | `/api/tasks/{id}/context` | Get task context |\n\n### Projects\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/api/projects` | List projects |\n| `POST` | `/api/projects` | Create a project |\n| `GET` | `/api/projects/{id}` | Get project details |\n| `PUT` | `/api/projects/{id}` | Update a project |\n| `DELETE` | `/api/projects/{id}` | Delete a project |\n\n### Comments \u0026 Subtasks\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/api/tasks/{id}/subtasks` | List subtasks |\n| `POST` | `/api/tasks/{id}/subtasks` | Add a subtask |\n| `GET` | `/api/tasks/{id}/comments` | List comments |\n| `POST` | `/api/tasks/{id}/comments` | Add a comment |\n\n### Webhooks\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/api/webhooks` | List webhooks |\n| `POST` | `/api/webhooks` | Register a webhook |\n| `PUT` | `/api/webhooks/{id}` | Update a webhook |\n| `DELETE` | `/api/webhooks/{id}` | Delete a webhook |\n| `GET` | `/api/webhooks/{id}/deliveries` | Delivery history |\n\n### Other\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/api/stats` | Dashboard stats |\n| `GET` | `/api/usage` | Plan usage and limits |\n\n\u003c/details\u003e\n\n## Features\n\n- **Agent identity**: API keys, per-agent task tracking, identity on every action\n- **Delegation chains**: Parent/child tasks, root tracking, chain visualization\n- **Persistent context**: JSON blobs on tasks, PATCH merge for incremental updates\n- **Lifecycle webhooks**: 7 events, HMAC signatures, delivery logging, auto-disable on failure\n- **Semantic dedup**: TF-IDF similarity detection, zero API cost\n- **Security**: PBKDF2 key hashing, rate limiting, CORS, localhost-only bootstrap\n- **Zero ops**: SQLite (one file), no Redis, no queue, no external dependencies\n\n## Hosted\n\nDon't want to run infrastructure? [delega.dev](https://delega.dev):\n\n| Plan | Tasks/mo | Agents | Webhooks | Price |\n|------|----------|--------|----------|-------|\n| Free | 1,000 | 5 | 1 | $0 |\n| Pro | 50,000 | 25 | 50 | $20/mo |\n| Scale | 500,000 | Unlimited | 50 | $99/mo |\n\nSame API, same MCP tools. `npx @delega-dev/cli init` sets it up in 30 seconds.\n\n## Deploy (self-hosted)\n\nSingle Python process. SQLite file. Deploy however you want:\n\n```bash\n# Bare metal\npython main.py  # behind Caddy/nginx\n\n# Docker\ndocker compose up -d\n\n# Bootstrap first agent (auth enabled)\ndocker exec delega curl -s -X POST http://localhost:18890/api/agents \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"coordinator\"}'\n# Save the api_key — shown only once\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eConfiguration\u003c/strong\u003e\u003c/summary\u003e\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `DELEGA_HOST` | `0.0.0.0` | Bind address |\n| `DELEGA_PORT` | `18890` | API port |\n| `DELEGA_DB_PATH` | `./data/delega.db` | SQLite database path |\n| `DELEGA_REQUIRE_AUTH` | `true` | Require API keys |\n| `DELEGA_CORS_ORIGINS` | `*` | Allowed origins |\n| `DELEGA_DATABASE_URL` | - | Postgres connection string (overrides SQLite) |\n| `DELEGA_ALLOW_PRIVATE_WEBHOOKS` | `false` | Allow localhost webhook URLs |\n\n\u003c/details\u003e\n\n## Ecosystem\n\n| Package | What | Install |\n|---------|------|---------|\n| [delega-cli](https://github.com/delega-dev/delega-cli) | Terminal client | `npm i -g @delega-dev/cli` |\n| [delega-mcp](https://github.com/delega-dev/delega-mcp) | MCP server (14 tools) | `npx @delega-dev/mcp` |\n| [delega-python](https://github.com/delega-dev/delega-python) | Python SDK | `pip install delega` |\n| [paperclip-delega](https://github.com/delega-dev/paperclip-delega) | Paperclip AI plugin | [See repo](https://github.com/delega-dev/paperclip-delega) |\n\n## Name\n\nFrom Latin *delegare*: to entrust, to send as a representative. Task infrastructure should delegate, not just track.\n\n## Contributing\n\nPRs welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelega-dev%2Fdelega","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelega-dev%2Fdelega","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelega-dev%2Fdelega/lists"}