bots-garden/sidekickspublic Fork
⑂ main
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
create-an-agent-in-a-sandbox.md · 36 lines · 6.6 KBmarkdown
Blame HistoryOpen raw

How to create a Claude, Antigravity, Codex, Vibe or Copilot agent in a sandbox

This guide shows how to create a new Claude, Antigravity, Codex, Vibe or Copilot agent that runs in a Docker Sandbox, from the Sidekicks window, without writing a file or choosing a folder. It assumes sbx (Docker Sandboxes) is installed, and that you have an API key of the agent's company — or will get one during the steps (for Copilot: a GitHub account with a Copilot subscription). To add a sandbox that already exists, use How to add an agent instead.

Steps

  1. Open the assistant: ✨ Create a Claude, Antigravity, Codex, Vibe or Copilot agent on the welcome screen, ✨ Create an agent in a sandbox under the agents list, or Create an agent in a sandbox in the command palette (⌘K, Ctrl+K on Linux and Windows).
  2. Choose the agent: Claude (Anthropic's Claude Code), Antigravity (Google Antigravity, with the Gemini models), Codex (OpenAI's), Vibe (Mistral AI's) or Copilot (GitHub's Copilot CLI).
  3. If sbx does not hold its key yet, paste it in API key and click Save the key. Get a key… opens the page where the company gives you one. Sidekicks hands the key to sbx, which keeps it and gives it to your sandboxes for their calls to that company only; it is never written in a file. A key already saved is shown as ✓ Your … key is stored in sbx.
    For Copilot, it is not an API key but a GitHub token allowed to use Copilot, and your GitHub account needs a Copilot subscription. If the GitHub CLI (gh) is installed, the simplest is Use my GitHub account: Sidekicks takes its token (gh auth token) without showing it. When gh is not signed in yet, Sign in to GitHub shows a code and Open the sign-in page: check the code on the page, confirm, and the assistant goes on by itself. Without gh, Create a token on GitHub… opens the page of a fine-grained token: give it the Copilot Requests permission, paste it in GitHub token and click Save the token. sbx stores it twice — copilot, for the sandbox's calls to Copilot, and github, for git and gh in the sandbox: the agent can then work on your GitHub repositories with your account.
    For Codex, you can use your ChatGPT account instead of an API key: Sign in with my ChatGPT account runs sbx secret set openai --oauth, which opens your browser; sign in there, and the assistant goes on by itself once sbx has kept the sign-in (in your keychain: the sandbox never sees it). You can also click Later: see below.
  4. Give the agent its last details: Name shown, Name (what you call it with, @claude, and the name of its folder and of its sandbox: lowercase letters, digits and -, starting with a letter) and an Emoji (the agent's logo is chosen first). The Name follows the Name shown (Marcel (assistant) gives marcel-assistant) until you type it yourself; Sidekicks always suggests one nobody uses yet, and says so before you click when the one you typed is taken.
  5. Click Add the agent. Its conversation opens. Its sandbox is created the first time you write to it, so that first answer takes a while: the conversation shows what is happening — the step, the time elapsed, what sbx is downloading. The details are in the agent's log (Log panel).

The agent's folder is created in the Sidekicks-Agents folder of your Documents, named after the agent (~/Documents/Sidekicks-Agents/claude): its sbxenv.yaml and its workspace/ folder, where the agent works.

When something goes wrong

  • "sbx (Docker Sandboxes) is not installed on this computer": install sbx, then click Try again.
  • "sbx needs you to be signed in to Docker": click Sign in to Docker. Sidekicks shows a code: click Open the sign-in page, check that the page shows the same code, confirm and sign in with your Docker account (a free one is enough). The assistant goes on by itself once you are signed in. The same button appears under the error of an sbx agent that cannot start. If it does not work, type sbx login in a terminal once.
  • "Another agent already has this name", "A folder with this name already exists" or "A sandbox with this name already exists": change the Name and click Add the agent again. An existing folder or sandbox is never changed.
  • "No … key in sbx yet" (after Later): the agent cannot answer. Run the assistant again to save the key, or type sbx secret set anthropic (google for Antigravity, openai for Codex, mistral for Vibe, copilot and github for Copilot — for example sbx secret set copilot --command 'gh auth token' then the same with github) in a terminal.
  • Claude without an API key (issues #105 and #106): click Later and sign in with your Claude account instead. The assistant says so. At the first answer, Claude ends with "The agent is not signed in": Sidekicks opens the agent's Terminal, runs claude in its sandbox and tells you what to do — type /login, choose your account and follow the steps (copy the link into your browser if asked). Then click I am signed in: restart the agent: you are back in the conversation; send your message again. If you closed that terminal, Sign in in its terminal under the error opens it again.
  • Antigravity without an API key (issue #109): the same as Claude, with your Google account. Click Later; at the first answer, Sidekicks opens the agent's Terminal and runs agy there: follow its steps to sign in (if it shows a link, copy it into your browser, sign in and paste back the code it gives if asked), then click I am signed in: restart the agent.
  • Codex without a key nor a ChatGPT sign-in (issue #107): when its sandbox is created, sbx asks whether to sign in to OpenAI on the web. Sidekicks cannot answer that question, so the agent stops with "sbx asks to sign in to OpenAI…" and a Sign in with my ChatGPT account button — in the conversation and in the Agents panel. Sign in in your browser: the agent starts again by itself.

Variants

  • Replace a key: choose the same agent again and click Replace the key. Every sandbox uses the new key from its next start.
  • Another folder: set agentsFolder in Settings; the next agents are created there.

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
# How to create a Claude, Antigravity, Codex, Vibe or Copilot agent in a sandbox

This guide shows how to create a new Claude, Antigravity, Codex, Vibe or Copilot agent that runs in a Docker Sandbox, from the Sidekicks window, without writing a file or choosing a folder. It assumes [sbx](https://docs.docker.com/ai/sandboxes/) (Docker Sandboxes) is installed, and that you have an API key of the agent's company — or will get one during the steps (for Copilot: a GitHub account with a Copilot subscription). To add a sandbox that already exists, use [How to add an agent](add-an-agent.md) instead.

## Steps

1. Open the assistant: **✨ Create a Claude, Antigravity, Codex, Vibe or Copilot agent** on the welcome screen, **✨ Create an agent in a sandbox** under the agents list, or **Create an agent in a sandbox** in the command palette (⌘K, Ctrl+K on Linux and Windows).
2. Choose the agent: **Claude** (Anthropic's Claude Code), **Antigravity** (Google Antigravity, with the Gemini models), **Codex** (OpenAI's), **Vibe** (Mistral AI's) or **Copilot** (GitHub's Copilot CLI).
3. If sbx does not hold its key yet, paste it in **API key** and click **Save the key**. **Get a key…** opens the page where the company gives you one. Sidekicks hands the key to sbx, which keeps it and gives it to your sandboxes for their calls to that company only; it is never written in a file. A key already saved is shown as **✓ Your … key is stored in sbx**.
   For **Copilot**, it is not an API key but a **GitHub token** allowed to use Copilot, and your GitHub account needs a Copilot subscription. If the GitHub CLI (`gh`) is installed, the simplest is **Use my GitHub account**: Sidekicks takes its token (`gh auth token`) without showing it. When `gh` is not signed in yet, **Sign in to GitHub** shows a code and **Open the sign-in page**: check the code on the page, confirm, and the assistant goes on by itself. Without `gh`, **Create a token on GitHub…** opens the page of a fine-grained token: give it the **Copilot Requests** permission, paste it in **GitHub token** and click **Save the token**. sbx stores it twice — `copilot`, for the sandbox's calls to Copilot, and `github`, for `git` and `gh` in the sandbox: the agent can then work on your GitHub repositories with your account.
   For **Codex**, you can use your **ChatGPT account** instead of an API key: **Sign in with my ChatGPT account** runs `sbx secret set openai --oauth`, which opens your browser; sign in there, and the assistant goes on by itself once sbx has kept the sign-in (in your keychain: the sandbox never sees it). You can also click **Later**: see below.
4. Give the agent its last details: **Name shown**, **Name** (what you call it with, `@claude`, and the name of its folder and of its sandbox: lowercase letters, digits and `-`, starting with a letter) and an **Emoji** (the agent's logo is chosen first). The **Name** follows the **Name shown** (`Marcel (assistant)` gives `marcel-assistant`) until you type it yourself; Sidekicks always suggests one nobody uses yet, and says so before you click when the one you typed is taken.
5. Click **Add the agent**. Its conversation opens. Its sandbox is created the first time you write to it, so that first answer takes a while: the conversation shows what is happening — the step, the time elapsed, what sbx is downloading. The details are in the agent's log (**Log** panel).

The agent's folder is created in the **Sidekicks-Agents** folder of your Documents, named after the agent (`~/Documents/Sidekicks-Agents/claude`): its `sbxenv.yaml` and its `workspace/` folder, where the agent works.

## When something goes wrong

- **"sbx (Docker Sandboxes) is not installed on this computer"**: install sbx, then click **Try again**.
- **"sbx needs you to be signed in to Docker"**: click **Sign in to Docker**. Sidekicks shows a code: click **Open the sign-in page**, check that the page shows the same code, confirm and sign in with your Docker account (a free one is enough). The assistant goes on by itself once you are signed in. The same button appears under the error of an sbx agent that cannot start. If it does not work, type `sbx login` in a terminal once.
- **"Another agent already has this name"**, **"A folder with this name already exists"** or **"A sandbox with this name already exists"**: change the **Name** and click **Add the agent** again. An existing folder or sandbox is never changed.
- **"No … key in sbx yet"** (after **Later**): the agent cannot answer. Run the assistant again to save the key, or type `sbx secret set anthropic` (`google` for Antigravity, `openai` for Codex, `mistral` for Vibe, `copilot` and `github` for Copilot — for example `sbx secret set copilot --command 'gh auth token'` then the same with `github`) in a terminal.
- **Claude without an API key** (issues #105 and #106): click **Later** and sign in with your Claude account instead. The assistant says so. At the first answer, Claude ends with "The agent is not signed in": Sidekicks opens the agent's **Terminal**, runs `claude` in its sandbox and tells you what to do — type `/login`, choose your account and follow the steps (copy the link into your browser if asked). Then click **I am signed in: restart the agent**: you are back in the conversation; send your message again. If you closed that terminal, **Sign in in its terminal** under the error opens it again.
- **Antigravity without an API key** (issue #109): the same as Claude, with your Google account. Click **Later**; at the first answer, Sidekicks opens the agent's **Terminal** and runs `agy` there: follow its steps to sign in (if it shows a link, copy it into your browser, sign in and paste back the code it gives if asked), then click **I am signed in: restart the agent**.
- **Codex without a key nor a ChatGPT sign-in** (issue #107): when its sandbox is created, sbx asks whether to sign in to OpenAI on the web. Sidekicks cannot answer that question, so the agent stops with "sbx asks to sign in to OpenAI…" and a **Sign in with my ChatGPT account** button — in the conversation and in the Agents panel. Sign in in your browser: the agent starts again by itself.

## Variants

- **Replace a key**: choose the same agent again and click **Replace the key**. Every sandbox uses the new key from its next start.
- **Another folder**: set [`agentsFolder`](../reference/configuration.md#top-level) in **Settings**; the next agents are created there.

## See also

- [How to run an agent in an sbx sandbox](run-an-agent-in-a-sandbox.md) — what an sbx agent is, and its sandbox's lifecycle.
- [How to create a mini-me agent](create-a-mini-me-agent.md) — the same idea for mini-me.
- How it works: [`SbxCreatorService`](../reference/agents-and-events.md#sbxcreatorservice)