# Territory

> The per-agent fence that keeps an agent's file tools out of credentials, Silos' state and other agents' files, and the per-agent token it meets the API with.

Source: https://silosplatform.com/docs/territory/

An agent's **territory** is a fence around what its file tools may touch, plus the token it uses to talk to Silos. Every new agent is born with its territory on. On the Welcome screen it reads: "Finance keeps out of your keys, your settings and other agents' desks."

The territory is a list of places the agent is kept out of, not a box it is locked in. The agent works in its own folders and its own state directory, and everything else stays as reachable as before unless a rule names it.

## How it works

Silos generates a `permissions.deny` list for each agent and hands it to the engine through the engine's documented settings, every time it launches the agent. The rules are file rules only: `Read(…)` and `Edit(…)` patterns, never `Bash(…)` rules. Claude Code refuses the agent's file tools on those paths, and it also refuses a plain shell read such as `cat` of one. Silos does not modify the engine to do this.

The list is rebuilt at every launch. A running console picks up a change when it restarts.

## What it keeps an agent out of

| Kept out of (no read, no edit) | What that covers |
| --- | --- |
| **Silos' own data** | Everything in `~/.silos`: the access token, `agents.json`, the vault, sessions, messages, run history, usage records. The exceptions are the agent's own state directory and the extra Claude accounts, which are fenced file by file like `~/.claude` (next row). |
| **Claude login and settings** | In `~/.claude` and every extra Claude account: the credentials file, `settings*.json`, the global `CLAUDE.md`, backups, and `~/.claude.json`. The prompt history cannot be read. |
| **Other agents' state** | Every other agent's directory under `~/.silos/agent-state/`, including agents that were archived or removed. |
| **Each folder's engine settings** | `.claude/settings*.json` in every folder of every agent Silos knows. These hold permission rules and hooks. |
| **Other engines' login secrets** | For example OpenCode's own `auth.json`. |
| **Other processes' environment** | `/proc/*/environ`, where other turns' tokens live. |
| **Your private paths** | By default `~/secrets`, `~/.ssh`, `~/.npmrc`, `~/.aws`, `~/.config/gh` and `~/.gnupg`. |

| Readable, but not changeable | Why |
| --- | --- |
| **What its engine loads behaviour from** | Skills, commands, subagents, plugins and output styles in `~/.claude`; the `.claude/skills` of every agent's folder; MCP and engine config such as `.mcp.json`; and the agent's own plugin directory. A file planted there would run as that agent, or as another one. An agent proposes a skill; it never plants one. |
| **Other roles' notes in a shared project** | When two agents share a folder, each can read the other's `context/<id>/` but not change it. |

A private path that the agent works inside, or that contains one of its folders, stays open to it. Settings shows this as "also reaches".

### Private paths

You edit the private-path list in **Settings › Agents**, under Territory: "Private paths — every fenced agent is kept out of them", one per line, `~` allowed. The Silos and Claude groups above are always generated and cannot be edited.

## What it does not cover

Settings says this plainly, and so does this page:

- **Commands run in a shell.** The fence holds the agent's file tools. Beyond a plain read like `cat`, which Claude Code refuses on a fenced path, what it runs in a shell, such as a script or an interpreter, runs as you and reaches what you reach. Settings sums it up as "This is a fence, not a box — Silos does not sandbox the agent’s process."
- **A secret in its environment.** A vault entry delivered to the agent's environment is in its hands. A *signed* entry is used by Silos on the agent's behalf instead. See [Vault](https://silosplatform.com/docs/vault/).
- **MCP servers and plugins.** Their tools are not the engine's file tools, so the file rules do not apply to what they do.
- **Plan files in other projects.** These are protected by convention only: the fence does not stop an agent editing another project's `plans/`.

The same Territory section has a **Network** column. With an allowlist, an agent's web traffic goes through a local Silos proxy that lets through only the hosts you list plus its engine's own. See [Security](https://silosplatform.com/docs/security/) for what that holds and what it does not.

## The agent's token

Every agent has its own API token, whether its territory is on or off. Silos passes it to every conversation it launches as `SILOS_AGENT_TOKEN`, with `SILOS_AGENT_ID` and `SILOS_API`. The token is stored in `~/.silos/agents/<id>/token`, which is itself inside the fence.

With it, the agent meets the Silos API as itself: the roster, its inbox, its automations, claiming its tasks. The token is the permission:

- Another agent's task, or a conversation another agent owns, is refused.
- The owner's routes, such as editing an agent or its mission, are never reachable with an agent token.
- Every write must also name the turn it comes from, through `SILOS_TURN`, a token Silos mints fresh for each turn. A write that names no live turn of that agent is refused.

A request from this machine with neither your token nor an agent's can only read; one that arrives through a tunnel or proxy needs a token for everything.

## Turning it off

Each agent's row in Settings › Agents › Territory has a fenced/open switch. Its own page shows the same picture under Settings › Runs on: "works in", "reads only", "can't change", "kept out of", and how it meets the API.

With the territory off, the page says "Its territory is off — it reads and writes everything you can (it still meets the API as itself)." An agent needs its territory on to be **On its own**. Turn it off and the agent acts as Only when told, and Needs you says so. Turn it back on and it returns to On its own. See [Control](https://silosplatform.com/docs/control/).
