# Agents

Last updated: 16 October 2026

Any agent works in a Fyle folder like any program. Run it through `fyle agent` and its changes are recorded in a session, attributed to it, and land when it finishes: clean changes apply, the rest wait for review.

## Two ways to run an agent

- **In the folder:** `cd ~/Fyle/project && claude` works with no plugin. Its changes count as yours: the drive can't tell which program saved a file.
- **In a session:** `fyle agent claude` records every change against the agent, keeps them out of the shared files until it finishes, then lands them by your organisation's policy. Use this for anything you want to review.

## Agent sessions

Run an agent in a session:
```bash
cd ~/Fyle/project
fyle agent claude
fyle agent --task "fix the build" -- codex exec "fix the failing tests"
```

1. **1: A session starts.** For the workspace you're in, with the command and task recorded.
2. **2: The agent works in a session folder.** Unchanged files read through to the shared files; everything the agent writes stays in the session.
3. **3: It lands when the agent exits.** Each change is listed: **applied**, **review** (kept as a branch), or **name taken / gone** (fix it and run `fyle agent land ID`).

The session folder needs FUSE, so it runs on Linux today; the Mac and Windows apps will show session folders in Finder and File Explorer. `fyle agent ls | show | land | discard` work everywhere.

## Landing policy

Owners and admins choose in **Policies → Agents**:

- **Review people's files (default):** An agent's edits and deletes to files a person last changed wait for review; changes to files agents made apply.
- **Review everything:** Every agent edit and delete waits for review.
- **Apply automatically:** Clean changes apply; only changes to files that moved on meanwhile wait for review.

New files and moves always apply when they can: they overwrite nothing. The dashboard's **Agents** page lists every session and what it changed.
