Queue work for the personal assistant
Chat, ask, and agent turns — plus enqueue, edit, reorder, and confirm.
Queue work for the personal assistant
The personal assistant classifies each turn. Conversation gets a reply. Look-ups do one read. Complex goals draft a plan, then work through moves.
Spawn
POST /v1/api/agi/runs
Authorization: Bearer <token>
Content-Type: application/json
{
"plane": "personal",
"goal": "Plan my morning"
}
Save capToken from the response. It is returned once.
Optional: seed tasks: [{ message, title? }] if you already know the queue. Otherwise let an agent turn draft moves.
Send a turn
POST /v1/api/agi/runs/:runId/step
Authorization: Bearer <token>
Content-Type: application/json
{
"message": "What's on my calendar, then remind me to pay rent",
"capToken": "<from spawn>",
"execute": true,
"mode": "auto"
}
| Field | Meaning |
|---|---|
mode |
auto (default), chat, or agent |
execute |
Run tools when acting/asking (default true). Planning turns never execute. |
forceReplan |
Discard the current plan and draft again |
Read phase
| Phase | What to show |
|---|---|
chat |
reply (conversation) |
ask |
reply after one look-up |
planned |
agentPlan checklist — call /step again to act |
acting |
Move progress; maybe confirm a write |
done |
Finished |
Also read routing.model and optional thinking.
Continue an agent plan
After planned, call /step again with the same capToken. Omit message to advance the next move, or send a chatty message to talk without abandoning the plan.
Manage tasks (optional)
| Action | Request |
|---|---|
| List | GET /v1/api/agi/runs/:runId/tasks |
| Add | POST /v1/api/agi/runs/:runId/tasks with message |
| Edit | PATCH /v1/api/agi/runs/:runId/tasks/:taskId (queued only) |
| Reorder | POST /v1/api/agi/runs/:runId/tasks/reorder with all queued taskIds |
| Cancel | POST /v1/api/agi/runs/:runId/tasks/:taskId/cancel (queued only) |
Confirm writes
When action.status is awaiting_confirm:
POST /v1/api/agi/runs/:runId/interrupts/:interruptId/decide
Authorization: Bearer <token>
Content-Type: application/json
{ "decision": "approved" }
Use "denied" to reject. Then continue with /step.
Skills (reusable instructions)
Save markdown playbooks the assistant can load when planning:
| Action | Request |
|---|---|
| List | GET /v1/api/agi/skills |
| Create | POST /v1/api/agi/skills with name, description, body, optional triggers |
| Update | PATCH /v1/api/agi/skills/:skillId |
| Delete | DELETE /v1/api/agi/skills/:skillId |
When a skill is used, /step includes skillsUsed.
Subagents
Delegate a slice of work to a child run with a narrower tool allowlist:
POST /v1/api/agi/runs/:runId/subagents
Authorization: Bearer <token>
Content-Type: application/json
{
"message": "Check inbox for invoices",
"toolAllowlist": ["mail.read"],
"goal": "Mail check"
}
List children with GET /v1/api/agi/runs/:runId/subagents. Parent step responses may include subagents. Killing the parent stops its children.
Missing capability (propose, then confirm)
If the request needs something outside first-party tools and no skill covers it, /step returns bootstrap with an interrupt. Approve to install the proposed skill and continue; deny to stop. Do not treat this as a hard client failure.
