bots-garden/sidekickspublic Fork
⑂ v1.7.0
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/sidekicks.git
git clone ssh://git@rickub.com/bots-garden/sidekicks.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
work-with-an-agents-files.md · 112 lines · 13.1 KBmarkdown
Blame HistoryOpen raw

How to work with an agent's files and terminal

This guide shows how to look at what an agent produced, change its instructions, delete a file, and run commands in its folder. It assumes Sidekicks runs with a configuration that has agents.

Open an agent's workspace

  1. In the Agents panel, hover the agent and click 📂.
  2. The centre shows the agent: its state, where it runs (local · /path or container name · /path), the channels it belongs to, and the tabs Files, Terminal, Log.
  3. 💬 Conversation goes back to the direct conversation; clicking a channel leaves the workspace too.

Read and change a file

  1. In Files, click a folder to open it, a file to read it. Dot files (.git, .mm…) and node_modules are hidden: tick Show hidden files to see them.
  2. Edit the text. ● modified appears; Save (or ⌘S) writes the file, Revert brings back what is on disk.
    Source code is coloured according to its language, told by the extension or the name of the file: Go, JavaScript and TypeScript (with JSX), Python, Rust, Java, C and C++, C#, Kotlin, Swift, Ruby, PHP, Lua, SQL, shell scripts and Makefile, Dockerfile, HTML, CSS, XML, YAML, JSON, TOML, .env and .ini files, diffs, PowerShell. Any other file, and a file larger than 512 KB, stays plain text.
  3. If the agent changes the file while you edit it, a banner says so: Take their version reloads it (your changes are lost), Keep mine saves yours over it.

To find a file or a folder in the Finder (macOS), the Explorer (Windows) or the file manager (Linux), hover it in the tree and click 📂, or click 📂 Show where it is above the open file. The button shows only when the agent's folder is on this computer: an agent on this computer, or in a container or sandbox whose folder is mounted from here.

The tree and the open file follow the agent's changes by themselves: a file it creates appears within a second (two in a container).

Preview a document or an image

Markdown (.md), AsciiDoc (.adoc, .asciidoc, .asc) and HTML (.html, .htm) files open on their Preview; Edit shows the text, Preview comes back to the rendering of what is in the editor. Images (.png, .jpg, .gif, .webp, .svg…) only have a preview: click the image for its actual size, again to fit it.

  • Images and links relative to the document are looked for in the agent's folder: a link to another file opens it here, a link to a site opens the browser.
  • An HTML page is shown in a frame that runs no script and reaches nothing: its images and style sheets of the folder are put inside it, its links do nothing.
  • The preview follows the agent's changes, like the editor.
  • Mermaid diagrams (issue #116): a ```mermaid block of a Markdown file, or a [mermaid] / [source,mermaid] block of an AsciiDoc file, is drawn in the preview, in the light or dark theme of Sidekicks. A diagram that cannot be drawn keeps its code, with the error under it. Only the preview draws them: in a conversation, a mermaid block stays code.

When an agent writes a document and gives a link to it in its answer, click the link: the file opens in a panel at the right of the conversation, which stays in view.

  • The panel previews Markdown, AsciiDoc, HTML and images as above. Source code (Go, TypeScript, Python, shell, YAML… the languages of the editor) is coloured like in the Files tab, read-only, with line numbers (issue #117); any other text file is shown as is. Links of the document to other files of the folder open in the same panel.
  • 📂 Show where it is opens the Finder (macOS) or the Explorer (Windows) with the file selected. It shows only when the agent's folder is on this computer: an agent on this computer, or in a container or sandbox whose folder is mounted from here.
  • Open in the agent's files shows the file in the Files tab, to change it. ↻ reads it again after the agent changed it.
  • × or Escape closes the panel; drag its left edge to resize it.
  • Each channel and direct conversation has its own panel: it is hidden when you go to another one, and shows again when you come back, unless you closed it.

The link must lead to a file of the agent's folder: a path relative to the folder (notes/plan.md), an absolute path inside it (as the agent or this computer sees it), or a file:// address of such a path. A link to a site opens the browser; any other link shows why the file cannot be shown, and nothing outside the folder is read. To get links that open, tell the agent in its AGENTS.md, e.g. "When you write a file, give a Markdown link to it, relative to your folder".

Create, rename, move or delete files

  • Create: select a folder (or a file in it), click + New file (or + New folder), type a name, Enter. A new file opens, empty.
  • Select several entries: ⌘-click (Ctrl-click on Windows and Linux) adds an entry to the selection or takes it out; ⇧-click selects every row up to it; ⌘A (Ctrl+A) selects every row shown. The actions below then apply to the whole selection.
  • Rename: hover the entry and click ✏️, double-click it, or select it and press F2. Type the new name, Enter (Escape cancels). An open file follows its new name, even with unsaved changes.
  • Move: drag entries onto a folder (or onto a file, to go next to it; below the rows for the top of the folder). Without the mouse, right-click → Move to… and type the folder (empty for the top). A folder never goes inside itself, and nothing replaces an entry that already has the name.
  • Duplicate: right-click → Duplicate, or select and press ⌘D (Ctrl+D). The copy goes next to the original, with -copy before the extension (plan.md → plan-copy.md, then plan-copy-2.md…); a folder is copied with its content. A protected file can be duplicated, and its copy is not protected — unless it lands in a protected folder, which is refused.
  • Right-click an entry for a menu with all these actions, and Show where it is.
  • Delete: hover the entry and click 🗑 (or Delete under the editor, or press Delete — ⌘⌫ on a Mac — in the tree), then confirm; with several entries selected, one confirmation covers them all. On this computer the file goes to the trash — restore it from the Finder if needed. In a container the deletion is final, and the confirmation says so.

Give the agent its instructions

An agent reads its instructions when its session starts: its role, its tone, its rules, in a Markdown file of its folder — AGENTS.md for most agents, CLAUDE.md for Claude (issue #113). Open the Instructions tab of the agent's workspace:

  • Create from a template: when the agent has none yet, Sidekicks writes a short template named after the agent (its role, how it answers, its rules). Fill it in with plain words.
  • Change the text in the editor of the tab, then Save (⌘S, Ctrl+S on Linux and Windows); Revert drops your changes. If the file changed meanwhile — the agent may write it too — Sidekicks says so and writes nothing: Reload, then make your changes again.
  • Import a file… copies a text file of this computer as the agent's instructions (it replaces them, after you confirm). You can also drop one text file from the Finder on the tab (issue #121): the same import, with the same confirmation.
  • Delete the instructions removes the instruction file, after you confirm (issue #122): it goes to the trash of this computer, and the tab offers the template and the import again.
  • The agent reads its instructions when its session starts: when it is running, Restart the agent so that it uses the new ones.

The instruction file stays protected in the Files tab (below): only the Instructions tab writes it, and deletes it. It works the same for an agent on this computer, in a Docker container or in an sbx sandbox.

Give the agent skills

A skill teaches the agent how to do one kind of task: a folder holding a SKILL.md, whose name and description tell the agent when to use it (the Agent Skills format every agent reads). The agent uses a skill when its description fits what you ask, or when you call it with / (issue #112). Open the Skills tab of the agent's workspace: it says where the agent reads its skills — .claude/skills for Claude, .agents/skills for Codex, Antigravity and Copilot, .vibe/skills for Vibe, skills (or the skillsDir of its agent.yaml) for mini-me — and lists them.

  • New skill: say what it does (its folder's name follows, in lowercase letters, digits and -) and when to use it, then Create the skill. Sidekicks writes a SKILL.md to fill in: when to use it, how to do it, an example.
  • Pick a skill to read or change its SKILL.md, then Save (⌘S); a change made meanwhile is reported, as for the instructions.
  • Import a skill folder… copies a folder holding a SKILL.md, with its other files (scripts, examples) and without hidden ones; Import a Markdown file… turns one file into the SKILL.md of a new skill, named after the name of its front matter, else after the file. A skill that has the same name is never replaced. You can also drop .md files and skill folders from the Finder on the list of skills (issue #120): each becomes a skill, and the ones refused are listed with why.
  • Delete the skill removes the skill you picked, after you confirm (issue #119): its whole folder — or its single file for a mini-me <name>.md — goes to the trash of this computer.
  • The agent finds its skills when its session starts: when it is running, Restart the agent.

The skills folders stay protected in the Files tab: only the Skills tab writes there, and deletes a skill. For an agent in a container or a sandbox, Sidekicks writes its instructions and its skills in its folder on this computer: it works even when the agent sees that folder read-only (mini-me's .mm), and without the sandbox running. mini-me's one-file skills (<name>.md) are listed too.

Vibe: trust its folder

Mistral Vibe reads the instructions and the skills of its folder only once the folder is trusted (issue #125). When a Vibe agent starts a session in a folder it does not trust yet and that holds instructions or skills, the conversation says so, with the files it ignores, and offers Trust its folder: Vibe then remembers the decision, and reads them from its next answer. Trusting the folder also lets its own Vibe settings (.vibe/) apply: trust only a folder you know.

Protect files

Some files must not be changed or deleted by mistake. Without writing anything, the agent's instructions (AGENTS.md, CLAUDE.md, GEMINI.md — written only from the Instructions tab), its skills (skills/ and all it holds), its configuration file (after --config or serve acp in its args) and, for an agent in a container or a sandbox, the files it is built from (compose.yaml, Dockerfile, sbxenv.yaml named by its runtime.lifecycle) are protected. To protect others, list them under the agent in Settings:

  - name: milo
    protect: [notes/plan.md, "prompts/**"]

A protected file shows 🔒 instead of ✏️ and 🗑 and opens read only; it can be neither renamed nor moved, and a folder holding one can be neither deleted nor moved. When one of several selected entries is protected, nothing is deleted. Only the configuration lifts a protection (the ones always applied cannot be lifted): the interface never does. The agent, the terminal and the Finder can still change these files.

Run commands in the agent's folder

Click Terminal: a shell opens in the agent's folder — yours on this computer, bash or sh inside a container. Full-screen programs (vim, htop) work and follow the size of the panel. When the shell ends (exit), Open a new shell starts another one.

  • Several terminals: + next to the terminals opens another one (8 at most per agent), named Terminal 1, Terminal 2…; click a name to show it. × closes a terminal: its shell ends, with everything it started; the others go on.
  • They keep running: go to Files, a conversation, a channel or another agent — the terminals go on, with what runs in them, and what they print meanwhile is kept. Coming back to the agent shows its terminals as they are. The Terminal tab shows how many are running, and the agent's row in the Agents panel shows ⌨ 2.
  • A terminal ends only when you close it, when its shell exits, when another configuration file is opened, or when Sidekicks quits.

Read the agent's log

Log shows the last lines the agent wrote on its standard error — what explains an error without opening a terminal.

Variants

See also

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
# How to work with an agent's files and terminal

This guide shows how to look at what an agent produced, change its instructions, delete a file, and run commands in its folder. It assumes Sidekicks runs with a configuration that has agents.

## Open an agent's workspace

1. In the **Agents** panel, hover the agent and click **📂**.
2. The centre shows the agent: its state, where it runs (`local · /path` or `container name · /path`), the channels it belongs to, and the tabs **Files**, **Terminal**, **Log**.
3. **💬 Conversation** goes back to the direct conversation; clicking a channel leaves the workspace too.

## Read and change a file

1. In **Files**, click a folder to open it, a file to read it. Dot files (`.git`, `.mm`…) and `node_modules` are hidden: tick **Show hidden files** to see them.
2. Edit the text. **● modified** appears; **Save** (or ⌘S) writes the file, **Revert** brings back what is on disk.
   Source code is coloured according to its language, told by the extension or the name of the file: Go, JavaScript and TypeScript (with JSX), Python, Rust, Java, C and C++, C#, Kotlin, Swift, Ruby, PHP, Lua, SQL, shell scripts and `Makefile`, `Dockerfile`, HTML, CSS, XML, YAML, JSON, TOML, `.env` and `.ini` files, diffs, PowerShell. Any other file, and a file larger than 512 KB, stays plain text.
3. If the agent changes the file while you edit it, a banner says so: **Take their version** reloads it (your changes are lost), **Keep mine** saves yours over it.

To find a file or a folder in the Finder (macOS), the Explorer (Windows) or the file manager (Linux), hover it in the tree and click **📂**, or click **📂 Show where it is** above the open file. The button shows only when the agent's folder is on this computer: an agent on this computer, or in a container or sandbox whose folder is mounted from here.

The tree and the open file follow the agent's changes by themselves: a file it creates appears within a second (two in a container).

## Preview a document or an image

Markdown (`.md`), AsciiDoc (`.adoc`, `.asciidoc`, `.asc`) and HTML (`.html`, `.htm`) files open on their **Preview**; **Edit** shows the text, **Preview** comes back to the rendering of what is in the editor. Images (`.png`, `.jpg`, `.gif`, `.webp`, `.svg`…) only have a preview: click the image for its actual size, again to fit it.

- Images and links relative to the document are looked for in the agent's folder: a link to another file opens it here, a link to a site opens the browser.
- An HTML page is shown in a frame that runs no script and reaches nothing: its images and style sheets of the folder are put inside it, its links do nothing.
- The preview follows the agent's changes, like the editor.
- **Mermaid diagrams** (issue #116): a ` ```mermaid ` block of a Markdown file, or a `[mermaid]` / `[source,mermaid]` block of an AsciiDoc file, is drawn in the preview, in the light or dark theme of Sidekicks. A diagram that cannot be drawn keeps its code, with the error under it. Only the preview draws them: in a conversation, a mermaid block stays code.

## Open a file an agent links to in its answer

When an agent writes a document and gives a link to it in its answer, click the link: the file opens in a panel at the right of the conversation, which stays in view.

- The panel previews Markdown, AsciiDoc, HTML and images as above. Source code (Go, TypeScript, Python, shell, YAML… the languages of the editor) is coloured like in the **Files** tab, read-only, with line numbers (issue #117); any other text file is shown as is. Links of the document to other files of the folder open in the same panel.
- **📂 Show where it is** opens the Finder (macOS) or the Explorer (Windows) with the file selected. It shows only when the agent's folder is on this computer: an agent on this computer, or in a container or sandbox whose folder is mounted from here.
- **Open in the agent's files** shows the file in the **Files** tab, to change it. **↻** reads it again after the agent changed it.
- **×** or **Escape** closes the panel; drag its left edge to resize it.
- Each channel and direct conversation has its own panel: it is hidden when you go to another one, and shows again when you come back, unless you closed it.

The link must lead to a file of the agent's folder: a path relative to the folder (`notes/plan.md`), an absolute path inside it (as the agent or this computer sees it), or a `file://` address of such a path. A link to a site opens the browser; any other link shows why the file cannot be shown, and nothing outside the folder is read. To get links that open, tell the agent in its `AGENTS.md`, e.g. "When you write a file, give a Markdown link to it, relative to your folder".

## Create, rename, move or delete files

- **Create**: select a folder (or a file in it), click **+ New file** (or **+ New folder**), type a name, Enter. A new file opens, empty.
- **Select several entries**: ⌘-click (Ctrl-click on Windows and Linux) adds an entry to the selection or takes it out; ⇧-click selects every row up to it; ⌘A (Ctrl+A) selects every row shown. The actions below then apply to the whole selection.
- **Rename**: hover the entry and click **✏️**, double-click it, or select it and press **F2**. Type the new name, Enter (Escape cancels). An open file follows its new name, even with unsaved changes.
- **Move**: drag entries onto a folder (or onto a file, to go next to it; below the rows for the top of the folder). Without the mouse, right-click → **Move to…** and type the folder (empty for the top). A folder never goes inside itself, and nothing replaces an entry that already has the name.
- **Duplicate**: right-click → **Duplicate**, or select and press ⌘D (Ctrl+D). The copy goes next to the original, with `-copy` before the extension (`plan.md` → `plan-copy.md`, then `plan-copy-2.md`…); a folder is copied with its content. A protected file can be duplicated, and its copy is not protected — unless it lands in a protected folder, which is refused.
- **Right-click** an entry for a menu with all these actions, and **Show where it is**.
- **Delete**: hover the entry and click **🗑** (or **Delete** under the editor, or press **Delete** — ⌘⌫ on a Mac — in the tree), then confirm; with several entries selected, one confirmation covers them all. On this computer the file goes to the trash — restore it from the Finder if needed. In a container the deletion is final, and the confirmation says so.

## Give the agent its instructions

An agent reads its **instructions** when its session starts: its role, its tone, its rules, in a Markdown file of its folder — `AGENTS.md` for most agents, `CLAUDE.md` for Claude (issue #113). Open the **Instructions** tab of the agent's workspace:

- **Create from a template**: when the agent has none yet, Sidekicks writes a short template named after the agent (its role, how it answers, its rules). Fill it in with plain words.
- Change the text in the editor of the tab, then **Save** (⌘S, Ctrl+S on Linux and Windows); **Revert** drops your changes. If the file changed meanwhile — the agent may write it too — Sidekicks says so and writes nothing: **Reload**, then make your changes again.
- **Import a file…** copies a text file of this computer as the agent's instructions (it replaces them, after you confirm). You can also **drop** one text file from the Finder on the tab (issue #121): the same import, with the same confirmation.
- **Delete the instructions** removes the instruction file, after you confirm (issue #122): it goes to the trash of this computer, and the tab offers the template and the import again.
- The agent reads its instructions when its session starts: when it is running, **Restart the agent** so that it uses the new ones.

The instruction file stays protected in the **Files** tab (below): only the **Instructions** tab writes it, and deletes it. It works the same for an agent on this computer, in a Docker container or in an sbx sandbox.

## Give the agent skills

A **skill** teaches the agent how to do one kind of task: a folder holding a `SKILL.md`, whose name and description tell the agent when to use it (the Agent Skills format every agent reads). The agent uses a skill when its description fits what you ask, or when you call it with `/` (issue #112). Open the **Skills** tab of the agent's workspace: it says where the agent reads its skills — `.claude/skills` for Claude, `.agents/skills` for Codex, Antigravity and Copilot, `.vibe/skills` for Vibe, `skills` (or the `skillsDir` of its `agent.yaml`) for mini-me — and lists them.

- **New skill**: say what it does (its folder's name follows, in lowercase letters, digits and `-`) and when to use it, then **Create the skill**. Sidekicks writes a `SKILL.md` to fill in: when to use it, how to do it, an example.
- Pick a skill to read or change its `SKILL.md`, then **Save** (⌘S); a change made meanwhile is reported, as for the instructions.
- **Import a skill folder…** copies a folder holding a `SKILL.md`, with its other files (scripts, examples) and without hidden ones; **Import a Markdown file…** turns one file into the `SKILL.md` of a new skill, named after the name of its front matter, else after the file. A skill that has the same name is never replaced. You can also **drop** `.md` files and skill folders from the Finder on the list of skills (issue #120): each becomes a skill, and the ones refused are listed with why.
- **Delete the skill** removes the skill you picked, after you confirm (issue #119): its whole folder — or its single file for a mini-me `<name>.md` — goes to the trash of this computer.
- The agent finds its skills when its session starts: when it is running, **Restart the agent**.

The skills folders stay protected in the **Files** tab: only the **Skills** tab writes there, and deletes a skill. For an agent in a container or a sandbox, Sidekicks writes its instructions and its skills in its folder on this computer: it works even when the agent sees that folder read-only (mini-me's `.mm`), and without the sandbox running. mini-me's one-file skills (`<name>.md`) are listed too.

### Vibe: trust its folder

Mistral Vibe reads the instructions and the skills of its folder only once the folder is **trusted** (issue #125). When a Vibe agent starts a session in a folder it does not trust yet and that holds instructions or skills, the conversation says so, with the files it ignores, and offers **Trust its folder**: Vibe then remembers the decision, and reads them from its next answer. Trusting the folder also lets its own Vibe settings (`.vibe/`) apply: trust only a folder you know.

## Protect files

Some files must not be changed or deleted by mistake. Without writing anything, the agent's instructions (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — written only from the **Instructions** tab), its skills (`skills/` and all it holds), its configuration file (after `--config` or `serve acp` in its `args`) and, for an agent in a container or a sandbox, the files it is built from (`compose.yaml`, `Dockerfile`, `sbxenv.yaml` named by its `runtime.lifecycle`) are protected. To protect others, list them under the agent in **Settings**:

```yaml
  - name: milo
    protect: [notes/plan.md, "prompts/**"]
```

A protected file shows 🔒 instead of ✏️ and 🗑 and opens read only; it can be neither renamed nor moved, and a folder holding one can be neither deleted nor moved. When one of several selected entries is protected, nothing is deleted. Only the configuration lifts a protection (the ones always applied cannot be lifted): the interface never does. The agent, the terminal and the Finder can still change these files.

## Run commands in the agent's folder

Click **Terminal**: a shell opens in the agent's folder — yours on this computer, bash or sh inside a container. Full-screen programs (`vim`, `htop`) work and follow the size of the panel. When the shell ends (`exit`), **Open a new shell** starts another one.

- **Several terminals**: **+** next to the terminals opens another one (8 at most per agent), named *Terminal 1*, *Terminal 2*…; click a name to show it. **×** closes a terminal: its shell ends, with everything it started; the others go on.
- **They keep running**: go to **Files**, a conversation, a channel or another agent — the terminals go on, with what runs in them, and what they print meanwhile is kept. Coming back to the agent shows its terminals as they are. The **Terminal** tab shows how many are running, and the agent's row in the **Agents** panel shows **⌨ 2**.
- A terminal ends only when you close it, when its shell exits, when another configuration file is opened, or when Sidekicks quits.

## Read the agent's log

**Log** shows the last lines the agent wrote on its standard error — what explains an error without opening a terminal.

## Variants

- **Agent in a container**: see [How to run an agent in a Docker container](run-an-agent-in-docker.md).
- **Agent in an `sbx` sandbox**: see [How to run an agent in an sbx sandbox](run-an-agent-in-a-sandbox.md); each file action takes a second or two.

## See also

- [Workspaces and terminals — explanation](../explanation/workspaces-and-terminals.md)
- [Reference: workspaces](../reference/agents-and-events.md#workspaces-milestone-m4)