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.1.tar.gz (42.8 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.1-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agent_maestro-0.1.1.tar.gz
  • Upload date:
  • Size: 42.8 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.1.tar.gz
Algorithm Hash digest
SHA256 be2ac715e6a5d0d3ed1512e0afa56a5cbc6deab9c556373c061a9023f9b5936c
MD5 2cd7ce675068b09a0dafaf4d98790dd1
BLAKE2b-256 b70da383f08f3a72db6760af6caf2b034fdd0cbf24e3e432b3a02853714f2d46

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_maestro-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: agent_maestro-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6efa8c45455adfb4b811dfb036a2036833381739296a1ea95f13571b317869f2
MD5 479552db7a63cdfd6ce4b1e026297f96
BLAKE2b-256 efc4237ca8bf471c811cbe483042a88130d9ba2e2f427ec3d85046c198491365

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_maestro-0.1.1-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