Callable orchestrator β hires specialist agents on-chain, grades their work, delivers one vetted result
The Orchestrator Workflow. Request β Maestro Hires Specialists β Agents Work β Maestro Grades & Consolidates β Final Result Delivered.
Single agents fail at complex tasks because they lack specialized context and self-reflection. Managing a multi-agent system manually is cumbersome and non-scalable. Maestro solves this by acting as an autonomous orchestrator. It intelligently provisions the right specialist agents from the Constellation network, oversees their work, and distills their outputs into a single, high-fidelity result.
Key Features:
- β‘ Autonomous Hiring: Automatically selects the best specialist agents for a specific prompt.
- π Quality Assurance: Integrates with grading agents to evaluate outputs before delivery.
- π¨ Consolidated Outputs: Delivers a single, cohesive response instead of raw multi-agent logs.
- π Active State Recovery: Recovers and resumes pending pipeline executions upon startup if container restarts.
- β‘ Fast Fallover Retry Bypass: Intercepts subcontractor rejections/expirations instantly, bypassing retry loops to cascade to backup providers.
- πΌ Dynamic Payout Wallet: Uses
MAESTRO_PAYOUT_ADDRESSto route fee revenues directly to custom cold storage.
Maestro is the hub of a multi-agent constellation. Every arrow below is a real CAP order settled in USDC on Base β escrow-backed, with automatic refunds on failure. This composition is impossible (or far worse) on a flat REST marketplace: there is no escrow, no on-chain provenance, and no way to refund a buyer when a sub-agent underperforms.
graph LR
User([Any Agent / User]) -->|hires| M[Maestro πΌ]
M -->|research| W[Worker π ]
M -->|self-correct retry| FW[Fallback Worker π ]
M -->|grade 0-100| L[Litmus π§ͺ]
M -->|human sign-off| S[Summon π€]
G[Gauntlet π§€] -.->|certifies| M
GL[Goldilocks π§] -.->|prices| M
classDef hot fill:#F59E0B,stroke:#111,color:#111,font-weight:bold;
class M hot;
- Depth: Maestro runs a cognitive reflection loop β if Litmus scores a draft below threshold, it re-hires a fallback Worker with the grader's critique, re-grades, then escalates to a human via Summon.
- Fiduciary refund: if quality stays critically low, Maestro autonomously refunds the buyer's escrow instead of delivering substandard work.
- One request β many CAP orders: a single pipeline run can generate 4β5 on-chain sub-orders across 3β4 distinct agents.
Real CAP orders settled in USDC during the hackathon. As the constellation hub, one Maestro request fans out into several sub-hires β so each run adds multiple rows.
Total real CAP orders: 6 Β· last updated: 2026-07-07 Β· one Navigator request β 5 autonomous sub-hires, incl. human-in-the-loop.
Topic: "Well-sourced research brief on zero-knowledge proofs in DAOs." Grade climbed 69 β 76 via a self-correction loop, then escalated to a human who approved. Each row is [pay tx] Β· [deliver tx] on Base Mainnet.
| # | Date | Role | Counterparty | USDC | Order ID | Tx (BaseScan) | Result |
|---|---|---|---|---|---|---|---|
| 1 | 2026-07-07 | Provider (paid) | Navigator | 1.00 | 98d0adae |
pay Β· deliver | PDF brief delivered (human-approved) |
| 2 | 2026-07-07 | Requester (hired) | Worker | 0.10 | 82878d87 |
pay Β· deliver | research draft |
| 3 | 2026-07-07 | Requester (hired) | Litmus π§ͺ | 0.05 | 9da4458a |
pay Β· deliver | score 69/100 |
| 4 | 2026-07-07 | Requester (hired) | Worker (fallback) | 0.10 | 9087342c |
pay Β· deliver | self-correction re-research |
| 5 | 2026-07-07 | Requester (hired) | Litmus π§ͺ | 0.05 | 3f72221e |
pay Β· deliver | score 76/100 |
| 6 | 2026-07-07 | Requester (hired) | Summon π€ | 0.05 | 9dc01628 |
pay Β· deliver | β human approved (Telegram) |
| Layer | Technology |
|---|---|
| Runtime | Node.js (TypeScript) |
| Ecosystem | Constellation A2A (croo-core) |
| Testing | Vitest |
Maestro builds on the shared @edycutjong/croo-core SDK. The methods it actually calls:
| Method | Source | Role in Maestro |
|---|---|---|
makeClient(sdkKey) |
croo-core | Instantiates the shared CROO AgentClient (Base Mainnet config) from the SDK key. |
runProvider(...) |
croo-core | Runs Maestro as an on-chain provider β subscribes to order/negotiation events and fulfils incoming hires. |
hire(...) |
croo-core | Acts as a consumer β Maestro orchestrates by placing orders against other Constellation agents (A2A). |
isMockMode() |
croo-core | Branches between offline mock mode and live on-chain execution. |
client.uploadFile(...) |
@croo-network/sdk | Uploads the composed deliverable artifact. |
client.rejectOrder(...) |
@croo-network/sdk | Declines an incoming order that fails policy checks. |
client.getNegotiation(id) |
@croo-network/sdk | Reads negotiation/order state while orchestrating. |
Any agent can hire Maestro on-chain through croo-core's hire() primitive β it's live on the CROO Agent Store.
import { makeClient, hire } from '@edycutjong/croo-core';
const client = makeClient(process.env.CROO_SDK_KEY!);
const { delivery } = await hire(client, {
serviceId: '625f15c8-61ba-4b11-8201-0bb019ef5ef2', // Maestro on the CROO Agent Store
requirement: {
topic: 'Write a vetted brief on Base L2 fee mechanics',
qualityThreshold: 90, // optional β re-research until Litmus grade β₯ 90
},
maxPrice: 5.0, // Maestro sub-hires Worker/Litmus/Summon, so budget higher
});delivery β { results, audit, totalSpent } (audit trail of every sub-order it placed)
- Node.js β₯ 20
- npm
- Clone:
git clone https://github.com/edycutjong/maestro.git - Enter the directory:
cd maestro - Install:
npm install - Configure:
cp .env.example .env.localand fill in your service IDs (skip for mock mode)
npm install
npm run demo # full Research β Grade β Human β Deliver pipeline, end-to-end
# β¦or boot the live provider loop in mock mode:
CROO_MOCK=true npm run devnpm run demo exercises the real work() path against deterministic mock sub-agents β no funding required, perfect for reproducing the orchestration locally.
4-stage pipeline: Quality β Security β Build β Deploy Gate
# ββ Code Quality ββββββββββββββββββββββββββββ
make lint # ESLint
make typecheck # TypeScript check
make test # Run tests
make test-coverage # Coverage report
make ci # Full quality gate
# ββ Security ββββββββββββββββββββββββββββββββ
make security-scan # npm audit + license check| Layer | Tool | Status |
|---|---|---|
| Code Quality | ESLint + TypeScript | β |
| Unit Testing | Vitest (64 tests) | β |
| Security (SAST) | CodeQL | β |
| Security (SCA) | Dependabot + npm audit | β |
| Secret Scanning | TruffleHog | β |
maestro/
βββ docs/ # README assets (hero, screenshots)
βββ src/ # Application source code
βββ scripts/ # Build and run scripts
βββ __tests__/ # Vitest test suites
βββ .github/ # CI workflows
βββ README.md # You are here
Containerized for any PaaS (Railway, Render, Fly.io, Cloud Run). Maestro is a background worker (connects out to the CROO WebSocket β no inbound port):
docker build -t maestro .
docker run --env-file .env.local maestroMIT Β© 2026 Edy Cu
Built for the DoraHacks CROO Hackathon 2026.
