https://api.kapso.ai/platform/v1. Authenticate with the X-API-Key header. Full endpoint reference: Kapso Agent API.
List modes
available_invocations includes api accept runs: built-in modes with the API trigger enabled, and custom modes with the api surface. Get one mode with GET /kapso-agent/modes/:mode.
List sessions
List the sessions for a built-in or custom mode:limit defaults to 20 and has a maximum of 100. Pass paging.next as after to get the next page.
Get a session
Get a session and its runs:data.session and its newest API runs in data.runs. Pagination applies only to the runs.
The session-level run_count and latest_run describe the full session, not only the current page.
Session history omits the result for each run. Get a run by its run_id when you need the completed result.
Create a run
202 Accepted):
input.promptis required for the generic trigger.findings-investigatoruses an optionalinput.finding_idinstead - without it, the run investigates the next eligible finding - and doesn’t acceptconversation_id.- Triggering a mode that doesn’t accept API runs returns
422. - Pass
conversation_idto continue an existing session. It only works for sessions created with the same API key and the same mode. metadatais stored on the run and echoed back in webhooks.- Requests are not idempotent - repeating one creates a new run.
- There’s no model parameter. Runs use the model configured for the mode, or the project default.
Poll a run
queued, running, paused, waiting_for_approval, completed, failed, cancelled.
A completed run includes a result:
404.
Control a run
POST /kapso-agent/runs/:id/pause, /resume, and /cancel. Invalid transitions (for example, cancelling a completed run) return 409.
Approvals
When a run needs approval its status becomeswaiting_for_approval and pending_approval is set:
Webhooks
Subscribe to Kapso Agent run events instead of polling:kapso_agent.run.approval_requiredkapso_agent.run.completedkapso_agent.run.failedkapso_agent.run.cancelled
id is a deterministic SHA-256 hash of the run, event, and approval, so redeliveries carry the same id. Failed and cancelled runs include error with code (run_failed or run_cancelled) and message. Deliveries are signed with HMAC-SHA256 like all project webhooks - see webhook security.
