Skip to content

Repository files navigation

Maestro Logo

Maestro 🎼

Callable orchestrator β€” hires specialist agents on-chain, grades their work, delivers one vetted result

Maestro

Live on CROO Agent StoreLive Pitch PageDoraHacks BUIDL


TypeScriptNode.jsReleaseCI


πŸ“Έ See it in Action

Maestro Demo

The Orchestrator Workflow. Request β†’ Maestro Hires Specialists β†’ Agents Work β†’ Maestro Grades & Consolidates β†’ Final Result Delivered.


πŸ’‘ The Problem & Solution

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_ADDRESS to route fee revenues directly to custom cold storage.

🌌 The Constellation β€” On-Chain A2A Graph

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;
Loading
  • 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.

πŸ”— Live Run Log β€” On-Chain Proof (Base Mainnet)

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.

#DateRoleCounterpartyUSDCOrder IDTx (BaseScan)Result
12026-07-07Provider (paid)Navigator1.0098d0adaepay Β· deliverPDF brief delivered (human-approved)
22026-07-07Requester (hired)Worker0.1082878d87pay Β· deliverresearch draft
32026-07-07Requester (hired)Litmus πŸ§ͺ0.059da4458apay Β· deliverscore 69/100
42026-07-07Requester (hired)Worker (fallback)0.109087342cpay Β· deliverself-correction re-research
52026-07-07Requester (hired)Litmus πŸ§ͺ0.053f72221epay Β· deliverscore 76/100
62026-07-07Requester (hired)Summon πŸ‘€0.059dc01628pay Β· deliverβœ… human approved (Telegram)

πŸ—οΈ Architecture & Tech Stack

LayerTechnology
RuntimeNode.js (TypeScript)
EcosystemConstellation A2A (croo-core)
TestingVitest

🧩 CROO SDK Methods Used

Maestro builds on the shared @edycutjong/croo-core SDK. The methods it actually calls:

MethodSourceRole in Maestro
makeClient(sdkKey)croo-coreInstantiates the shared CROO AgentClient (Base Mainnet config) from the SDK key.
runProvider(...)croo-coreRuns Maestro as an on-chain provider β€” subscribes to order/negotiation events and fulfils incoming hires.
hire(...)croo-coreActs as a consumer β€” Maestro orchestrates by placing orders against other Constellation agents (A2A).
isMockMode()croo-coreBranches between offline mock mode and live on-chain execution.
client.uploadFile(...)@croo-network/sdkUploads the composed deliverable artifact.
client.rejectOrder(...)@croo-network/sdkDeclines an incoming order that fails policy checks.
client.getNegotiation(id)@croo-network/sdkReads negotiation/order state while orchestrating.

πŸ“ž Hire Maestro (A2A)

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';constclient=makeClient(process.env.CROO_SDK_KEY!);const{ delivery }=awaithire(client,{serviceId: '625f15c8-61ba-4b11-8201-0bb019ef5ef2',// Maestro on the CROO Agent Storerequirement: {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)

πŸš€ Getting Started

Prerequisites

  • Node.js β‰₯ 20
  • npm

Installation

  1. Clone: git clone https://github.com/edycutjong/maestro.git
  2. Enter the directory: cd maestro
  3. Install: npm install
  4. Configure: cp .env.example .env.local and fill in your service IDs (skip for mock mode)

▢️ Run it now β€” offline mock mode (no wallet, no USDC)

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 dev

npm run demo exercises the real work() path against deterministic mock sub-agents β€” no funding required, perfect for reproducing the orchestration locally.

πŸ§ͺ Testing & CI

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
LayerToolStatus
Code QualityESLint + TypeScriptβœ…
Unit TestingVitest (65 tests)βœ…
Security (SAST)CodeQLβœ…
Security (SCA)Dependabot + npm auditβœ…
Secret ScanningTruffleHogβœ…

πŸ“ Project Structure

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

🚒 Deploy

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 maestro

πŸ“„ License

MIT Β© 2026 Edy Cu

πŸ™ Acknowledgments

Built for the DoraHacks CROO Hackathon 2026.

About

🎼 Callable orchestrator β€” hires specialist agents on-chain, grades their work, and delivers one vetted result (CROO Constellation)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages