Protocol-agnostic worker orchestration CLI
Project description
subagent-cli
Orchestrate worker agents from a parent controller, cleanly and safely.
subagent-cli gives manager agents (for example Codex or Claude Code) a practical control plane for starting workers, sending turns, handling approvals, and continuing handoffs. 🤖
The command interface is protocol-agnostic, and the current runtime backend is ACP-based (acp-stdio).
Why subagent-cli? 🚀
- Run multi-agent workflows from one place (
worker starttoworker continue). - Keep control explicit with strict approval operations and structured event flow.
- Recover cleanly with runtime restart + session resume (
session/load). - Stay local-first and scriptable with a single CLI surface.
Current Scope 🧭
- Alpha (
v0.1.x) - Local single-host focused
- Python 3.11+
Features ✨
- Worker lifecycle:
start,list,show,inspect,stop - Turn operations:
send,watch,wait,approve,cancel - Handoff workflow:
worker handoffandworker continue - Strict approval flow with structured events
- ACP runtime integration (
acp-stdio)
Install 📦
With uv (recommended):
uv tool install subagent-cli
From PyPI:
pip install subagent-cli
From local artifacts:
pip install dist/subagent_cli-*.whl
Quick Start ⚡
- Bootstrap your local config.
subagent config init --scope user
-
Set launcher command/args/env in
~/.config/subagent/config.yaml. -
Initialize a controller in your workspace.
subagent controller init --cwd .
- Render manager guidance.
subagent prompt render --target manager
- Hand off from here to your manager agent (Codex / Claude Code).
Use this instruction template:
Act as the project manager for this repository.
Use subagent-cli as the control plane and progress this task by delegating to worker agents.
Required workflow:
1) Read and follow the output of `subagent prompt render --target manager`.
2) Check command help before execution (for example `subagent worker --help`, `subagent send --help`, `subagent approve --help`).
3) Break the task into small executable chunks.
4) Start/coordinate workers with subagent-cli.
5) Use send/watch/wait/approve to drive each turn.
6) Use handoff/continue when context gets large.
7) Verify results (tests or checks) before reporting completion.
Task to execute:
<your task here>
After handoff, the manager agent is expected to run the normal CLI lifecycle:
worker start -> send -> watch -> approve -> handoff -> continue
For local simulation/testing without a real ACP launcher:
subagent worker start --cwd . --debug-mode
Troubleshooting 🛠️
- Ensure the runtime has the permissions required by your launcher (some launchers need outbound network access).
- Preflight launcher availability:
subagent launcher probe <launcher-name> --json
- If
worker startfails withBACKEND_UNAVAILABLE, inspect runtime logs under~/.local/share/subagent/runtimes/(or$SUBAGENT_STATE_DIR/runtimes/when overridden). - For cut-down local testing without backend connectivity:
subagent worker start --cwd . --debug-mode
Configuration ⚙️
- Resolution order:
--config>SUBAGENT_CONFIG> nearest<cwd-or-parent>/.subagent/config.yaml>~/.config/subagent/config.yaml - Generate user config:
subagent config init --scope user - Generate project config:
subagent config init --scope project --cwd . - Override config path:
SUBAGENT_CONFIG=/path/to/config.yaml - Example config: config.example.yaml
State 💾
- Default state DB:
~/.local/share/subagent/state.db - Project hint file:
<workspace>/.subagent/controller.json
Documentation 📚
- Architecture note: docs/ARCHITECTURE.md
- Examples: docs/examples
- Contributing and release process: CONTRIBUTING.md
License
MIT (LICENSE)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file subagent_cli-0.1.3.tar.gz.
File metadata
- Download URL: subagent_cli-0.1.3.tar.gz
- Upload date:
- Size: 83.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9313827154563f6ed9a97aeaf2d80b4b5b26a087f8c03a55fd461c501c3ecae6
|
|
| MD5 |
5cce3e07d37691c67d05327f78de70b8
|
|
| BLAKE2b-256 |
2cc279be8d473d6c99b3263c2669750c0cf37469da95200bcc6c9c1dd04ccd26
|
Provenance
The following attestation bundles were made for subagent_cli-0.1.3.tar.gz:
Publisher:
publish-pypi.yml on otakumesi/subagent-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
subagent_cli-0.1.3.tar.gz -
Subject digest:
9313827154563f6ed9a97aeaf2d80b4b5b26a087f8c03a55fd461c501c3ecae6 - Sigstore transparency entry: 1008255137
- Sigstore integration time:
-
Permalink:
otakumesi/subagent-cli@6e463a32e8173030f5b3d6e71ce925ffe8379b9a -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/otakumesi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@6e463a32e8173030f5b3d6e71ce925ffe8379b9a -
Trigger Event:
release
-
Statement type:
File details
Details for the file subagent_cli-0.1.3-py3-none-any.whl.
File metadata
- Download URL: subagent_cli-0.1.3-py3-none-any.whl
- Upload date:
- Size: 55.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83af79249965a40ab3abb3fbed0afdba52ad64ebb2bf50b959596740a7c2c14a
|
|
| MD5 |
1adfb920b5097fe6e39f9c63b0abe651
|
|
| BLAKE2b-256 |
1eefddf18614bc05c6c871ff35e1a1e28d2cd2cebdf456002b1a27bde01a0ee2
|
Provenance
The following attestation bundles were made for subagent_cli-0.1.3-py3-none-any.whl:
Publisher:
publish-pypi.yml on otakumesi/subagent-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
subagent_cli-0.1.3-py3-none-any.whl -
Subject digest:
83af79249965a40ab3abb3fbed0afdba52ad64ebb2bf50b959596740a7c2c14a - Sigstore transparency entry: 1008255138
- Sigstore integration time:
-
Permalink:
otakumesi/subagent-cli@6e463a32e8173030f5b3d6e71ce925ffe8379b9a -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/otakumesi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@6e463a32e8173030f5b3d6e71ce925ffe8379b9a -
Trigger Event:
release
-
Statement type: