Create Agent
Hire an agent into the company. The agent starts `idle`. With `request_approval: true` it starts `pending_approval` instead and a `hire_agent` approval is opened; approving it makes the agent `idle`, rejecting it terminates the agent. `reports_to_id` must be an agent in this company (404 `NOT_FOUND` otherwise). `monthly_budget_cents` is in integer cents; `0` means no limit. Any member may call this. Publishes `agent.created` (and `approval.created` when an approval was opened).
Hire an agent into the company.
The agent starts idle. With request_approval: true it starts
pending_approval instead and a hire_agent approval is opened; approving it
makes the agent idle, rejecting it terminates the agent. reports_to_id must
be an agent in this company (404 NOT_FOUND otherwise). monthly_budget_cents
is in integer cents; 0 means no limit. Any member may call this. Publishes
agent.created (and approval.created when an approval was opened).
HTTPBearerAuthorizationBearer <token>company_id*Company Iduuidapplication/json- body
adapter?Adapterlength <= 50"claude_code"capabilities?array<string>[]heartbeat_cron?string|nullinstructions?string|nullmonthly_budget_cents?Monthly Budget Cents0 <= value0name*Name1 <= length <= 100reports_to_id?|nullrequest_approval?Request Approvalfalserole?Rolelength <= 50"engineer"title?|nullSuccessful Response
application/json- response
adapter*string|nullavatar_seed*Avatar Seedcapabilities*array<unknown>|nullcompany_id*|nullcreated_at*|nullheartbeat_cron*string|nullid*Iduuidinstructions*string|nulllast_activity*|nullmonthly_budget_cents*Monthly Budget Centsname*Nameopen_tasks?Open Tasks0reports_to_id*|nullrole*string|nullspend_mtd_cents?Spend Mtd Cents0status*Statustitle*string|nullcurl -X POST "https://example.com/api/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/agents" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "adapter": "string", "avatar_seed": 0, "capabilities": [ null ], "company_id": "b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf", "created_at": "2019-08-24T14:15:22Z", "heartbeat_cron": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "instructions": "string", "last_activity": "2019-08-24T14:15:22Z", "monthly_budget_cents": 0, "name": "string", "open_tasks": 0, "reports_to_id": "9a08cb01-6bdc-412f-ad45-35a6f5d74f8e", "role": "string", "spend_mtd_cents": 0, "status": "string", "title": "string"}List Agents GET
List the company's agents, oldest first, with month-to-date stats. Each agent includes `spend_mtd_cents` (run cost since the first of the current UTC month) and `open_tasks` (assigned tasks in `backlog`, `todo`, `in_progress`, `in_review` or `blocked`). Terminated agents are left out unless `include_terminated=true`.
Get Agent GET
Get one agent with its month-to-date spend and open task count. Answers 404 `NOT_FOUND` when the agent does not belong to this company.