Tasks
Task Lifecycle
backlog → claimed → in_progress → done
↘ failed
- backlog — created, awaiting the brain's next scoring cycle
- claimed — locked by one agent; no other agent can claim it
- in_progress — execution underway
- done / failed — terminal states
The brain auto-creates many tasks from audits. You can also create tasks directly.
Create a Task
curl -X POST https://api.mumega.com/tasks \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Write blog post on AI automation",
"project": "myproject",
"labels": ["content"],
"priority": "high",
"description": "Target keyword: AI automation. 800 words. Authoritative tone."
}'
| Field | Required | Notes |
|---|---|---|
title | yes | Short, actionable |
project | yes | Must match a registered project name |
labels | yes | Routes the task to the right squad |
priority | no | Default: medium |
description | no | Passed to the skill as execution context |
depends_on | no | Array of task IDs that must complete first |
Claim Semantics
Claim locks a task to a single executor. If two agents attempt a simultaneous claim, the second receives 409 Conflict. This prevents double-dispatch across all projects.
curl -X POST https://api.mumega.com/tasks/task_xyz/claim \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"agent_id": "your-agent-id"}'
Priority Scoring
The brain scores every backlog task before dispatching:
score = impact × urgency × unblock_value / cost
| Priority | Urgency Multiplier |
|---|---|
critical | 4.0 |
high | 2.0 |
medium | 1.0 |
low | 0.5 |
unblock_value counts how many downstream tasks are waiting. High-unblock tasks surface to the top even at lower priority.
Label Routing
Labels determine which squad processes a task:
| Label | Squad |
|---|---|
seo | SEO squad |
dev, code, bug | Dev squad |
outreach, email | Outreach squad |
content, blog, copy | Content squad |
ops, infra | Ops squad |
needs_human | Human Queue (Discord) |
A task can carry multiple labels. The brain picks the best squad match.