Get Dashboard
Get the company overview: agents, tasks, spend, approvals and a daily series. `days` sets the series length and must be 7, 14 or 30 (422 `VALIDATION_ERROR` otherwise); each day counts succeeded and failed runs, tasks created and completed, and run cost. Spend is month-to-date in integer cents; a `monthly_budget_cents` of `0` means no limit. `active_runs` lists up to 20 queued or running runs; `for_you` covers open tasks the caller created.
Get the company overview: agents, tasks, spend, approvals and a daily series.
days sets the series length and must be 7, 14 or 30 (422 VALIDATION_ERROR
otherwise); each day counts succeeded and failed runs, tasks created and
completed, and run cost. Spend is month-to-date in integer cents; a
monthly_budget_cents of 0 means no limit. active_runs lists up to 20
queued or running runs; for_you covers open tasks the caller created.
HTTPBearerAuthorizationBearer <token>company_id*Company Iduuiddays?DaysLength of the daily series: 7, 14 or 30
14Successful Response
application/json- response
active_runs*array<>agents_paused*Agents Pausedagents_running*Agents Runningagents_total*Agents Totalfor_you?|nullmonthly_budget_cents*Monthly Budget Centspending_approvals*Pending Approvalsrange_days?Range Days14series*array<>spend_mtd_cents*Spend Mtd Centstasks_blocked*Tasks Blockedtasks_by_priority*tasks_by_status*tasks_in_progress*Tasks In Progresscurl -X GET "https://example.com/api/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/dashboard"{ "active_runs": [ { "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978", "cost_cents": 0, "created_at": "2019-08-24T14:15:22Z", "ended_at": "2019-08-24T14:15:22Z", "error": "string", "heartbeat_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "routine_id": "f53c5ff7-cfb7-4f43-8b79-3421a01d8e2a", "runner_id": "string", "started_at": "2019-08-24T14:15:22Z", "status": "string", "summary": "string", "task_id": "736fde4d-9029-4915-8189-01353d6982cb", "tokens_in": 0, "tokens_out": 0, "trigger": "string" } ], "agents_paused": 0, "agents_running": 0, "agents_total": 0, "for_you": { "blocked_tasks": 0, "open_tasks": 0, "recent": [ { "assignee_agent_id": "8ff43445-51ff-4235-b9d4-d8007d4d5dc3", "completed_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "created_by_agent_id": "acd3b99b-57bd-46a1-809a-5d915f3c2609", "created_by_user_id": "209f54c4-4c33-43bc-9c6a-ef4c65ad7473", "description": "string", "due_date": "2019-08-24T14:15:22Z", "goal_id": "3854d9ad-4bca-4a70-a63e-7c6bc2f12aee", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "key": "string", "number": 0, "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef", "priority": "string", "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9", "sort_order": 0, "started_at": "2019-08-24T14:15:22Z", "status": "string", "title": "string", "updated_at": "2019-08-24T14:15:22Z" } ] }, "monthly_budget_cents": 0, "pending_approvals": 0, "range_days": 14, "series": [ { "cost_cents": 0, "date": "string", "runs_failed": 0, "runs_succeeded": 0, "tasks_completed": 0, "tasks_created": 0 } ], "spend_mtd_cents": 0, "tasks_blocked": 0, "tasks_by_priority": { "property1": 0, "property2": 0 }, "tasks_by_status": { "property1": 0, "property2": 0 }, "tasks_in_progress": 0}Get Costs GET
Get spend for one calendar month, by agent and by project. `month` is `YYYY-MM` (default: the current UTC month). Amounts are integer cents; a budget of `0` means no limit. Each line also has run and token counts. Terminated agents appear only if they have spend that month; runs without a project are grouped under "No project" with `id: null`. Lines are sorted by spend, highest first.
Stream Company Events GET
Server-sent events for everything that changes in the company. Each message is `data: {"type": "task.updated", "id": "...", ...}`. Clients refetch what changed. Authenticate with the usual Bearer header (read the stream with fetch, since EventSource cannot send headers).