> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pentagon.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Folder Access

> Control which files and folders each agent can access

# Folder Access

Not every agent should have access to everything. Pentagon lets you control exactly which folders each agent can read from and write to — clear boundaries that keep agents focused and your code safe.

## Access levels

Each folder in your map can be assigned one of three access levels per agent:

| Level            | What the agent can do                              |
| ---------------- | -------------------------------------------------- |
| **Read & Write** | Full access — read files, create files, edit files |
| **Read only**    | Can read files for context but can't make changes  |
| **No access**    | Folder is invisible to the agent                   |

## Setting folder access

1. Select the agent on the canvas
2. Open the **Settings** tab in the right panel
3. Under **About**, you'll see the list of folders in your map
4. Set the access level for each folder

## Why restrict access?

**Safety** — An agent working on the frontend doesn't need write access to your database migrations. Restricting access prevents accidental changes to code outside its scope.

**Focus** — Agents work better when they're not overwhelmed with irrelevant context. An agent with access to only `api/` will focus its attention there instead of wandering through the entire codebase.

## Common patterns

| Agent role         | Suggested access                                              |
| ------------------ | ------------------------------------------------------------- |
| Frontend developer | Read & Write to `src/`, Read only to `api/`                   |
| Backend developer  | Read & Write to `api/`, Read only to `src/`                   |
| Reviewer           | Read only to everything                                       |
| Infra/DevOps       | Read & Write to `infra/`, `ci/`, Read only to everything else |

## Multi-folder maps

If your map contains multiple project folders (e.g., a frontend repo and a backend repo), you can give each agent access to the specific repos it needs. An agent working on cross-cutting concerns might get access to both.

When an agent has access to more than one folder, a **folders pill** appears in the chat header (e.g., "3 folders"). Click it to open a dropdown listing each folder the agent can reach along with its current git branch — a quick way to confirm exactly where the agent is working.

## Git isolation (always on)

Every agent that touches a git repo gets its **own clone** of that repo and **its own branch** at spawn time. There's no toggle — it's always on. Agents work independently without stepping on each other, and your main working copy stays untouched.

* A full clone for each accessible git repo, stored locally
* A fresh branch created automatically
* `origin` points to your remote (GitHub, etc.), so agents can push and open PRs directly

Non-git folders are shared — there's nothing to clone for plain directories.

<Card title="Next: Teams" icon="users" href="/teams/teams">
  Organize agents into functional groups.
</Card>
