# Teams and access

## The model

- An **organization** holds everything: members, agents, groups, libraries.
- A **library** is one connected source.
- A **group** holds people and agent identities.
- A **grant** gives a group read access to a library.

Access is per library and read-only. There is nothing finer than a library, and nothing that writes.

## Who can read what

| Who               | Reads                                                         |
| ----------------- | ------------------------------------------------------------- |
| Owners and admins | Every library in the organization, and can manage everything. |
| Members           | Only libraries granted to a group they belong to.             |
| Agent identities  | Only libraries granted to a group they belong to.             |

## Roles

Organizations have owners, admins and members. Owners and admins manage libraries, groups, agents and members. Only owners manage billing, make someone an owner, or delete the organization. Members use what they are granted. Invite people from **Members** (your email address must be verified first). An invitation can be accepted only by an account with the invited address, once that address is verified.

## The Everyone group

Every organization has an Everyone group. People who join the organization are added to it, unless an owner or admin removed them from it before and did not add them back. Agents are in it only if you add them.

When you add a library, **Everyone** is ticked by default, which grants the library to that group. Untick it to grant the library to chosen groups only, or remove the grant later from the library's page.

## Agent identities

An agent identity is a name for an unattended agent, such as `support-bot`. It belongs to the organization, not to a person, so it keeps working when someone leaves.

Create one under **Agents**, add it to a group, and create an API key for it. The key starts with `shk_`, is shown once, and acts as that agent identity. Shoko stores only a hash, so a lost key cannot be recovered: revoke it and create another. Revoke a key from the agent's page. Disabling the agent stops all its keys at once.

API keys belong to the agent, so they keep working when the person who created them leaves. When you remove someone from **Members**, Shoko shows how many active keys they created and revokes them unless you untick **Also revoke these keys**. When someone leaves on their own, their keys stay until an owner or admin revokes them; the agent's page shows who created each key.

## Interactive clients

When someone connects Claude, Cursor or another client with OAuth, the client acts as that person. It can read exactly the libraries that person can read.

Each person sees their connected clients under **Connect** in the dashboard. Disconnecting one stops its access at once. Removing a person from the organization, or from the group that grants a library, stops their reads at once.

## What Shoko does not do

**Shoko does not copy per-page permissions from your source.** If a Confluence page is restricted, a private Notion page is shared with the integration, or a Jira project is limited in Jira, those rules do not carry over. Anyone granted the library can search and read everything Shoko indexed from it.

Practical rules:

- Put in a library only what everyone granted it may read.
- Use separate libraries for content with different audiences, and grant each to the right group.
- Create the source token from an account that can read only what you intend to share.

Denials never reveal that a library exists: a library you cannot read looks the same as one that does not exist.
