| name | task-management |
| description | Use when you need to create runs, assign tasks to workers, or manage task lifecycle. |
Task Management
Turn user goals into visible task room assignments via the agenthub CLI.
Commands
agenthub schema
agenthub run create --workspace <workspace-id> --goal "Build a website"
agenthub task create --workspace <workspace-id> --title "Build UI" --assign-to <agent-id> --spec "## Goal\n..."
agenthub apply -f task.yaml
agenthub task list --run <run-id>
agenthub task status --id <task-id>
agenthub task retry --id <task-id>
agenthub run cancel --id <run-id> --reason "User requested cancellation"
agenthub state --workspace <workspace-id>
agenthub room events --room <room-id> --limit 20
Task Manifest
Use a manifest when the task contract must be reviewed, repeated, or handed to another Manager runtime.
kind: Task
metadata:
name: build-ui
spec:
workspaceId: <workspace-id>
runId: <run-id>
title: Build UI
assignToAgentId: <workspace-agent-id>
taskSpec: |
## Goal
Build the requested UI change.
- Read the room timeline.
- Read shared task artifacts from the referenced task directories.
- Write result.md.
- Register artifacts through the shared task contract.
Rules
- Do not force ordinary conversation into a task.
- When work is needed, create a run and assign tasks through the controller.
- Each task gets its own task room where the Worker executes.
- Clarification requests happen in the task room, not hidden tables.
- Controller assignment creates the task room and sends the first Matrix @mention. Do not send a duplicate manual @mention unless it is a follow-up after assignment.
- Task state comes from
workspace_tasks, task_threads, runtime_leases, artifacts, and Matrix timeline. Do not infer completion from a friendly chat reply alone.
Decision Pattern
agenthub schema to confirm Task assignment/apply fields.
- Analyze the user goal to determine if task execution is needed.
- If yes, create a run:
agenthub run create --workspace <id> --goal "..."
- Create tasks with dependencies:
agenthub task create --workspace <id> --run <run-id> --title "..." --assign-to <agent-id> or agenthub apply -f task.yaml.
- Monitor progress through
agenthub run status --id <run-id> and the task room timeline.
- Synthesize results only when tasks/artifacts show completion.