Choose how to connect
Use service accounts for CI and automation. Use the skill for Claude Code or Codex.
Service accounts
- Open Settings → Agent access and click Create service account.
- Give it a name, then pick an access preset or check individual scopes.
- Copy the Client ID, Client secret, and Terminal environment block. The dashboard shows the secret once.
KONTEXT_CLIENT_ID, KONTEXT_CLIENT_SECRET, and KONTEXT_SCOPES. Request an access token with the OAuth client credentials grant:
access_token on every call:
Connected agents
Follow the two steps in Connect an agent. First, install the skill:Scopes and routes
Each area in Settings → Agent access maps to a read scope and a write scope. A write scope also grants read.
You can apply these presets:
Kontext checks the role of the person the caller acts as. Policy, directory, settings and API key routes require an owner or admin.
First request
SetKONTEXT_ACCESS_TOKEN to your token. With management:logs:read, you can list the five latest decisions through this read-only request.
items array and nextCursor. Pass nextCursor as cursor for the next page. Filter with sessionId, from, and to.
Errors
If the caller lacks a required scope, Kontext names it in the response body and
WWW-Authenticate header.