Skip to content

Roles and skill levels

Every person in a Zentri org has one role. The role decides what the person may do, and one table in the coordinator, Authorize, makes every such decision. Agents act through session tokens, which carry no role. An agent can claim files, ask questions, and propose decisions, but it can never answer, approve, or administer anything.

Each person also has a skill level, plain or technical. It decides how an agent’s question is phrased for that person.

The roles, from lowest to highest, are viewer, requester, engineer, lead, and admin. Each role may do everything the roles below it may do.

Role Meant for
viewer Someone who follows the work and reads its records.
requester Someone who asks for work and answers product questions.
engineer Someone who runs agent sessions.
lead Someone who reviews high-risk decisions and sets project policy.
admin Someone who manages users and tokens.

This table follows server/internal/auth/authorize.go. A person uses these rights with a user or admin token.

Action viewer requester engineer lead admin
Read projects, sessions, claims, intent summaries, questions, decisions, PRDs, and stats yes yes yes yes yes
Run the merge check yes yes yes yes yes
Set your own skill level, and list or revoke your own tokens yes yes yes yes yes
Check or register an intent no queued only yes yes yes
Answer a product question no yes yes yes yes
Answer a technical question no no yes yes yes
Start a session no no yes yes yes
Start a queued intent no no your own any any
Review a high-risk decision no no no yes, unless you proposed it yes, unless you proposed it
Create a project, change its settings, dedup thresholds, or model router no no no yes yes
List users no no no yes yes
Create users, invites, and integration tokens no no no no yes
Set another user’s skill level, or list or revoke other users’ tokens no no no no yes
Read the full text of another person’s intent no no no no yes
End another person’s session no no no no yes
Read Prometheus metrics no no no no yes

The person who registered an intent always reads its full text. Everyone else below admin gets a summary. The proposer of a decision is the person who owns the session that proposed it, so a lead cannot approve their own agent’s decision.

Every token is a prefix followed by 43 base62 characters. The coordinator stores only a hash of each token, and no zt command prints one.

Prefix Kind Held by Lifetime Issued by
zt_u_ user A person 90 days zt login, which redeems an invite
zt_s_ session One agent session 8 hours, refreshed up to 24 hours after issue zt start
zt_a_ admin The bootstrap admin No expiry The coordinator’s first start
zt_i_ integration A service, such as the Slack bot 365 days An admin, with POST /v1/integration-tokens

An invite code starts with ztinv_, works once, and expires after 15 minutes. A user token’s rights follow the user’s current role, not the role it was issued under. An admin token always acts as admin.

zt keeps the user token in the OS keychain, or in a 0600 config file inside a 0700 directory where no keychain answers. It keeps each session token in a 0600 file inside a 0700 directory. The heartbeat refreshes a session token when less than 2 hours are left. Ending a session revokes its tokens.

These tokens are Zentri’s own. They are not model credentials. Every person brings their own agent credentials, and Zentri never collects, proxies, stores, or resells model access or consumer subscription tokens.

A session token carries these scopes. None of them lets the agent answer, review, or administer.

Scope What it allows
claims:own Claim and release files in its own session.
notices:own Read its own notices.
plan:own Submit plans and snapshots.
questions:create Ask questions and read the ones it asked.
decisions:propose Propose decisions.
prd:update Save PRD revisions for its intent.
notes:post Post notes to other sessions.
sessions:read See the project’s other sessions, claims, and intents as summaries.
diff:read Read another session’s diff.

A session token can also read its own project and the project’s decisions and PRDs.

An admin picks exactly one scope for each integration token.

Scope Used by What it allows
checks:read The GitHub check Run the merge check.
metrics:read A Prometheus scraper Read /metrics.
slack:act-as-verified-user The Slack bot Act for a person who linked their Slack account.

A person acting through the Slack bot keeps their own role, but only for a short list of actions. They can read projects, intents, questions, and decisions, check or register an intent, answer a question, review a decision, and unlink their account. An intent registered through Slack is always queued. A Slack user who has not linked an account gets 403 slack_user_not_linked.

Caller Limit
A session token 20 per second, burst 60
A user, admin, or integration token 10 per second, burst 30
A call with no token, per client IP 5 per second, burst 20

Each token has its own bucket. Calls through the Slack bot share the bot token’s bucket.

Level Default for What the reader sees
plain viewer and requester “About the task:” and the task summary, then the question, its context, and numbered options. It ends with “Pick a number, or answer in your own words.”, or “Answer in your own words.” when there are no options.
technical engineer, lead, and admin “Product question.” or “Technical question.”, then the question, its context, and numbered options.

A person’s own setting overrides the default. The coordinator always keeps the agent’s own words as the record, and zt questions show prints both the agent’s text and the rewrite.

For a plain reader, the coordinator can also run an optional LLM step called phrase. It sends the agent’s text and the task summary to a chat model and puts the rewrite into the template. The step runs only when the coordinator has ZENTRI_LLM_BASE_URL and ZENTRI_LLM_MODEL set and ZENTRI_LLM_STEPS lists phrase. The default for ZENTRI_LLM_STEPS is judge alone. The model is one the coordinator’s operator configures, with an optional key from ZENTRI_LLM_API_KEY_FILE. It is never a user’s agent credential.

The coordinator discards the rewrite and uses the plain template when the call fails, takes longer than 5 seconds, returns no text or more than 1 KiB, holds something that looks like a credential, or adds a link the agent did not write. The question’s phrased_by field records template or llm.

Users and invites are created over HTTP with an admin token. There is no zt users create command. This comes from the README quickstart.

Terminal window
id=$(curl -s -H "Authorization: Bearer $ADMIN" -d '{"handle":"ana","role":"engineer"}' $API/v1/users | jq -r .id)
curl -s -H "Authorization: Bearer $ADMIN" -X POST $API/v1/users/$id/invites | jq -r .code > ~/ana.invite
zt login --server $API --project demo --invite - < ~/ana.invite

POST /v1/users also takes display_name, email, and skill_level. A handle is 1 to 63 characters of lowercase letters, digits, ., _, and -, and starts with a letter or digit. A handle already in use gets 409 handle_taken.

Set a skill level. default clears it, so the role decides again.

Terminal window
zt users set-skill ana plain
zt users set-skill ana default

Create an integration token. The response holds the token once, in token.

Terminal window
curl -s -H "Authorization: Bearer $ADMIN" -d '{"label":"github-check","scope":"checks:read"}' $API/v1/integration-tokens | jq -r .token

List tokens with GET /v1/tokens, and revoke one with POST /v1/tokens/{token_id}/revoke. The HTTP API reference has every route, and the environment reference has every variable.

  • No zt command creates users or invites. Use the HTTP API.
  • No route changes a user’s role or removes a user after creation.
  • Without an OS keychain, as over SSH or in a container, zt keeps the user token in a 0600 file. Session tokens are always files, because the agent reads them.
  • In an org whose only lead or admin runs the agent, nobody can approve that agent’s high-risk decisions.
  • A Slack user who has not linked an account gets no rights at all.
  • The phrase step has run against a fake model only.