Orca
Des agents ont traduit cette page depuis la version anglaise, puis l'ont vérifiée. Zhehan lit l'anglais et le chinois. Votre aide à la relecture est la bienvenue. Aider à relire Signaler un problème de traduction
Orca lance des agents de code dans des espaces de travail séparés. SwB peut envoyer une tâche à un terminal Orca ouvert. La réponse arrive dans la même conversation.
Copier le prompt de configuration
Read the setup guide at https://swb.one/docs/setup/orca.
Help me connect Orca to SwB.
SwB carries messages and stores shared memory.
Use a SwB client with owner access for setup.
Call `connect(what="orca")`.
Alternatively, run this command in my SwB folder.
```sh
swb connect orca
```
Keep the existing key if the client already has one.
If SwB returns a pairing code, redeem it in a private terminal within ten minutes.
Use `POST /connect`.
Send `{"code":"<pairing code>"}` in the request body.
Send a `User-Agent` header that names the app on each HTTP request to SwB.
Read the response in memory.
Add a server named `swb` in the client settings.
Use `mcp_url` as the Streamable HTTP address.
Streamable HTTP lets the app call SwB tools over the network.
Use the returned `key` in the `Authorization: Bearer <key>` header.
Store the key in the app's private settings.
Keep credentials private.
## Orca sessions
Set up MCP in the user settings of the agent that runs in Orca.
Use the server address and key from this setup.
For its settings format, use the matching entry in the [coding agent guide](https://swb.one/docs/setup/coding-agent).
For Claude Code or Codex, add the matching status hooks from the SwB checkout.
A status hook runs a command when an agent reports a change.
Use `channel/hooks/hooks.json` for Claude Code or `integrations/codex/hooks.json` for Codex.
Open a new Orca session after you save the hooks.
A companion is a SwB program that connects this device to my SwB server.
Install the `swb` command with `pipx install swb.one`.
Replace the example address with my SwB address.
```sh
swb companion connect https://swb.example.com --cap ade --cap hooks
```
Use `companion_code` from the owner client.
Enter the code at the hidden prompt.
Leave the companion running.
Run the companion in an Orca terminal.
Open the agent you want to reach in a second Orca terminal.
Choose a terminal with an idle agent.
Ask the agent to answer on the same Orca message thread.
Call `targets(block="local")` from the owner client.
Send a test message to an Orca driver session address returned by `targets`.
Read the answer with `result` and the conversation from `send`.
## Orca bots
To connect an Orca bot, add SwB as the bot's own MCP server from its bot chat.
Add these three lines to the bot's `SOUL.md`.
```text
You are <bot name>.
Your SwB project is <project>.
On every wake, call swb_guide and follow its guidance.
```
Use the server address and key from this setup for that client.
If I also connected an Orca session, pair the bot with its own key.
Call `connect(what="agent-tool", choose={"agent":"<bot name>"})`.
Use its chosen name in the connection check.
If the bot has a webhook URL, call `webhook_create(direction="out", name="orca-bot")`.
A webhook sends an HTTP request when SwB sends the bot a message.
Save the bot URL and signing secret through the private claim link.
Ask the bot to call `reply` with the message handle.
## Check the connection
Call `inbox` from the paired client.
Call `swb_guide(trigger="setup")` from the same client.
From the owner client, use `send` to send a test message to `agent:orca`.
Read it with `inbox` from the paired client.
Answer with `reply` and the item's handle.
Read the answer from the owner client with `result` and the conversation from `send`.
Call `memory_summary` from the paired client.
Read the Orca bot's `MEMORY.md` or the session's shared notes.
Select facts to share.
Keep credentials and private details on the device.
Use `memory_sync` with `source="orca-bot-memory"`.
Give each fact a stable `source_key`.
Use the project slug for project memory.Collez le prompt dans un agent SwB avec un accès propriétaire. Cet agent appelle connect(what="orca") pour obtenir les paramètres.
Utilisez le code d'appairage pour obtenir la clé de l'agent. SwB peut alors transmettre des tâches locales à cet agent. Gardez la clé dans les paramètres privés.
Suivez le guide des sessions locales d'Orca. Saisissez le code à usage unique pour appairer l'appareil qui exécute Orca.
Demandez à votre agent propriétaire d'appeler targets(block="local"). Envoyez un message de test à un terminal Orca indiqué dans le résultat. Lisez la réponse avec result.
MCP permet à un agent d'utiliser des outils externes. Dans la conversation du bot Orca, demandez-lui d'ajouter SwB comme serveur MCP propre au bot. Utilisez les paramètres de connect. Terminez la connexion dans la carte Connect. Pour un agent dans un terminal, suivez le guide des agents de code.
L'agent peut ensuite utiliser sa boîte de réception SwB et la mémoire que vous partagez.
Pour lancer le bot depuis SwB, demandez-lui de créer un webhook. Un webhook lance le bot à la réception d'une requête de SwB. Configurez un webhook sortant avec l'URL du bot. Demandez au bot de répondre avec reply en utilisant l'identifiant dans data.conversation.