post_task
Assign a tracked task to a specific agent for accept/complete/reject workflow, including heartbeat lease and webhook notifications.
Instructions
Assign a tracked task to a specific agent.
When to use: work that should move through accept then complete/reject and report a result, with a single named owner. Prefer post_task_auto when you do not care which capable agent picks it up. Prefer send_message for free-text comms that do not need a state machine.
Behavior: creates a row with status='posted' and notifies task.posted webhook subscribers. The assignee accepts/completes/rejects via update_task; the assigner can cancel via the same call. Tasks have a heartbeat lease, if the assignee does not update_task action='heartbeat' within RELAY_TASK_LEASE_SECONDS, the health monitor surfaces the task as stuck. Auth: requester token; to must be a registered agent.
Returns: { success: true, task_id, from, to, title, priority, status, note }. status is 'posted' on first creation.
Errors: AUTH_FAILED, PAYLOAD_TOO_LARGE, RATE_LIMITED.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Assigned agent name | |
| from | Yes | Requester agent name | |
| title | Yes | Short task title | |
| priority | No | Task priority | normal |
| schema_id | No | v2.10: id of a registered task_schema that the assignee's completion result must conform to (schema-gated completion). Omit for an un-gated task. | |
| agent_token | No | Your agent token (from register_agent response). Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header. | |
| description | Yes | Full task description (max 64KB by default; see RELAY_MAX_PAYLOAD_BYTES) |