Skip to main content
Spawn another Beige agent (or a sub-agent of yourself) and hold a multi-turn conversation with it. Each call returns the target agent’s full response plus a session key for follow-up turns.

Installation

Install this tool individually:
Or install all tools from the toolkit:

Configuration

No spawns are permitted until targets is explicitly configured — installing the tool changes nothing until you opt in. When any config is provided (even just maxDepth), the targets map must still be set to allow spawns.

Prerequisites

No external dependencies. The tool uses beige’s internal agent manager and session store.

The SELF Keyword

The special target key "SELF" resolves to the calling agent’s name at runtime, enabling sub-agent patterns without hardcoding agent names:
  • When coder calls the tool, "SELF""coder"
  • When reviewer calls the tool, "SELF""reviewer"
This is particularly useful in the top-level config — every agent with this tool gets the ability to spawn sub-agents of itself.

Depth Limiting

Each target can override the default maxDepth independently. For example, you might allow deep nesting for sub-agents (SELF: { maxDepth: 3 }) while keeping cross-agent spawns shallow.

Config Examples

Basic setup — coder and reviewer can spawn each other:
Sub-agent support — every agent can spawn itself:

Per-Agent Configuration (pluginConfigs)

Since beige supports per-agent pluginConfigs overrides (deep-merged with the top-level tool config), different agents can have different target lists:
Note: pluginConfigs values are deep-merged with the top-level config. In the example above, coder’s effective targets are { "SELF": {}, reviewer: {} } — the baseline SELF entry is preserved and reviewer is added.

Security Model

Error Reference

Implementation Details

  • Target: Gateway (runs on the host, not in the sandbox)
  • No dependencies: Uses beige’s internal agent manager
  • Session persistence: Sessions persist across gateway restarts in ~/.beige/sessions/