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
add-a-kind-to-the-sandbox-assistant.md · 46 lines · 4.1 KBmarkdown
Blame HistoryOpen raw

How to add a kind of agent to the sandbox assistant

This guide is for developers of Sidekicks. It shows how to add a kind of agent — Claude, Antigravity, Codex, Vibe, Copilot… — to the assistant that creates an agent in a Docker Sandbox (How to create a Claude, Antigravity, Codex, Vibe or Copilot agent in a sandbox), and where the sbxenv.yaml it writes comes from. It assumes the development setup of How to develop the application, and that you know the agent's sbx kit, its ACP program and the sbx secret service of its key.

Where the sbxenv.yaml comes from

There is no template file. The assistant writes each agent's sbxenv.yaml from Go, in internal/sbxcreate/sbxcreate.go:

What Where Holds
Catalogue internal/sbxcreate/sbxcreate.go One Kind per kind of agent, in the order the assistant shows them: its id, title, default icon, sbx agent:, kit, ACP program, secret service and its domains (Bindings), and what its key step offers (Token, FromGH, SignIn, OAuth).
Render(kind, name) same file The text of the sbxenv.yaml: the sandbox's name, agent:, workspace: ./workspace, kits:, bindings: (the kind's service, then Shared ones), pullPolicy: always, with English comments. The same for every kind: only the catalogue entry changes.
Write(folder, kind, name) same file Creates <agentsFolder>/<name>/ with that sbxenv.yaml and an empty workspace/.

The sbxenv.yaml files of agents/ and citizens/ in the repository are test agents and examples: Sidekicks does not read them to create agents.

Steps

  1. Add an entry to Catalogue in internal/sbxcreate/sbxcreate.go, with a comment that says where the kit and the program come from:

    {
        ID: "vibe", Title: "Vibe", Icon: "logo:mistral",
        Agent: "vibe", Kit: "docker.io/sbx/vibe-kit:latest", Program: "vibe-acp",
        Service: "mistral", KeyURL: "https://console.mistral.ai/api-keys",
        Bindings: Binding{APIKey: []string{"api.mistral.ai"}},
    },
    

    ID is also the name suggested for the agent: lowercase letters, digits and -. Program is the program, then its arguments, on one line (agy acp).

  2. Give it its line in the assistant, in English and in French, in frontend/src/lib/i18n/messages.ts: 'sbxCreator.kind.<id>' (what it is, under its title), and the kind in the lists welcome.createSbxFirst and action.createSbxAgent.

  3. If its key step is not a plain API key, set the field that fits:

    • Token: true — a token of the user's account (Copilot);
    • FromGH: true — that token can come from gh auth token;
    • Shared — more sbx services that get the same secret, each with its domains;
    • SignIn: "<program>" — the user can sign in with /login in that program, in the agent's terminal (Claude);
    • OAuth: true — sbx secret set <service> --oauth signs in with an account (Codex).
  4. For a logo, add it to frontend/src/lib/logos.ts (one SVG path in a 24×24 view box, its colour, its source and licence in the comment at the top) and its name to LogoNames in internal/config/config.go, in the same order: a Go test compares both lists. Then logo:<name> in the schema's description of icon (schema/config.schema.json).

  5. So that the "Add an agent" assistant recognises a sandbox of that agent, map its agent: to its program in programOfSandbox (frontend/src/lib/agentform.ts).

  6. Update the tests that list the catalogue (internal/sbxcreate/sbxcreate_test.go), run make bindings if a field of Kind changed, then make verify.

  7. Document it: the catalogue table of SbxCreatorService, the guide How to create a … agent in a sandbox, both in English and in French, and the release notes.

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
# How to add a kind of agent to the sandbox assistant

This guide is for developers of Sidekicks. It shows how to add a kind of agent — Claude, Antigravity, Codex, Vibe, Copilot… — to the assistant that creates an agent in a Docker Sandbox ([How to create a Claude, Antigravity, Codex, Vibe or Copilot agent in a sandbox](create-an-agent-in-a-sandbox.md)), and where the `sbxenv.yaml` it writes comes from. It assumes the development setup of [How to develop the application](develop-the-application.md), and that you know the agent's sbx kit, its ACP program and the sbx secret service of its key.

## Where the `sbxenv.yaml` comes from

There is **no template file**. The assistant writes each agent's `sbxenv.yaml` from Go, in `internal/sbxcreate/sbxcreate.go`:

| What | Where | Holds |
| --- | --- | --- |
| `Catalogue` | `internal/sbxcreate/sbxcreate.go` | One `Kind` per kind of agent, in the order the assistant shows them: its id, title, default icon, sbx `agent:`, kit, ACP program, secret service and its domains (`Bindings`), and what its key step offers (`Token`, `FromGH`, `SignIn`, `OAuth`). |
| `Render(kind, name)` | same file | The text of the `sbxenv.yaml`: the sandbox's name, `agent:`, `workspace: ./workspace`, `kits:`, `bindings:` (the kind's service, then `Shared` ones), `pullPolicy: always`, with English comments. The same for every kind: only the catalogue entry changes. |
| `Write(folder, kind, name)` | same file | Creates `<agentsFolder>/<name>/` with that `sbxenv.yaml` and an empty `workspace/`. |

The `sbxenv.yaml` files of `agents/` and `citizens/` in the repository are test agents and examples: Sidekicks does not read them to create agents.

## Steps

1. Add an entry to `Catalogue` in `internal/sbxcreate/sbxcreate.go`, with a comment that says where the kit and the program come from:

   ```go
   {
       ID: "vibe", Title: "Vibe", Icon: "logo:mistral",
       Agent: "vibe", Kit: "docker.io/sbx/vibe-kit:latest", Program: "vibe-acp",
       Service: "mistral", KeyURL: "https://console.mistral.ai/api-keys",
       Bindings: Binding{APIKey: []string{"api.mistral.ai"}},
   },
   ```

   `ID` is also the name suggested for the agent: lowercase letters, digits and `-`. `Program` is the program, then its arguments, on one line (`agy acp`).
2. Give it its line in the assistant, in English and in French, in `frontend/src/lib/i18n/messages.ts`: `'sbxCreator.kind.<id>'` (what it is, under its title), and the kind in the lists `welcome.createSbxFirst` and `action.createSbxAgent`.
3. If its key step is not a plain API key, set the field that fits:
   - `Token: true` — a token of the user's account (Copilot);
   - `FromGH: true` — that token can come from `gh auth token`;
   - `Shared` — more sbx services that get the same secret, each with its domains;
   - `SignIn: "<program>"` — the user can sign in with `/login` in that program, in the agent's terminal (Claude);
   - `OAuth: true` — `sbx secret set <service> --oauth` signs in with an account (Codex).
4. For a logo, add it to `frontend/src/lib/logos.ts` (one SVG path in a 24×24 view box, its colour, its source and licence in the comment at the top) and its name to `LogoNames` in `internal/config/config.go`, in the same order: a Go test compares both lists. Then `logo:<name>` in the schema's description of `icon` (`schema/config.schema.json`).
5. So that the "Add an agent" assistant recognises a sandbox of that agent, map its `agent:` to its program in `programOfSandbox` (`frontend/src/lib/agentform.ts`).
6. Update the tests that list the catalogue (`internal/sbxcreate/sbxcreate_test.go`), run `make bindings` if a field of `Kind` changed, then `make verify`.
7. Document it: the catalogue table of [`SbxCreatorService`](../reference/agents-and-events.md#sbxcreatorservice), the guide [How to create a … agent in a sandbox](create-an-agent-in-a-sandbox.md), both in English and in French, and the release notes.

## See also

- [`SbxCreatorService`](../reference/agents-and-events.md#sbxcreatorservice) — the catalogue table and the service's methods.
- [How to run an agent in an sbx sandbox](run-an-agent-in-a-sandbox.md) — what an `sbxenv.yaml` is.