kosa8 docs Dashboard
esc
↑ ↓ move↵ openRuns in your browser; nothing you type is sent anywhere.

HTTP API / Autopilot

Autopilot

25 endpoints at https://api.kosa8.com, sent with Authorization: Bearer $KOSA8_API_KEY. Generated from the API's own OpenAPI description, which a test holds to the router.

Autopilot's triggers, typed actions and tiers#

GET/v1/bots/catalogpublic

Public.

Responses
200
curl -s -X GET https://api.kosa8.com/v1/bots/catalog

Bot templates, ranked for this organization#

GET/v1/bot-templatesscope sandboxes:read
Responses
200401403
curl -s -X GET https://api.kosa8.com/v1/bot-templates \
  -H "Authorization: Bearer $KOSA8_API_KEY"

One bot template#

GET/v1/bot-templates/{id}scope sandboxes:read
Parameters
idrequiredpath · string
Template id
Responses
200401403404
curl -s -X GET https://api.kosa8.com/v1/bot-templates/$SBX \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Compile a bot without saving it: the plan, and with replay the last 7 days#

POST/v1/bots/planscope sandboxes:read
JSON body
templatestring
A template id (spend-guard, …)
specobject
—
spec.triggersrequiredarray of object
Each trigger's params beside event; see GET /v1/bots/catalog
spec.actionsrequiredarray of object
Typed actions only; the engine computes each tier. Never possible (400 forbidden_action): github.merge, github.approve, github.mark_ready, github.push_default_branch, github.force_push, token.widen, spend.past_cap, email.send, act_on_non_writer, protected.touch
spec.scopeobject
—
spec.budget_usdnumber
Monthly budget; steps that cost money need one. Guard bots cost nothing.
spec.notifyobject
—
spec.dedup_sinteger
Once per subject per this many seconds (default 86400)
spec.rate_per_hourinteger
Runs at most this many times an hour (default 30)
spec.chainboolean
Listen to events other bots caused (depth ≤ 2). Default false.
namestring
—
scopeobject
—
budget_usdnumber
—
notifyobject
—
replayboolean
—
Responses
200400401403404
curl -s -X POST https://api.kosa8.com/v1/bots/plan \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json

Turn one sentence into a bot spec (never saved, never on)#

POST/v1/bots/compilescope sandboxes:read

Through kosa8's AI gateway, included at no charge, with a rules fallback; a person always sees the plan before a bot turns on.

JSON body
textrequiredstring
≤ 500 characters
Responses
200400401403422
curl -s -X POST https://api.kosa8.com/v1/bots/compile \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json

Pause every bot in the organization#

POST/v1/bots/pause-allscope admin

Running work is left alone. Any admin credential, an agent's too.

Responses
200401403
curl -s -X POST https://api.kosa8.com/v1/bots/pause-all \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Resume every bot#

POST/v1/bots/resume-allscope admin

Needs a person: a dashboard session or an API key made for a member. Capability tokens, MCP sessions, org keys bound to no member and bots get 403 human_required.

Responses
200401403
curl -s -X POST https://api.kosa8.com/v1/bots/resume-all \
  -H "Authorization: Bearer $KOSA8_API_KEY"

The organization's bots#

GET/v1/botsscope sandboxes:read
Responses
200401403
curl -s -X GET https://api.kosa8.com/v1/bots \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Create a bot (always a draft)#

POST/v1/botsscope sandboxes:write
JSON body
templatestring
A template id (spend-guard, …)
specobject
—
spec.triggersrequiredarray of object
Each trigger's params beside event; see GET /v1/bots/catalog
spec.actionsrequiredarray of object
Typed actions only; the engine computes each tier. Never possible (400 forbidden_action): github.merge, github.approve, github.mark_ready, github.push_default_branch, github.force_push, token.widen, spend.past_cap, email.send, act_on_non_writer, protected.touch
spec.scopeobject
—
spec.budget_usdnumber
Monthly budget; steps that cost money need one. Guard bots cost nothing.
spec.notifyobject
—
spec.dedup_sinteger
Once per subject per this many seconds (default 86400)
spec.rate_per_hourinteger
Runs at most this many times an hour (default 30)
spec.chainboolean
Listen to events other bots caused (depth ≤ 2). Default false.
namestring
—
scopeobject
—
budget_usdnumber
—
notifyobject
—
sponsorstring
A member's email; defaults to the person calling
Responses
201400401403404409
curl -s -X POST https://api.kosa8.com/v1/bots \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json

One bot, with its spec and plan#

GET/v1/bots/{id}scope sandboxes:read
Parameters
idrequiredpath · string
Bot id (bot_…)
Responses
200401403404
curl -s -X GET https://api.kosa8.com/v1/bots/$SBX \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Change a bot; a new spec is a new version#

PATCH/v1/bots/{id}scope sandboxes:write

A spec changed by no person turns an enabled bot back into a draft.

Parameters
idrequiredpath · string
Bot id (bot_…)
JSON body
namestring
—
specobject
—
spec.triggersrequiredarray of object
Each trigger's params beside event; see GET /v1/bots/catalog
spec.actionsrequiredarray of object
Typed actions only; the engine computes each tier. Never possible (400 forbidden_action): github.merge, github.approve, github.mark_ready, github.push_default_branch, github.force_push, token.widen, spend.past_cap, email.send, act_on_non_writer, protected.touch
spec.scopeobject
—
spec.budget_usdnumber
Monthly budget; steps that cost money need one. Guard bots cost nothing.
spec.notifyobject
—
spec.dedup_sinteger
Once per subject per this many seconds (default 86400)
spec.rate_per_hourinteger
Runs at most this many times an hour (default 30)
spec.chainboolean
Listen to events other bots caused (depth ≤ 2). Default false.
sponsorstring
—
budget_usdnumber
—
scopeobject
—
notifyobject
—
Responses
200400401403404
curl -s -X PATCH https://api.kosa8.com/v1/bots/$SBX \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json

Delete a bot (its runs stay)#

DELETE/v1/bots/{id}scope sandboxes:write
Parameters
idrequiredpath · string
Bot id (bot_…)
Responses
200401403404
curl -s -X DELETE https://api.kosa8.com/v1/bots/$SBX \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Turn a bot on#

POST/v1/bots/{id}/enablescope sandboxes:write

Needs a person: a dashboard session or an API key made for a member. Capability tokens, MCP sessions, org keys bound to no member and bots get 403 human_required.

Parameters
idrequiredpath · string
Bot id (bot_…)
Responses
200401403404409
curl -s -X POST https://api.kosa8.com/v1/bots/$SBX/enable \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Turn a bot off#

POST/v1/bots/{id}/disablescope sandboxes:write
Parameters
idrequiredpath · string
Bot id (bot_…)
Responses
200401403404
curl -s -X POST https://api.kosa8.com/v1/bots/$SBX/disable \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Run a bot now, or a dry run with a replay of the last 7 days#

POST/v1/bots/{id}/runsscope sandboxes:write

A dry run changes nothing and is never billed.

Parameters
idrequiredpath · string
Bot id (bot_…)
JSON body
dry_runboolean
—
Responses
201401403404409423
curl -s -X POST https://api.kosa8.com/v1/bots/$SBX/runs \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json

A bot's runs, newest first#

GET/v1/bots/{id}/runsscope sandboxes:read
Parameters
idrequiredpath · string
Bot id (bot_…)
limitquery · integer
Default 20
Responses
200401403404
curl -s -X GET https://api.kosa8.com/v1/bots/$SBX/runs \
  -H "Authorization: Bearer $KOSA8_API_KEY"

One run and its steps#

GET/v1/bot-runs/{id}scope sandboxes:read
Parameters
idrequiredpath · string
Run id (brun_…)
Responses
200401403404
curl -s -X GET https://api.kosa8.com/v1/bot-runs/$SBX \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Cancel a run (its pending approvals are rejected)#

POST/v1/bot-runs/{id}/cancelscope sandboxes:write
Parameters
idrequiredpath · string
Run id (brun_…)
Responses
200401403404409
curl -s -X POST https://api.kosa8.com/v1/bot-runs/$SBX/cancel \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Undo a step (wake, unblock its own block, lift its own refusal)#

POST/v1/bot-runs/{id}/steps/{key}/undoscope sandboxes:write
Parameters
idrequiredpath · string
Run id (brun_…)
keyrequiredpath · string
Step key
Responses
200401403404409
curl -s -X POST https://api.kosa8.com/v1/bot-runs/$SBX/steps/$KEY/undo \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Bot steps waiting for a person, and decided ones#

GET/v1/approvalsscope sandboxes:read
Parameters
statequery · "pending" | "decided" | "all"
Default pending
limitquery · integer
Default 50
Responses
200401403
curl -s -X GET https://api.kosa8.com/v1/approvals \
  -H "Authorization: Bearer $KOSA8_API_KEY"

One approval with its raw arguments#

GET/v1/approvals/{id}scope sandboxes:read
Parameters
idrequiredpath · string
Approval id (appr_…)
Responses
200401403404
curl -s -X GET https://api.kosa8.com/v1/approvals/$SBX \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Approve or reject a bot's step#

POST/v1/approvals/{id}/decidescope sandboxes:read

Needs a person: a dashboard session or an API key made for a member. Capability tokens, MCP sessions, org keys bound to no member and bots get 403 human_required. The person's role must cover the action (admin for billing, unblocking and freezing).

Parameters
idrequiredpath · string
Approval id (appr_…)
JSON body
decisionrequired"approve" | "reject"
—
reasonstring
—
edited_argsobject
Checked against the action's schema
Responses
200400401403404409
curl -s -X POST https://api.kosa8.com/v1/approvals/$SBX/decide \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json

Two-way channels: Slack (interactive approvals) and GitHub#

GET/v1/connectionsscope sandboxes:read
Responses
200401403
curl -s -X GET https://api.kosa8.com/v1/connections \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Start connecting the kosa8 Slack app#

POST/v1/connections/slack/installscope admin

Post-only: it never reads channel history.

Responses
200401403501
curl -s -X POST https://api.kosa8.com/v1/connections/slack/install \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Disconnect the kosa8 Slack app#

DELETE/v1/connections/slackscope admin
Responses
200401403
curl -s -X DELETE https://api.kosa8.com/v1/connections/slack \
  -H "Authorization: Bearer $KOSA8_API_KEY"

The kosa8 weekly

Agent security news, one industry deep-dive and a hands-on challenge, every Monday. Unsubscribe in one click.

© 2026 kosa8 · kosa8.com · Zero Trust cybersecurity infrastructure for AI agents · Local models served by llamay · Agent gateway: MAQPNA