# Agent personas and roles

Updated: 2026-11-16

A workspace has a **pool of agent personas**, each with a **role** (developer, QA, project coordinator …). Several bots can share one person's connection, and each of them acts as a persona of its own: comments and changes show who did it, and in which role.

The personas you name for your own connected apps (*Connected Apps*) stay as they are. The pool adds personas that belong to the workspace and that any agent can take for the time it works.

## Roles

*Administration › Settings › AI*, card **Agent roles** (workspace admins edit, everyone else reads):

- A new workspace starts with six roles: Developer, QA, Project coordinator, Reviewer, UI designer, Product owner assistant. Rename them, add more or remove them; a role that personas still have can't be removed.
- Each role has a **key** (like `qa`); agents claim a persona by it.
- **Instructions**: what an agent in this role does and how, in Markdown. **Use template** fills in a starting text for the six default roles, in your language. Versions, *Confirm*, the secret check and a size limit work as for the rules.
- **Runner profile**: what an agent of this role may do on the machine it runs on (see below).

## Runner profile of a role

Instructions say *how* an agent works; the runner profile says *what it may do* on its machine. The runner that starts the agent turns it into the agent's permissions, so the tool permissions live with the role in IT4S instead of in scripts on each machine.

| Field | Meaning |
|---|---|
| **Repository** | *IT4S only* (no files, no shell, only the IT4S tools), *Read only* (no edits, commits or pushes) or *May change code* |
| **May push** + **Branch pattern** | only to branches that match, like `it4s/*` (`*` within one level, `**` across levels) |
| **Pull requests** | none, open, or open and merge (merging also needs the project's rules to allow it) |
| **Check commands** | by name: `check`, `test`, `typecheck`, `lint`, `build` or your own; each runner maps a name to its command |
| **Needs a browser** + **Test environment URL** | the runner gives the agent a browser; without it the agent gets none. The URL is the environment the agent tests on, never production. |
| **Network access** | hosts the agent may fetch from besides IT4S, like `docs.example.com`; empty = none |

Push and pull requests need *May change code*; check commands need the repository.

**Defaults** (until you save a profile): Developer: change code, push `it4s/*`, open pull requests, checks check/test/typecheck. QA: read only, checks, browser. Reviewer: read only. UI designer: change code, browser. Project coordinator and Product owner assistant: IT4S only. New roles: IT4S only.

The button **Runner profile** on a role shows whether it is the default or a saved version; **Edit**, **Reset to the default**, **Confirm** and **Versions** (with a diff and **Restore**) work as for instructions. Every save is a new version.

**Per project**: on the tab **AI Agents**, card **Roles and personas in this project**, choose a role under *Addition for*; the card **Runner profile of … in …** shows what agents of the role get here. Project admins click **Set for this project** to override it, and **Use the workspace profile** to inherit again. Only project admins change it.

**On the agent's machine** the runner's own configuration can **narrow** the profile (for example no pull requests on this machine), never widen it.

## Personas

Card **Agent personas** (workspace admins):

- **Add persona**: name (unique in the workspace), role, description, picture, and optionally the **projects** it may change things in.
- Each persona shows whether it is **free** or **in use**, by whose session and app and since when. **End claim** frees a persona a bot didn't release (for example after a crash); that session is told on its next change that it lost the persona.
- **Instructions**: tone, focus and signature of this persona.
- **Agents may create personas** (default off): agents of members may create and change personas too. Without it, only workspace admins can. Every new or changed persona shows in the activity feed.

**Changing a persona through an agent:** ask your agent, for example *"Limit the persona Rita to the project WEB"* or *"Make Rita a reviewer"*. It can change the name, description, role and projects, with the same right as creating one. A session that holds the persona keeps it and gets the new role instructions with its next result. Taking a project away from a persona that works on a task there is refused until the task is finished or released.

## How agents use them

- An agent **claims** a persona for its session, by **role** (a free persona of that role) or by **name**. A named persona with another role is refused unless the agent insists.
- A persona is held by **one session at a time**; a second bot takes another one. It is free again when the agent releases it, when the session ends, or after 30 minutes without a request.
- **Permissions stay the person's.** A persona and its instructions only change what is shown and how the agent works. The runner profile only limits what the agent may do on its machine.

### Claim token: when an app opens new sessions

Some apps (for example Cursor) open a new session on every reconnect or even per call. So that the persona does not stay behind with the old session:

- Claiming a persona returns a secret **claim token**, new on every claim. IT4S stores only a fingerprint of it; it never shows in the app, the activity feed or the logs. Agents keep it to themselves.
- **Taking the claim back:** with the name and the claim token, a new session takes the claim over from the old one, for the same person only. The old session loses the persona and is told so on its next change.
- **Acting without the claim:** every change an agent makes can carry the claim token; with a valid one it acts as that persona, whatever its session holds.
- A **wrong or expired** token, or another person's, makes the change fail with a clear message. It never falls back to writing as the person or the app behind the connection.

## What you see

- **Comments** by a persona show its name, the AI badge and its **role**.
- The **history** of an issue shows the persona, its role at that time, and for whom it worked.
- Customers and viewers who see the people behind agents see the person instead.

## Roles and personas in a project

Project page, tab **AI Agents**, card **Roles and personas in this project**:

- **Allowed roles** and **Allowed personas** (project admins; empty = all). Other personas can still read the project but change nothing.
- **Addition for**: what this project adds to a role's or persona's instructions, for example *"QA here: test on staging only"*.
- **What an agent gets** shows the exact block **as** a role or persona.

An agent gets, in this order: workspace, project group and project rules, then the role's instructions (workspace, then project), then the persona's, and last the role's runner profile as one line. On a conflict **the rules win**; role and persona instructions never grant rights.
