The Research Workflow. Request β Worker produces a sourced draft β delivers
{ draft, sources }on-chain β Litmus grades it β Maestro consolidates.
Hire Worker β Get a Sourced Draft. topic β research β
{ draft, sources }on-chain.
A multi-agent pipeline needs a producer at the top of the funnel β something that turns a topic into a draft other agents can grade, vet, and ship. Without it, orchestration has nothing to orchestrate.
Worker is the constellation's research provider. Any agent can hire it on-chain with a topic; it returns a structured, sourced research brief. It writes with an LLM when a key is present, and degrades to a deterministic offline draft otherwise β so it always delivers something gradeable.
Key Features:
- π§ Topic β Draft: turns
{ topic, depth?, context? }into{ draft, sources }. - π Reflection-ready: accepts reviewer
contextso it can self-correct on a fallback re-hire (Maestro's quality loop). - π Always delivers: deterministic offline draft when no
ANTHROPIC_API_KEYβ fully functional in mock mode and CI.
Worker sits at the top of the funnel: it's the producer Maestro hires first (and re-hires as the fallback researcher during its self-correction loop). Every arrow is a real CAP order settled in USDC on Base.
graph LR
User([Any Agent / User]) -->|hires| M[Maestro πΌ]
M -->|research| W[Worker π ]
M -->|self-correct retry| W
M -->|grade 0-100| L[Litmus π§ͺ]
M -->|human sign-off| S[Summon π€]
G[Gauntlet π§€] -.->|certifies| W
classDef hot fill:#F59E0B,stroke:#111,color:#111,font-weight:bold;
class W hot;
- High-traffic node: Maestro hires Worker first, then potentially again (fallback) with the grader's critique β so each orchestration can drive 1β2 Worker orders.
- Composable output:
{ draft, sources }is exactly what Litmus grades and Maestro consolidates.
Real CAP research orders Worker fulfilled as a provider.
Total real CAP orders: 3 Β· last updated: 2026-07-07 Β· each cell is [pay tx] Β· [deliver tx] on Base Mainnet.
| # | Date | Counterparty (requester) | USDC | Order ID | Tx (BaseScan) | Result |
|---|---|---|---|---|---|---|
| 1 | 2026-07-07 | Maestro (research) | 0.10 | 82878d87 |
pay Β· deliver | sourced draft |
| 2 | 2026-07-07 | Maestro (fallback re-research) | 0.10 | 9087342c |
pay Β· deliver | improved draft |
| 3 | 2026-07-07 | Gauntlet (A2A) | 0.10 | 2b7a8c3b |
pay Β· deliver | sourced draft |
Worker was also the target of Gauntlet's 7-probe certification (order
725c33bd) β its adversarial-input probes are expected-reject results, not failures.
| Layer | Technology |
|---|---|
| Runtime | Node.js (TypeScript) |
| Reasoning | Anthropic Claude (Haiku) β optional, with deterministic fallback |
| Ecosystem | Constellation A2A (croo-core) |
| Testing | Vitest |
Worker builds on the shared @edycutjong/croo-core SDK. The methods it actually calls:
| Method | Source | Role in Worker |
|---|---|---|
makeClient(sdkKey) |
croo-core | Instantiates the shared CROO AgentClient (Base Mainnet config) from the SDK key. |
runProvider(...) |
croo-core | Runs Worker as an on-chain provider β subscribes to order/negotiation events and fulfils hires (Maestro's sub-agent). |
isMockMode() |
croo-core | Branches between offline mock mode and live on-chain execution. |
client.getNegotiation(id) |
@croo-network/sdk | Reads negotiation/order state during a hire. |
Any agent can hire Worker 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<{ draft: string; sources: string[] }>(client, {
serviceId: '619bfff2-3297-4a62-bc91-61bdf69c23a9', // Worker on the CROO Agent Store
requirement: { topic: 'ERC-4337 account abstraction tradeoffs' },
maxPrice: 1.0, // USDC
});
console.log(delivery.draft, delivery.sources);delivery β { draft: string, sources: string[] }
- Node.js β₯ 20
- npm
- Clone:
git clone https://github.com/edycutjong/worker.git - Enter the directory:
cd worker - Install:
npm install - Configure:
cp .env.example .env.localand fill in your service ID (+ optionalANTHROPIC_API_KEY); skip for mock mode
npm install
CROO_MOCK=true npm run dev # boots the research provider with no on-chain callsResearch works with no API key (deterministic offline draft); set ANTHROPIC_API_KEY to enable Claude-written briefs.
npm run lint # ESLint
npm run typecheck # TypeScript check
npm run test # Run tests
npm run test:coverage # Coverage report
npm run ci # Full quality gate| Layer | Tool | Status |
|---|---|---|
| Code Quality | ESLint + TypeScript | β |
| Unit Testing | Vitest (23 tests) | β |
| Security (SAST) | CodeQL | β |
| Security (SCA) | Dependabot + npm audit | β |
Containerized for any PaaS. Worker is a background worker (connects out to the CROO WebSocket β no inbound port):
docker build -t worker .
docker run --env-file .env.local workerMIT Β© 2026 Edy Cu
Built for the DoraHacks CROO Hackathon 2026.
