Skip to main content

Protocol-agnostic worker orchestration CLI

Project description

subagent-cli

PyPI version Python versions License Publish to PyPI Status: Alpha

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 start to worker 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 handoff and worker 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 ⚡

  1. Bootstrap your local config.
subagent config init --scope user
  1. Set launcher command/args/env in ~/.config/subagent/config.yaml.

  2. Initialize a controller in your workspace.

subagent controller init --cwd .
  1. Render manager guidance.
subagent prompt render --target manager
  1. 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 start fails with BACKEND_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 📚

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

subagent_cli-0.1.3.tar.gz (83.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

subagent_cli-0.1.3-py3-none-any.whl (55.9 kB view details)

Uploaded Python 3

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

Hashes for subagent_cli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9313827154563f6ed9a97aeaf2d80b4b5b26a087f8c03a55fd461c501c3ecae6
MD5 5cce3e07d37691c67d05327f78de70b8
BLAKE2b-256 2cc279be8d473d6c99b3263c2669750c0cf37469da95200bcc6c9c1dd04ccd26

See more details on using hashes here.

Provenance

The following attestation bundles were made for subagent_cli-0.1.3.tar.gz:

Publisher: publish-pypi.yml on otakumesi/subagent-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for subagent_cli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 83af79249965a40ab3abb3fbed0afdba52ad64ebb2bf50b959596740a7c2c14a
MD5 1adfb920b5097fe6e39f9c63b0abe651
BLAKE2b-256 1eefddf18614bc05c6c871ff35e1a1e28d2cd2cebdf456002b1a27bde01a0ee2

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page