Skip to main content
Trigger agent runs through the Platform API with your project API key. Runs execute asynchronously: create a run, then poll it or receive lifecycle events through project webhooks. Base URL: https://api.kapso.ai/platform/v1. Authenticate with the X-API-Key header. Full endpoint reference: Kapso Agent API.

List modes

Returns every mode. Only modes whose 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:
Sessions are ordered by most recent activity. Results include only API runs created with the same API key.
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:
The response contains the session in 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

Response (202 Accepted):
  • input.prompt is required for the generic trigger. findings-investigator uses an optional input.finding_id instead - without it, the run investigates the next eligible finding - and doesn’t accept conversation_id.
  • Triggering a mode that doesn’t accept API runs returns 422.
  • Pass conversation_id to continue an existing session. It only works for sessions created with the same API key and the same mode.
  • metadata is 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

Statuses: queued, running, paused, waiting_for_approval, completed, failed, cancelled. A completed run includes a result:
Only runs created via the API with the same API key can be retrieved or controlled. Anything else returns 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 becomes waiting_for_approval and pending_approval is set:
Approve or reject:

Webhooks

Subscribe to Kapso Agent run events instead of polling:
  • kapso_agent.run.approval_required
  • kapso_agent.run.completed
  • kapso_agent.run.failed
  • kapso_agent.run.cancelled
These fire only for runs triggered through the API. Dashboard and Slack runs don’t emit them.
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.