Skip to main content

Governing agents

Agents and people
You decide what agents may do

An agent in Kanso is never more powerful than the person whose token it carries, and usually less. A site admin sets the rules for every agent in one place, and some actions are closed to agents under any setting. Every request an agent makes passes the same checks, in the same order, and a refusal always says which check stopped it.

AGENTa requestBearer kat_…1 · TOKENvalid, right scopenot expirednot revokedread or write2 · POLICYwhat agents may dothe hard wallpresets, switchesMCP on or off3 · THE OWNERthe owner's rightsnever more thanthe person's ownsession could do4 · THE WORKthe work's rulesworkflow guardsforms, leasespublic spacesCOMMITTEDone transactionrecorded withvia token401 unauthenticatedinsufficient_scopesession_requiredpolicy_forbids_…permission_denieda guard's reason…lease_enforcedsecret_detectedthe same four checks, in this order, on REST and on MCP
Every agent request passes four checks before anything is written. Each refusal names its check and leaves nothing behind: no change, no event, no partial write.

1 · The token​

An agent carries a personal API token. It acts as the person who minted it, so it can never reach more than that person can.

  • Scope is fixed at creation. A read token, the default, can only read. A write token can also create, update, comment, transition and link. To change the scope, revoke the token and mint another.
  • Every token expires. The default lifetime is 90 days (KANSO_TOKEN_DEFAULT_DAYS), and the ceiling is 365 days (KANSO_TOKEN_MAX_DAYS). An operator can raise the ceiling but cannot remove it.
  • Revocation is immediate. A revoked token fails on its very next request. A site admin can revoke or re-time anyone's token under Tokens.
  • A password change is the break-glass. Changing a password deletes every token that person owns, in the same transaction.

An expired token, a revoked token and a token whose owner was deactivated all answer the same 401 unauthenticated, so an attacker cannot tell which happened.

2 · The agent access policy​

A site admin sets the policy for every agent under Settings → AI access. You pick a preset and, if you need to, override single switches.

SwitchWhat it allows a token to doStrictStandard (default)Open
tokenAppAdminCreate and manage appsoffoffon
tokenConnectorAdminInstall and bind connectorsoffoffon
tokenCredentialAdminStore, update and delete credentialsoffoffon
tokenConfigAdminChange spaces, workflows, fields, forms, webhooks, exportoffoffon
tokenWaiversCreate and delete waiversoffoffon
tokenAttachmentsStart, complete and delete attachment uploadsononon
agentQuestionsToGuestsAsk questions of guest accountsononon
mcpThe MCP endpoint: on, read_only or offononon
mcpToolGroupsOptional MCP tool groups shownnoneapps, connectors, operationsapps, connectors, operations
leasesLeases advisory or enforcedadvisoryadvisoryadvisory

Standard follows one rule: nothing a token creates should keep acting after the token is revoked. That is why apps, connectors, credentials, configuration and waivers are opt-in. Strict also hides the optional tool groups. Every preset keeps the paths between agents and people open: tickets, comments, questions, answers, waiting, leases and attachments.

When a switch is off, the refusal says which switch it is and how to change it:

policy_forbids_token_config_admin: this operation is not allowed for an API token under the
current agent access policy. A site admin can allow it under Settings → AI access, or with
KANSO_AGENT_TOKEN_CONFIG_ADMIN when the environment manages the policy.

Turning a switch on never lifts the owner's own permissions. The token still cannot do anything its owner's session could not.

Managing the policy as code​

The Helm chart's agentPolicy block, or the KANSO_AGENT_* environment variables, set the policy from the environment. When they do, they win over the settings screen, and every refusal names where its value came from. The settings for each variable are in Configuration.

The hard wall​

Some actions are closed to every token under every preset, Open included. They need a person, signed in, in a browser:

  • People, groups, roles, and permission and security schemes
  • Resolutions, the Jira importer, email settings, and the agent access policy itself
  • The person's own profile and notification preferences
  • Whether a space is public
  • Every token and session operation: a token cannot mint, list, extend or revoke tokens, and cannot see or end sessions

The refusal is 403 session_required:

session_required: account administration is never available to an API token, under any
setting — sign in …

Three more rules hold even under Open, because they depend on what the request asks for:

  • A token never installs or administers a site-wide app. It must name a space.
  • A token never stores a credential by reference. It supplies the secret itself.
  • Whatever a token installs, publishes or replays must stay within what its own owner holds in that space (token_install_exceeds_holder).

3 · The owner's rights​

After the policy, the request meets the same permission engine a person meets. A token reaches exactly what its owner can reach in each space. Over MCP, a tool the owner could never use is not even listed. An agent cannot see a ticket its owner cannot see, because there is no separate MCP path to the data.

4 · The rules of the work​

Finally, the request meets the rules every writer meets:

  • Workflow guards. A guard that refuses a person's transition refuses the agent's too, for the same reason. An agent cannot write a status directly. It must take a transition.
  • Forms. Required and read-only fields are enforced inside the write.
  • Enforced leases. If an admin enforces leases, an agent cannot change a ticket another credential holds. See Agent fleets and leases.
  • Public spaces. Text written into a public space is scanned for secrets before it is written. An agent's write that matches is refused with secret_detected, and an agent can never override that. Only a signed-in person can choose Publish anyway, and that action is recorded. See Connect an agent.

Seeing and auditing the policy​

  • Any credential can ask what it meets: GET /api/v1/myself returns agentPolicy, with the preset, where it comes from, and every switch's effective value.
  • A site admin can read the whole catalogue with GET /api/v1/settings/agent-policy: every switch, which operations and MCP tools each one governs, the hard wall, and the presets.
  • Every change is recorded. GET /api/v1/settings/agent-policy/changes lists each change with who made it, when, and the old and new values.
{ "id": "apc_4", "version": 4, "changedAt": "2026-10-22T19:28:21.108475Z",
"changedBy": { "username": "admin", "name": "Administrator" },
"old": { "preset": "standard", "overrides": { "leases": "enforced" } },
"new": { "preset": "standard", "overrides": {} } }

For what agents did, as opposed to what they were allowed to do, see Accountability.