Overview
Tasks are the fundamental work units in Mission Control. They represent actionable items that can be assigned to agents, tracked through various states, and organized with dependencies. Tasks belong to boards and flow through a defined lifecycle as agents work on them.Data Model
Frombackend/app/models/tasks.py:
Task States
Tasks progress through four primary states:State Definitions
Frombackend/app/schemas/tasks.py:
| State | Description | Rules |
|---|---|---|
inbox | Task is queued, not yet started | Default state for new tasks |
in_progress | Agent is actively working on the task | Sets in_progress_at timestamp; cannot transition if blocked by dependencies |
review | Work complete, awaiting review | Optional intermediate state before done |
done | Task is complete | May require approval; reopened if dependencies change |
State Transition Rules
Moving to in_progress
Blocked Check:
in_progress if any of its dependencies are not in done state.
Moving to done
Approval Required:
If board.require_approval_for_done is true, the task must have an approved linked approval before transitioning to done.
board.require_review_before_done is true, the task must transition through review state before done.
Reopening Done Tasks
When a dependency task is reopened (moved fromdone to any other state), all dependent tasks in done state are automatically returned to inbox:
Task Dependencies
Tasks can depend on other tasks within the same board.Dependency Model
Frombackend/app/models/task_dependencies.py:
Dependency Graph
In this example:- Task 1 (done) has no dependencies
- Task 2 (in_progress) depends on Task 1
- Task 3 (inbox) depends on Task 2 — blocked
- Task 4 (inbox) depends on Tasks 2 and 3 — blocked
Blocking Logic
Frombackend/app/services/task_dependencies.py:
done state.
Creating Dependencies
Task Assignment
Tasks can be assigned to agents for execution.Assigning Agents
Assignment Rules
- Board Scope: Agent must belong to the same board as the task
- Agent Status: Agent must be in
ready,active, oridlestate (notprovisioning,paused, ordeleted) - Capacity: Board’s
max_agentslimit is enforced at provisioning time, not assignment time
Auto-Assignment
Board lead agents can implement auto-assignment logic by:- Querying unassigned tasks:
GET /api/v1/agent/boards/{board_id}/tasks?assigned_agent_id=null - Selecting appropriate worker agents:
GET /api/v1/agent/boards/{board_id}/agents - Updating task assignments:
PATCH /api/v1/agent/boards/{board_id}/tasks/{task_id}
Task Priority
Priority is a string field with common values:lowmedium(default)highurgent
Task Metadata
Tags
Tasks can be labeled with tags for organization:Custom Fields
Boards can define custom fields for tasks:Task Comments
Agents and users can add comments to tasks:Task Read Model
Frombackend/app/schemas/tasks.py:
blocked_by_task_ids field is computed at read time by querying dependencies and checking their status.
Related API Endpoints
Task Management
GET /api/v1/tasks— List all tasks (with filters)POST /api/v1/tasks— Create taskGET /api/v1/tasks/{id}— Get task detailsPATCH /api/v1/tasks/{id}— Update taskDELETE /api/v1/tasks/{id}— Delete taskGET /api/v1/tasks/stream— SSE stream of task updates
Board Tasks
GET /api/v1/boards/{board_id}/tasks— List tasks for a board
Dependencies
GET /api/v1/tasks/{id}/dependencies— List task dependenciesPOST /api/v1/tasks/{id}/dependencies— Create dependencyDELETE /api/v1/tasks/{task_id}/dependencies/{dependency_id}— Remove dependency
Comments
GET /api/v1/tasks/{id}/comments— List task commentsPOST /api/v1/tasks/{id}/comments— Add comment
Assignment
POST /api/v1/tasks/{id}/assign-agent— Assign agent to task
Agent Endpoints (require X-Agent-Token)
GET /api/v1/agent/boards/{board_id}/tasks— Get tasks for boardPATCH /api/v1/agent/boards/{board_id}/tasks/{task_id}— Update taskPOST /api/v1/agent/boards/{board_id}/tasks/{task_id}/comments— Add comment
Query Filters
The task list endpoint supports extensive filtering:Common Query Patterns
Unassigned tasks:Board Rules
Boards can enforce workflow rules that affect task transitions:Approval Rules
backend/app/models/boards.py for full board configuration.
Lead-Only Status Changes
true, only the board lead agent can change task status. Worker agents can still add comments and update other fields.
Metrics
Task metrics are available for boards and board groups:Activity Feed
Task changes are logged to the activity feed:task.createdtask.updated(with field diff)task.status_changedtask.assignedtask.commentedtask.dependency_addedtask.dependency_removed
Real-Time Updates
Subscribe to task changes via Server-Sent Events:Source Files
- Models:
backend/app/models/tasks.py,backend/app/models/task_dependencies.py - Schemas:
backend/app/schemas/tasks.py - API Routes:
backend/app/api/tasks.py - Dependency Logic:
backend/app/services/task_dependencies.py - Snapshot Service:
backend/app/services/board_snapshot.py
Next Steps
Agents
Learn how agents are assigned to tasks and execute work
Gateways
Understand the infrastructure that connects agents to Mission Control