Governing agents
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.
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
readtoken, the default, can only read. Awritetoken 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.
| Switch | What it allows a token to do | Strict | Standard (default) | Open |
|---|---|---|---|---|
tokenAppAdmin | Create and manage apps | off | off | on |
tokenConnectorAdmin | Install and bind connectors | off | off | on |
tokenCredentialAdmin | Store, update and delete credentials | off | off | on |
tokenConfigAdmin | Change spaces, workflows, fields, forms, webhooks, export | off | off | on |
tokenWaivers | Create and delete waivers | off | off | on |
tokenAttachments | Start, complete and delete attachment uploads | on | on | on |
agentQuestionsToGuests | Ask questions of guest accounts | on | on | on |
mcp | The MCP endpoint: on, read_only or off | on | on | on |
mcpToolGroups | Optional MCP tool groups shown | none | apps, connectors, operations | apps, connectors, operations |
leases | Leases advisory or enforced | advisory | advisory | advisory |
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/myselfreturnsagentPolicy, 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/changeslists 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.