Skip to content

Agent Tools Reference

AOF exposes a set of tools to agents via MCP (Model Context Protocol) or the OpenClaw gateway. These tools are the primary API for agents to interact with the task system.

Tip: All tools accept an optional actor parameter identifying the calling agent. Always supply this — it’s used for audit logging, event attribution, and workflow role enforcement.

aof_dispatch

Create and dispatch a new task to the ready queue.

Parameters:

ParameterTypeRequiredDescription
titlestringyesShort task title (shown in board/mailbox views)
briefstringyesTask description / body (Markdown supported)
agentstringTarget agent ID (bypasses org chart routing)
teamstringTarget team ID
rolestringTarget role from org chart roles mapping
priorityenum"low" | "normal" | "high" | "critical" (default: "normal")
dependsOnstring[]Task IDs this task depends on
parentIdstringParent task ID for sub-task hierarchy
tagsstring[]Tags for capability-based routing
metadataobjectArbitrary key-value metadata
actorstringCalling agent ID (for attribution)

Returns:

{
taskId: string; // Assigned task ID (e.g., "TASK-2026-02-21-001")
status: TaskStatus; // Initial status ("ready" or "backlog")
filePath: string; // Filesystem path of the task file
}

Example:

{
"tool": "aof_dispatch",
"params": {
"title": "Implement JWT refresh token endpoint",
"brief": "Add POST /auth/refresh endpoint that accepts a refresh token and returns a new access token.\n\n## Acceptance Criteria\n- [ ] Validates refresh token signature\n- [ ] Returns new access + refresh token pair\n- [ ] Invalidates old refresh token (rotation)\n- [ ] Tests: 8+ covering success + failure cases",
"agent": "swe-backend",
"priority": "high",
"tags": ["auth", "api"],
"actor": "swe-architect"
}
}

Response:

{
"taskId": "TASK-2026-02-21-001",
"status": "ready",
"filePath": "tasks/ready/TASK-2026-02-21-001.md"
}

aof_task_complete

Mark a task as complete. For gated tasks, advance or reject the current hop.

Parameters:

ParameterTypeRequiredDescription
taskIdstringyesTask ID or ID prefix
summarystringCompletion summary / work log entry
outcomeenumyes (gated)"complete" | "needs_review" | "blocked"
blockersstring[]yes (when outcome=needs_review or blocked)Issues preventing progress
callerRolestringrecommendedDeclared role for hop enforcement
actorstringCalling agent ID

Outcomes for gated tasks:

OutcomeEffect
"complete"Advance to next hop, or move to done if final hop
"needs_review"Reject back to origin hop; requires blockers
"blocked"Hold in current hop; requires blockers

Returns:

{
taskId: string;
status: TaskStatus; // New status after transition
}

Examples:

Standard task completion (no workflow):

{
"tool": "aof_task_complete",
"params": {
"taskId": "TASK-2026-02-21-001",
"summary": "Implemented JWT refresh token rotation. 12 tests passing.",
"actor": "swe-backend"
}
}

Gate completion — advance:

{
"tool": "aof_task_complete",
"params": {
"taskId": "TASK-2026-02-21-001",
"outcome": "complete",
"summary": "Feature implemented with full test coverage",
"actor": "swe-backend",
"callerRole": "developer"
}
}

Gate rejection — send back for fixes:

{
"tool": "aof_task_complete",
"params": {
"taskId": "TASK-2026-02-21-001",
"outcome": "needs_review",
"blockers": [
"Token rotation not implemented (old token remains valid)",
"Missing test for concurrent refresh requests"
],
"summary": "Needs fixes before approval",
"actor": "swe-architect",
"callerRole": "reviewer"
}
}

aof_task_update

Update a task’s status or body without completing it. Use for status changes, heartbeat renewals, and work log entries.

Parameters:

ParameterTypeRequiredDescription
taskIdstringyesTask ID or prefix
bodystringNew body content (replaces existing)
statusenumNew status (must be a valid transition)
reasonstringReason for status change (logged to events)
actorstringCalling agent ID

Returns:

{
taskId: string;
status: TaskStatus;
updatedAt: string; // ISO-8601
bodyUpdated: boolean;
transitioned: boolean;
}

Example (heartbeat / work log):

{
"tool": "aof_task_update",
"params": {
"taskId": "TASK-2026-02-21-001",
"body": "# Objective\nImplement JWT refresh.\n\n## Work Log\n- 15:00 Started implementation\n- 15:30 Core logic done, writing tests\n- 16:00 Tests passing, finalizing",
"actor": "swe-backend"
}
}

aof_task_edit

Edit task metadata: title, description, priority, or routing.

Parameters:

ParameterTypeRequiredDescription
taskIdstringyesTask ID or prefix
titlestringNew title
descriptionstringNew description (Markdown)
priorityenum"low" | "normal" | "high" | "critical"
routingobject{ role?, team?, agent?, tags? }
actorstringCalling agent ID

Returns:

{
taskId: string;
updatedFields: string[]; // Which fields changed
task: {
title: string;
status: TaskStatus;
priority: TaskPriority;
};
}

Example:

{
"tool": "aof_task_edit",
"params": {
"taskId": "TASK-2026-02-21-001",
"priority": "critical",
"routing": {
"agent": "swe-backend",
"tags": ["auth", "security", "urgent"]
},
"actor": "swe-architect"
}
}

aof_task_cancel

Cancel a task (moves to cancelled — terminal state).

Parameters:

ParameterTypeRequiredDescription
taskIdstringyesTask ID or prefix
reasonstringCancellation reason (logged)
actorstringCalling agent ID

Example:

{
"tool": "aof_task_cancel",
"params": {
"taskId": "TASK-2026-02-21-001",
"reason": "Superseded by TASK-2026-02-21-010",
"actor": "swe-architect"
}
}

aof_task_dep_add

Add a dependency to a task (task will be blocked until the blocker is done).

Parameters:

ParameterTypeRequiredDescription
taskIdstringyesThe dependent task
blockerIdstringyesTask that must complete first
actorstringCalling agent ID

Returns:

{
taskId: string;
blockerId: string;
dependsOn: string[]; // Full updated dependsOn array
}

aof_task_dep_remove

Remove a dependency from a task.

Parameters:

ParameterTypeRequiredDescription
taskIdstringyesThe dependent task
blockerIdstringyesDependency to remove
actorstringCalling agent ID

aof_task_block

Block a task on an external dependency not tracked as another task.

Parameters:

ParameterTypeRequiredDescription
taskIdstringyesTask to block
reasonstringyesWhat’s blocking progress
actorstringCalling agent ID

Example:

{
"tool": "aof_task_block",
"params": {
"taskId": "TASK-2026-02-21-001",
"reason": "Waiting for AWS credentials from platform team (ticket: INFRA-123)",
"actor": "swe-backend"
}
}

aof_task_unblock

Mark a blocked task as ready for dispatch.

Parameters:

ParameterTypeRequiredDescription
taskIdstringyesTask to unblock
actorstringCalling agent ID

aof_status

Get a status report of all tasks, optionally filtered by agent or status.

Parameters:

ParameterTypeRequiredDescription
agentstringFilter by agent ID
statusenumFilter by task status
compactbooleanReturn compact summary (default: false)
limitnumberMax tasks to return
actorstringCalling agent ID

Returns:

{
total: number;
byStatus: Record<TaskStatus, number>;
tasks: Array<{
id: string;
title: string;
status: TaskStatus;
agent?: string;
}>;
}

Example:

{
"tool": "aof_status",
"params": {
"agent": "swe-backend",
"status": "in-progress",
"compact": false,
"actor": "swe-backend"
}
}

Response:

{
"total": 2,
"byStatus": {
"in-progress": 2
},
"tasks": [
{
"id": "TASK-2026-02-21-001",
"title": "Implement JWT refresh token endpoint",
"status": "in-progress",
"agent": "swe-backend"
},
{
"id": "TASK-2026-02-21-002",
"title": "Add rate limiting middleware",
"status": "in-progress",
"agent": "swe-backend"
}
]
}

Tool Errors

All tools return structured errors when something goes wrong. Gate validation errors include teaching messages with the correct syntax:

Error: Task TASK-2026-02-21-001 is in a DAG workflow (current hop: "code-review").
Gate tasks REQUIRE an 'outcome' parameter. Use:
aofTaskComplete({
taskId: "TASK-2026-02-21-001",
outcome: "complete" | "needs_review" | "blocked",
summary: "..."
})
Current hop: code-review

This “progressive disclosure” pattern ensures agents learn the correct usage pattern from the error message itself.

Task ID Prefix Resolution

All tools accept either a full task ID (TASK-2026-02-21-001) or a unique prefix (TASK-2026-02-21, 2026-02-21-001). The tool searches for a unique match; if multiple tasks match the prefix, an error is returned.