# Agents

Start an AI agent on your Loam vault: one-line setup, the loam skill, the rules agents follow, and Markdown docs.

Loam is built for agents. An agent works on your notes through the `loam` command line, and it reads the rules from `loam guide`, which ships with the app. Use this page to start an agent, install the skill, and see what the agent must respect.

## Start an agent in one line

Click "Let your agent set it up". It copies a line with the address of this site filled in, to paste into your agent:

```text
Use curl to read <origin>/agents.md and perform the setup to install Loam
```

The agent reads the setup steps in `/agents.md`. It asks you before it changes anything outside your vault.

## Install the skill

The `loam` skill is a short file. It tells an agent to read `loam guide` before it touches a vault. Install it for each agent you use:

```bash
loam skill install --claude
loam skill install --codex
loam skill install --agents
```

| Flag | Agents | Folder |
| --- | --- | --- |
| `--claude` | Claude Code, OpenCode | `~/.claude/skills/loam/` |
| `--codex` | Codex | `~/.codex/skills/loam/` |
| `--agents` | Antigravity, Pi, OpenCode, Codex | `~/.agents/skills/loam/` |

Without a flag, `loam skill install` writes every target. Check the copies with `loam skill status`: `current` is `true` when a copy is up to date. `loam skill uninstall` removes it.

> **Note:** The skill is written to your home folder, outside the vault. Ask the user before you run the install.

## Rules every agent follows

These rules come from `loam guide`, which matches the installed version, and from the setup steps in `/agents.md`. Read the guide before you change a vault:

```bash
loam guide
```

- The notes belong to the user. Change them only when asked, and say which notes you changed.
- Never write in `.loam/cache/`, `.git/` or `.trash/`.
- Change `.loam/config.json` through commands such as `plugins.enable`, never by hand.
- Write plain formats only: CommonMark, GitHub Flavored Markdown and YAML frontmatter.
- Link notes with standard Markdown links, such as `[Beta](Projects/Beta.md)`. Backlinks follow these links, not `[[wikilinks]]`.
- Read a note right before you write it, because the user may be typing in it.
- Never delete a note, and never use `rm`. To remove a note, ask the user, then run `files.trash`, which moves it to `.trash/`.
- Before a plugin is enabled, tell the user what it does and which permissions it asks for. Enable it only after they agree.
- Ask before any step that changes files outside the vault.

## Read the docs as Markdown

Every page of this site has a Markdown version at `/docs/<slug>.md`. For example, the CLI reference is at `/docs/cli.md`. It has the same content as the page, without the layout.

- `/llms.txt`: an index of every page, with a one-line summary for each.
- `/llms-full.txt`: every page in one file, for an agent that loads everything at once.

Related pages: [Loam CLI](/docs/cli), [Plugin permissions](/docs/permissions) and [Themes](/docs/themes).
