API reference
Base URL https://api.agent-works.ai. Authenticate with an API key from Workspace › API keys in the header Authorization: Bearer aw_ak_…; each key only reaches the scopes you gave it.
Chat completions, agent and knowledge (v1)
post/v1/agent/chat/completionsAgent Chat Completions
**Required scope:** `agents:run` Run an existing agent and return its final assistant message.
Required scope: agents:run
Request body · AgentCompletionRequest
| Field | Type | Description |
|---|---|---|
| agentId* | string | |
| messages | UIMessageIn[] | |
| stream | boolean | |
| output | OutputSpecIn | null | |
| maxSteps | integer | null | |
| imageResponseFormat | string | null | |
| conversationId | string | null |
Responses
200Successful Response422Validation Error
curl -X POST https://api.agent-works.ai/v1/agent/chat/completions \
-H "Authorization: Bearer $AGENTWORKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'post/v1/chat/completionsChat Completions
**Required scope:** `chat:write` OpenAI-compatible chat completion — streaming and non-streaming.
Required scope: chat:write
Request body · ChatCompletionRequest
| Field | Type | Description |
|---|---|---|
| model* | string | |
| messages | ChatMessageIn[] | |
| stream | boolean | |
| temperature | number |
Responses
200Successful Response422Validation Error
curl -X POST https://api.agent-works.ai/v1/chat/completions \
-H "Authorization: Bearer $AGENTWORKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'get/v1/knowledge/foldersKnowledge Folders
**Required scope:** `knowledge:read` List the knowledge bases ("folders") the API key's owning user may search — the accessible-KB set `POST /v1/knowledge/search` defaults to when `knowledgeBaseIds` is omitted.
Required scope: knowledge:read
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/v1/knowledge/folders \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
post/v1/knowledge/searchKnowledge Search
**Required scope:** `knowledge:read` Hybrid RAG search across the API key's accessible knowledge bases.
Required scope: knowledge:read
Request body · KnowledgeSearchRequest
| Field | Type | Description |
|---|---|---|
| query* | string | |
| knowledgeBaseIds | string[] | null | |
| topK | integer | null | |
| minScore | number | null | |
| hybrid | boolean |
Responses
200Successful Response422Validation Error
curl -X POST https://api.agent-works.ai/v1/knowledge/search \
-H "Authorization: Bearer $AGENTWORKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'get/v1/modelsList Models
**Required scope:** `chat:read` List the caller-tenant's allowed chat models, OpenAI ``/v1/models`` shape.
Required scope: chat:read
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/v1/models \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
Agents
get/agents/List all agents
**Required scope:** `agents:read`
Required scope: agents:read
Parameters
limitquery · integer | nulloffsetquery · integerviewquery · string`summary` cuts config.system_prompt to a 200-character preview.
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/agents/ \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
post/agents/runs/{run_id}/cancelCancel a run
**Required scope:** `agents:run` Cancel a running agent run. Marks as 'cancelled' and writes a chat message.
Required scope: agents:run
Parameters
run_idpath, required · string
Request body · CancelRunRequest | null
Responses
200Successful Response422Validation Error
curl -X POST https://api.agent-works.ai/agents/runs/{run_id}/cancel \
-H "Authorization: Bearer $AGENTWORKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'post/agents/runs/{run_id}/pausePause a run
**Required scope:** `agents:run` Pause a running agent run. Marks as 'paused' in the DB.
Required scope: agents:run
Parameters
run_idpath, required · string
Responses
200Successful Response422Validation Error
curl -X POST https://api.agent-works.ai/agents/runs/{run_id}/pause \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"post/agents/runs/{run_id}/resumeResume a run
**Required scope:** `agents:run` Resume a paused agent run. Marks as 'running'.
Required scope: agents:run
Parameters
run_idpath, required · string
Responses
200Successful Response422Validation Error
curl -X POST https://api.agent-works.ai/agents/runs/{run_id}/resume \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"post/agents/runs/{run_id}/retryRetry a failed or cancelled run
**Required scope:** `agents:run` Re-runs the agent that produced this run, in a brand-new chat + run with the same input.
Required scope: agents:run
Parameters
run_idpath, required · string
Responses
200Successful Response422Validation Error
curl -X POST https://api.agent-works.ai/agents/runs/{run_id}/retry \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"get/agents/{agent_id}Get an agent
**Required scope:** `agents:read` Fetch a specific agent (within own tenant only).
Required scope: agents:read
Parameters
agent_idpath, required · string
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/agents/{agent_id} \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"post/agents/{agent_id}/runStart an agent run
**Required scope:** `agents:run` Start a new run for the specified agent. Run executes asynchronously. Use GET /chats/{chat_id}/stream to follow progress.
Required scope: agents:run
Parameters
agent_idpath, required · string
Request body · StartRunRequest
| Field | Type | Description |
|---|---|---|
| triggered_by | string | |
| input | object | null | |
| origin_chat_id | string | null | |
| attachment_ids | string[] |
Responses
200Successful Response422Validation Error
curl -X POST https://api.agent-works.ai/agents/{agent_id}/run \
-H "Authorization: Bearer $AGENTWORKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'post/agents/{agent_id}/runs/{run_id}/respondAnswer an agent's mid-run question (HITL)
**Required scope:** `agents:run` Resume a run paused on an ask_user question. Pass `answer` for a free-text question or `values` for a fields question; the value is delivered to the agent as the ask_user tool's return.
Required scope: agents:run
Parameters
agent_idpath, required · stringrun_idpath, required · string
Request body · _RunRespondRequest
| Field | Type | Description |
|---|---|---|
| answer | string | null | |
| values | object | null | |
| decisions | object[] | null |
Responses
200Successful Response422Validation Error
curl -X POST https://api.agent-works.ai/agents/{agent_id}/runs/{run_id}/respond \
-H "Authorization: Bearer $AGENTWORKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'post/agents/{agent_id}/runs/{run_id}/stopStop a run (agent-scoped)
**Required scope:** `agents:run` Permanently stop a running or paused agent run. Cannot be resumed. Billing is final.
Required scope: agents:run
Parameters
agent_idpath, required · stringrun_idpath, required · string
Responses
200Successful Response422Validation Error
curl -X POST https://api.agent-works.ai/agents/{agent_id}/runs/{run_id}/stop \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"Tasks
get/tasksList Tasks
**Required scope:** `tasks:read` List tasks visible to the current user.
Required scope: tasks:read
Parameters
statusquery · string | nullproject_idquery · string | nullboard_idquery · string | nullBoard v2 (Phase 1c-6): when provided, filter to tasks on that specific board (membership verified). Omit to keep pre-Phase-1 behavior — RLS already restricts the rows the caller can see.ownerquery · string | null'me' or a user id; defaults to meassignee_typequery · string | nullFilter by 'user' or 'agent'assignee_idquery · string | nullFilter by specific assignee idinclude_archivedquery · booleanInclude archived tasks (default: hidden)done_since_daysquery · integerOnly return `done` tasks finished within this many days. Ignored when an explicit status filter is passed.limitquery · integeroffsetquery · integer
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/tasks \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
post/tasksCreate Task
**Required scope:** `tasks:write` Create a new task in the backlog (optionally as a sub-task).
Required scope: tasks:write
Request body · TaskCreate
| Field | Type | Description |
|---|---|---|
| title* | string | |
| description | string | |
| priority | string | |
| status | string | |
| executor_kind | string | |
| agent_id | string | null | |
| workflow_id | string | null | |
| scheduled_id | string | null | |
| board_id | string | null | |
| project_id | string | null | |
| parent_task_id | string | null | |
| acceptance_criteria | AcceptanceCriterion[] | |
| tags | string[] | |
| requires_approval | boolean | |
| approval_approver_ids | string[] | |
| approval_notify_in_app | boolean | |
| approval_notify_email | boolean | |
| assignee_type | string | null | |
| assignee_id | string | null | |
| due_date | string | null |
Responses
201Successful Response422Validation Error
curl -X POST https://api.agent-works.ai/tasks \
-H "Authorization: Bearer $AGENTWORKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'get/tasks/by-number/{ref}Get Task By Number
**Required scope:** `tasks:read` Resolve a task by human-readable identifier like 'AGW-42' or bare '42'.
Required scope: tasks:read
Parameters
refpath, required · string
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/tasks/by-number/{ref} \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"get/tasks/{task_id}Get Task
**Required scope:** `tasks:read`
Required scope: tasks:read
Parameters
task_idpath, required · string
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/tasks/{task_id} \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"patch/tasks/{task_id}Update Task
**Required scope:** `tasks:write` Update non-status fields of a task.
Required scope: tasks:write
Parameters
task_idpath, required · string
Request body · TaskUpdate
| Field | Type | Description |
|---|---|---|
| title | string | null | |
| description | string | null | |
| priority | string | null | |
| project_id | string | null | |
| acceptance_criteria | AcceptanceCriterion[] | null | |
| tags | string[] | null | |
| requires_approval | boolean | null | |
| approval_approver_ids | string[] | null | |
| approval_notify_in_app | boolean | null | |
| approval_notify_email | boolean | null | |
| due_date | string | null | |
| position | number | null | |
| max_runs_per_hour | integer | null | |
| budget_euros | number | null | |
| board_id | string | null |
Responses
200Successful Response422Validation Error
curl -X PATCH https://api.agent-works.ai/tasks/{task_id} \
-H "Authorization: Bearer $AGENTWORKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'delete/tasks/{task_id}Delete Task
**Required scope:** `tasks:write`
Required scope: tasks:write
Parameters
task_idpath, required · string
Responses
204Successful Response422Validation Error
curl -X DELETE https://api.agent-works.ai/tasks/{task_id} \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"patch/tasks/{task_id}/assigneeSet Assignee
**Required scope:** `tasks:write` Assign / unassign a task. Both type+id must be set together, or both null.
Required scope: tasks:write
Parameters
task_idpath, required · string
Request body · AssigneePayload
| Field | Type | Description |
|---|---|---|
| type | string | null | |
| id | string | null |
Responses
200Successful Response422Validation Error
curl -X PATCH https://api.agent-works.ai/tasks/{task_id}/assignee \
-H "Authorization: Bearer $AGENTWORKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'get/tasks/{task_id}/runsList Task Runs
**Required scope:** `tasks:read` All runs ever spawned for this task, newest first.
Required scope: tasks:read
Parameters
task_idpath, required · string
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/tasks/{task_id}/runs \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"patch/tasks/{task_id}/statusChange Status
**Required scope:** `tasks:write` Move task to a new column.
Required scope: tasks:write
Parameters
task_idpath, required · string
Request body · TaskStatusUpdate
| Field | Type | Description |
|---|---|---|
| status* | string | |
| position | number | null |
Responses
200Successful Response422Validation Error
curl -X PATCH https://api.agent-works.ai/tasks/{task_id}/status \
-H "Authorization: Bearer $AGENTWORKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'Workflows
get/workflows/List Workflows
**Required scope:** `workflows:read` List workflows with pagination (optimized — no N+1).
Required scope: workflows:read
Parameters
limitquery · integerItems per pageoffsetquery · integerNumber of items to skippagequery · integer | null1-based page number (alias for offset)per_pagequery · integer | nullItems per page (alias for limit)
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/workflows/ \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/workflows/run-usageGet Workflow Run Usage
**Required scope:** `workflows:read` the tenant's monthly WORKFLOW-RUN usage snapshot.
Required scope: workflows:read
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/workflows/run-usage \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/workflows/{workflow_id}Get Workflow
**Required scope:** `workflows:read` Get a single workflow with steps (agent names enriched).
Required scope: workflows:read
Parameters
workflow_idpath, required · string
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/workflows/{workflow_id} \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"post/workflows/{workflow_id}/runStart Workflow Run
**Required scope:** `workflows:run` Start a workflow run. Returns: shared_chat_id for SSE connection.
Required scope: workflows:run
Parameters
workflow_idpath, required · stringgroup_idquery · string | nulltestquery · boolean
Request body · WorkflowRunStartRequest | null
Responses
202Successful Response422Validation Error
curl -X POST https://api.agent-works.ai/workflows/{workflow_id}/run \
-H "Authorization: Bearer $AGENTWORKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'get/workflows/{workflow_id}/runsList Workflow Runs
**Required scope:** `workflows:read` List workflow runs with optional filtering and pagination.
Required scope: workflows:read
Parameters
workflow_idpath, required · stringstatusquery · string | nulldate_fromquery · string | nulldate_toquery · string | nullhad_objectionquery · boolean | nullTrue narrows to runs a human rejected a gate on and let continue. ANDs with `status`/dates.limitquery · integeroffsetquery · integer
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/workflows/{workflow_id}/runs \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"get/workflows/{workflow_id}/runs/summaryGet Workflow Runs Summary
**Required scope:** `workflows:read` Aggregate run stats for the Runs-tab stats row.
Required scope: workflows:read
Parameters
workflow_idpath, required · string
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/workflows/{workflow_id}/runs/summary \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"get/workflows/{workflow_id}/runs/{run_id}Get Workflow Run
**Required scope:** `workflows:read` Single-run detail — used by the run/execution view to poll status + rolled-up cost without re-fetching the whole runs list.
Required scope: workflows:read
Parameters
workflow_idpath, required · stringrun_idpath, required · string
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/workflows/{workflow_id}/runs/{run_id} \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"get/workflows/{workflow_id}/runs/{run_id}/stepsGet Workflow Run Steps
**Required scope:** `workflows:read` Get per-step execution data for live inspector.
Required scope: workflows:read
Parameters
workflow_idpath, required · stringrun_idpath, required · string
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/workflows/{workflow_id}/runs/{run_id}/steps \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"Runs
get/runsList agent run history
**Required scope:** `runs:read` Paginated list of agent runs for the current tenant. Prefer the ``cursor`` parameter for high-volume polling — the legacy ``offset`` parameter is deprecated (returns a ``Deprecation: true`` header).
Required scope: runs:read
Parameters
agent_idquery · string | nullstatusquery · string | nulllimitquery · integercursorquery · string | nullOpaque cursor from a previous response ``next_cursor`` field. When provided, returns the page of runs that follow the cursor.offsetquery · integer | nullDeprecated: use ``cursor`` instead. Triggers a Deprecation: true header.
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/runs \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/runs/{run_id}Get run details
**Required scope:** `runs:read` Fetch details of a single agent run.
Required scope: runs:read
Parameters
run_idpath, required · string
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/runs/{run_id} \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"Approvals
get/approvals/pending/listList Pending Approvals
**Required scope:** `approvals:read` List of all pending approvals (for own tenant via RLS).
Required scope: approvals:read
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/approvals/pending/list \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/approvals/{approval_id}Get Approval
**Required scope:** `approvals:read` Fetch a specific approval the caller is entitled to see.
Required scope: approvals:read
Parameters
approval_idpath, required · string
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/approvals/{approval_id} \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"get/workflows/approvals/pendingList Pending Workflow Approvals
**Required scope:** `approvals:read` Tenant-scoped list of pending rows the CALLER may decide (spec §3.3 — filtered by §3.4 authz; a non-approver never sees rows they cannot act on).
Required scope: approvals:read
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/workflows/approvals/pending \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
Analytics
get/admin/agents/statsAgent Stats
**Required scope:** `analytics:read` Full stats per agent: runs, success rate, cost, tokens, top users.
Required scope: analytics:read
Parameters
daysquery · integer
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/admin/agents/stats \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/admin/agents/usage-by-teamUsage By Team
**Required scope:** `analytics:read` Which teams use which agents, and how much.
Required scope: analytics:read
Parameters
daysquery · integer
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/admin/agents/usage-by-team \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/admin/agents/usage-by-userUsage By User
**Required scope:** `analytics:read` Which users use which agents, and how much.
Required scope: analytics:read
Parameters
daysquery · integer
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/admin/agents/usage-by-user \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/admin/wallet/org/spend-by-agentOrg Spend By Agent
**Required scope:** `analytics:read` Admin/Owner/TeamManager: spending per agent within own organization.
Required scope: analytics:read
Parameters
daysquery · integer
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/admin/wallet/org/spend-by-agent \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/admin/wallet/org/spend-by-modelOrg Spend By Model
**Required scope:** `analytics:read` Aggregate spend per LLM model for own organization.
Required scope: analytics:read
Parameters
daysquery · integer
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/admin/wallet/org/spend-by-model \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/admin/wallet/org/spend-by-teamOrg Spend By Team
**Required scope:** `analytics:read` Aggregate spend per team for own organization.
Required scope: analytics:read
Parameters
daysquery · integer
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/admin/wallet/org/spend-by-team \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/admin/wallet/org/spend-by-userOrg Spend By User
**Required scope:** `analytics:read` Admin/Owner/TeamManager: spending per user within own organization.
Required scope: analytics:read
Parameters
daysquery · integer
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/admin/wallet/org/spend-by-user \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/admin/wallet/org/spend-over-timeOrg Spend Over Time
**Required scope:** `analytics:read` Daily spend buckets for the org. Used for charts.
Required scope: analytics:read
Parameters
daysquery · integer
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/admin/wallet/org/spend-over-time \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/admin/wallet/team-statsTeam-scoped usage stats, grouped by member/agent/team/day
**Required scope:** `analytics:read` Team-scoped usage stats: per member (full roster incl. €0-spend members), per agent, per team, or per day. ``team_id`` narrows to one (visible) team; omitted = every visible team.
Required scope: analytics:read
Parameters
daysquery · integergroup_byquery · stringteam_idquery · string | null
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/admin/wallet/team-stats \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/dashboard/statsGet Dashboard Stats
**Required scope:** `analytics:read` Dashboard statistics: agents, runs, pending approvals (for own tenant).
Required scope: analytics:read
Parameters
tzquery · string
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/dashboard/stats \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/insights/summaryInsights Summary
**Required scope:** `analytics:read` Tenant-wide activity + cost roll-up for the Usage & Insights Overview tab.
Required scope: analytics:read
Parameters
periodquery · stringLook-back window — one of today, 7d, 30d, 90d, month.
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/insights/summary \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/settings/entitlementsPlan entitlements + current usage for the caller's tenant
**Required scope:** `analytics:read` Server-authoritative plan entitlements (caps, features, current usage, upgrade targets) for the caller's tenant. Plan is resolved server-side (never client-supplied).
Required scope: analytics:read
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/settings/entitlements \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/walletGet wallet balance
**Required scope:** `analytics:read` Fetch the euro-wallet balance for the current tenant, incl. today and last 30d spent.
Required scope: analytics:read
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/wallet \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/wallet/monthly-statementSingle monthly statement (value-first rollup)
**Required scope:** `analytics:read` One statement for the tenant's month — subscription + usage + agent-runs rolled into a value-first headline with detail lines (businessplan §2.12).
Required scope: analytics:read
Parameters
monthquery · string | null
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/wallet/monthly-statement \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
get/wallet/my-usagePersonal usage stats
**Required scope:** `analytics:read` Personal spend stats for the current user (not org-wide).
Required scope: analytics:read
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/wallet/my-usage \ -H "Authorization: Bearer $AGENTWORKS_API_KEY"
Agencies
get/agency/clients/{client_id}/usageGet Client Usage
**Required scope:** `agency-usage:read` Runs, tokens and cost per agent of one client, for `month` (default: this one, UTC).
Required scope: agency-usage:read
Parameters
client_idpath, required · stringmonthquery · string | null
Responses
200Successful Response422Validation Error
curl -X GET https://api.agent-works.ai/agency/clients/{client_id}/usage \
-H "Authorization: Bearer $AGENTWORKS_API_KEY"