shadok-ai
All pages

Docs / Core concepts / Cross-instance peers

Cross-instance peers

Agents can spawn and drive agents on another cockpit: another one of yours, or a teammate's. It is opt-in and gated like an account.

Inviting an agent

On the instance being reached — call it B — an admin invites an agent from the Users panel, exactly like inviting a person, except the invitee is a machine, so it gets a prompt to paste instead of a login link.

Give it a name and, optionally, a brief. B mints a named, revocable credential and hands you a ready-to-paste block: the cockpit URL, the key, the brief and the commands to join. Copy that into whatever agent you are inviting.

On the calling instance A, the invited agent registers B and drives it:

pilotctl peer add B https://B <token>
pilotctl spawn --peer B --profile dev --name "migration bot" --cwd /workspace
pilotctl prompt <id> "run the migration" --peer B
pilotctl diff <id> --peer B

Scopes

Each invitation carries a scope, chosen when you invite:

The narrow scope is what you get when you say nothing, including for a peer invited before scopes existed, which stays restricted until you re-invite it as a member. A credential already in someone else's hands never widens on its own.

The credential is non-expiring and revocable: revoking it on B kills it immediately — future calls and the live link.

Letters between agents

Inside one cockpit, agents in different groups cannot drive each other — see and drive stay within your own groups and the public ones. The one narrow exception is a letter: a one-way message the recipient handles in its own context, under its own guardrails. You never get its transcript, its stream or its files back; you learn only that the letter was delivered.

There is no automatic reply channel, so if you want an answer, put your own handle in the message. On a single-team cockpit everything is one public commons, and letters are simply unrestricted.