Skip to main content

Multi-agent task orchestration โ€” delegate work from an orchestrator to specialized sub-agents via a file-based queue.

Project description

Agent Maestro

Tests PyPI version Python 3.10+ License: MIT

๐ŸŽผ Multi-agent task orchestration โ€” delegate work from an orchestrator to specialized sub-agents via a file-based queue.

Architecture

Orchestrator (Antigravity) โ†’ maestro delegate โ†’ .agent_bridge/pending/ โ†’ watcher โ†’ Copilot CLI โ†’ .agent_bridge/completed/
                                                                                      โ†“
                                                                            --agent <name>
                                                                                      โ†“
                                                                        .github/agents/*.agent.md

Custom Agents

Agent Maestro leverages VS Code Copilot's custom agents for specialized roles:

Agent Role Handoffs
Orchestrator Plan tasks, coordinate sub-agents โ†’ Implementer, Tester, Reviewer
Implementer Write code changes (worker)
Tester Write and run tests (worker)
Reviewer Read-only code review (worker)

Agent definitions live in .github/agents/ and are routed via --agent <name> when the watcher invokes Copilot CLI.

Installation

Option 1: From PyPI (Recommended)

pip install agent-maestro

Option 2: From GitHub (Latest)

pip install git+https://github.com/migoueel/multi_agents.git

Option 3: For Development

git clone https://github.com/migoueel/multi_agents.git
cd multi_agents
pip install -e ".[dev]"

Quick Start

# 1. Scaffold config + custom agents (in your project)
maestro init

# 2. (Optional) Edit config.yaml and .github/agents/*.agent.md

# 3. Start the watcher daemon
maestro start

# 4. Delegate a task
maestro delegate "Add error handling to auth module" \
  --files src/auth.py \
  --agent-type implementer

# 5. Check status
maestro status <task-id>
maestro list
maestro stats

CLI Reference

Command Description
maestro init Scaffold .agent_bridge/, config.yaml, .github/agents/
maestro start Start the background watcher daemon
maestro delegate "<instructions>" Delegate a task to a sub-agent
maestro status <id> Check task status
maestro list [--status PENDING] List all tasks
maestro stats Show queue statistics

Delegate Options

maestro delegate "..." [OPTIONS]

  --files, -f      Target files for the agent
  --action, -a     Task type: implement, test, refactor, fix, review
  --agent-type, -t Custom agent: orchestrator, implementer, tester, reviewer
  --context, -c    Extra context string
  --priority       Priority level (0=normal, higher=urgent)

Configuration

Edit config.yaml in your project root:

bridge:
  poll_interval_seconds: 3
  max_concurrent_tasks: 1
  task_timeout_seconds: 300
  agent_bridge_dir: ".agent_bridge"

runners:
  default: "copilot-cli"
  copilot_cli:
    command: "copilot"       # path to copilot.bat
    model: "gpt-5-mini"
    allow_all_tools: true

Package Structure

agent_maestro/
โ”œโ”€โ”€ __init__.py           # Public API: delegate_task, check_status, list_tasks
โ”œโ”€โ”€ __main__.py           # python -m agent_maestro
โ”œโ”€โ”€ cli.py                # maestro CLI commands
โ”œโ”€โ”€ protocol.py           # Task, TaskStatus, RunResult schemas
โ”œโ”€โ”€ queue.py              # File-based task queue
โ”œโ”€โ”€ config.py             # YAML config loader
โ”œโ”€โ”€ watcher.py            # Background watcher daemon
โ”œโ”€โ”€ runners/
โ”‚   โ”œโ”€โ”€ base.py           # Abstract BaseRunner
โ”‚   โ””โ”€โ”€ copilot_runner.py # Copilot CLI runner with --agent support
โ””โ”€โ”€ scaffold/
    โ”œโ”€โ”€ config.yaml       # Default config template
    โ””โ”€โ”€ agents/           # Custom agent templates
        โ”œโ”€โ”€ orchestrator.agent.md
        โ”œโ”€โ”€ implementer.agent.md
        โ”œโ”€โ”€ tester.agent.md
        โ””โ”€โ”€ reviewer.agent.md

How It Works

  1. Task Creation: maestro delegate (or delegate_task() from Python) writes a JSON file to .agent_bridge/pending/
  2. Watcher Pickup: The background watcher polls for pending tasks, claims the highest-priority one
  3. Runner Dispatch: The CopilotRunner invokes copilot -p <prompt> --agent <agent_type>
  4. Custom Agent: Copilot CLI loads the matching .github/agents/<name>.agent.md for specialized behavior
  5. Result Recording: Output moves to .agent_bridge/completed/ (or failed/)

Testing

pytest tests/ -v

License

MIT

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

agent_maestro-0.1.0.tar.gz (35.5 kB view details)

Uploaded Source

Built Distribution

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

agent_maestro-0.1.0-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file agent_maestro-0.1.0.tar.gz.

File metadata

  • Download URL: agent_maestro-0.1.0.tar.gz
  • Upload date:
  • Size: 35.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agent_maestro-0.1.0.tar.gz
Algorithm Hash digest
SHA256 be646f09416591e8c566644966b7ce4a12714c5d4b104567bb4ba248d69c0877
MD5 c26fb7f38903d90c12c5db104e3e7a30
BLAKE2b-256 99348fb791ac7171de9608c7fa52f842cb7a16c6c9cd702bd6b0b93495541311

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_maestro-0.1.0.tar.gz:

Publisher: publish.yml on migoueel/multi_agents

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

File details

Details for the file agent_maestro-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agent_maestro-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 33.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agent_maestro-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21e9f2afbc64d61e7d5e98fcffdc7ffc92df48b18b15838ce6a98cbbfa9e38f7
MD5 68a2df68a95a14d47228acec63941969
BLAKE2b-256 a7a0ca9b9c5aa10b2694c49e912004dd783648f905f484558337f5882c5b0312

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_maestro-0.1.0-py3-none-any.whl:

Publisher: publish.yml on migoueel/multi_agents

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