Skip to main content

Runner that provisions subagents from configs

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Subagent

Deprecation Notice: This repository is no longer maintained. It has been integrated as a VS Code provider in agentv.

Subagent is a CLI tool for managing workspace agents across different backends. It currently supports VS Code workspace agents with plans to add support for OpenAI Agents, Azure AI Agents, GitHub Copilot CLI and Codex CLI.

Features

VS Code Workspace Agents

Manage isolated VS Code workspaces for parallel agent development sessions:

  • Provision subagents: Create a pool of isolated workspace directories
  • Chat with agents: Automatically claim a workspace and start a VS Code chat session
  • Lock management: Prevent conflicts when running multiple agents in parallel

The project uses uv for dependency and environment management.

Prerequisites

  • Python 3.12+
  • uv installed locally (pip install uv)
  • VS Code installed for workspace agent functionality

Quick Start

Installation

# Install subagent as a uv-managed tool (recommended - makes command globally available)
uv tool install subagent

# Or for development (editable install as global tool)
uv tool install --editable .

Using VS Code Workspace Agents

  1. Provision and optionally warm up subagent workspaces:

    subagent code provision --subagents 5 [--warmup]
    

    This creates 5 isolated workspace directories in ~/.subagent/vscode-agents/. Add --warmup to open the newly provisioned workspaces immediately.

  2. Start a chat with an agent (async mode - default):

    subagent code chat <prompt_file> "Your query here"
    

    This claims an unlocked subagent, copies your prompt file and any attachments, opens VS Code with a wakeup chatmode, and returns immediately. The agent writes its response to a file that you can monitor or read later.

  3. Start a chat with an agent (sync mode - wait for response):

    subagent code chat <prompt_file> "Your query here" --wait
    

    This blocks until the agent completes and prints the response to stdout.

Command Reference

Provision subagents:

subagent code provision --subagents <count> [--force] [--template <path>] [--target-root <path>] [--warmup]
  • --subagents <count>: Number of workspaces to create
  • --force: Unlock and overwrite all subagent directories regardless of lock status
  • --template <path>: Custom template directory
  • --target-root <path>: Custom destination (default: ~/.subagent/vscode-agents)
  • --dry-run: Preview without making changes
  • --warmup: Launch VS Code for the provisioned workspaces once provisioning finishes

Warm up workspaces:

subagent code warmup [--subagents <count>] [--target-root <path>] [--dry-run]
  • --subagents <count>: Number of workspaces to open (default: 1)
  • --target-root <path>: Custom subagent root directory
  • --dry-run: Show which workspaces would be opened

Start a chat with an agent:

subagent code chat <prompt_file> <query> [--attachment <path>] [--wait] [--dry-run]
  • <prompt_file>: Path to a prompt file to copy and attach (e.g., vscode-expert.prompt.md)
  • <query>: User query to pass to the agent
  • --attachment <path> / -a: Additional files to attach (repeatable)
  • --wait / -w: Wait for response and print to stdout (sync mode). Default is async mode.
  • --dry-run: Preview without launching VS Code

Note: By default, chat runs in async mode - it returns immediately after launching VS Code, and the agent writes its response to a timestamped file in the subagent's messages/ directory. Use --wait for synchronous operation.

List provisioned subagents:

subagent code list [--target-root <path>] [--json]
  • --target-root <path>: Custom subagent root directory
  • --json: Output results as JSON

Unlock subagents:

subagent code unlock [--subagent <name>] [--all] [--target-root <path>] [--dry-run]
  • --subagent <name>: Specific subagent to unlock (e.g., subagent-1)
  • --all: Unlock all subagents
  • --target-root <path>: Custom subagent root directory
  • --dry-run: Show what would be unlocked without making changes

Development

# Install as editable global tool (from repo root)
uv tool install --editable .

# Run tests
uv run --extra dev pytest

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-0.3.2.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

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

subagent-0.3.2-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file subagent-0.3.2.tar.gz.

File metadata

  • Download URL: subagent-0.3.2.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for subagent-0.3.2.tar.gz
Algorithm Hash digest
SHA256 cf630dfcac9963c1bb402afbc20c6f9887fa4aba29ef8a2e4107922dc8d62e77
MD5 808f6071c67d1afed06e40c038f2626a
BLAKE2b-256 ac7289b9ea2a2b116c88ff4a1198ae0399a5d09202e682722639435feccf0364

See more details on using hashes here.

File details

Details for the file subagent-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: subagent-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for subagent-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4044e2a01bfcb77cf46c0abb0f809f519e483ce65fcd3df3cd1c5e3e7dac1405
MD5 1933c155b4206f4b661c4c084abb26a2
BLAKE2b-256 aa5ab8e885ef2cea93337165131d18042a421e009afb13bb6f6f4c81560a7f77

See more details on using hashes here.

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