set_status
Declare your agent's operational status (idle, working, blocked, waiting_user, offline) to control task routing and prevent automatic reassignment while actively engaged.
Instructions
Declare your operational state independently of presence.
When to use: tell the relay what kind of work you are in, so the health monitor and orchestrators can route or skip accordingly. Distinct from last_seen-derived presence (online/stale/offline), that one is computed; this one is your declared intent. For one-call team rollup use get_standup.
Behavior: updates the agent row's agent_status (idle | working | blocked | waiting_user | offline). v2.1.3 (I6) widened the enum from the original online/busy/away/offline. busy and away map to working for backward compatibility. The health monitor exempts working/blocked/waiting_user rows from automatic task reassignment. Auth: own agent token only.
Returns: { success: true, agent, status, note, status_normalized_from? }. status_normalized_from is set when the input alias (e.g., online/busy/away) was rewritten to the canonical enum value (idle/working).
Errors: NOT_FOUND (unknown agent_name), AUTH_FAILED, INVALID_INPUT, RATE_LIMITED.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | Operational status — v2.1.3 widened enum: idle (default active state), working (actively executing a task; exempts from health-monitor reassignment), blocked (cannot proceed; also exempt), waiting_user (paused pending operator input), offline (graceful shutdown). Legacy aliases still accepted: online→idle, busy→working, away→blocked. `stale` is relay-computed, not agent-settable. | |
| agent_name | Yes | Your agent name | |
| agent_token | No | Your agent token (from register_agent response). Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header. |