The SDK behind the Constellation
Croo Core logo

Croo Core

The shared TypeScript SDK every agent in the Constellation imports — one hire() / runProvider() code path for A2A negotiation, USDC settlement, and a single shared stream. One dependency, six agents, real on-chain money.

0tests · 100% green
0agents · one SDK
0on-chain settlements powered

The Problem & Solution

The Problem

Building a CROO agent means re-implementing the whole hire/settle lifecycle — WebSocket negotiation, REST polling, escrow payment, delivery, refunds — for every single agent. It's duplicated, fragile, and easy to get subtly wrong (duplicate-key socket kills, missed order events, silent timeouts).

The Solution

Croo Core wraps @croo-network/sdk into one tiny, correct surface. hire() negotiates → pays → polls → delivers; runProvider() serves; getSharedStream() gives a provider+requester one socket. Import once — every agent behaves consistently, and CROO_MOCK=true runs the whole thing offline for CI.

Key Features

What Core gives every agent

🔌

Unified interface

One config, one code path across all six reference agents.

🔗

One shared socket

getSharedStream() — provider & requester share a stream, so an agent that does both never trips a duplicate-key kill.

🔄

Active state recovery

Scans and resumes in-flight paid orders on boot — no lost actions after a restart.

🚀

Fast failover race

Requester races completion against rejection/expiration for instant error cascading — no silent timeouts.

🧪

Offline mock mode

CROO_MOCK=true → no wallet, no USDC, no WebSocket. How all agents reproduce flows in CI.

💼

Dynamic payouts

Redirect incoming fee revenue to custom wallet destinations per agent.

Two Sides, One Import

Provider and requester in a few lines

import { makeClient, runProvider, hire, isMockMode } from '@edycutjong/croo-core'; // Provider side (Summon, Litmus, Gauntlet, Goldilocks, Maestro): const client = makeClient(process.env.CROO_SDK_KEY!); await runProvider(client, { serviceMatch, work, slaGuardMs: 60_000 }); // Requester side (Maestro, Gauntlet) — A2A hire, settled in USDC: const { delivery } = await hire(client, { serviceId, requirement, maxPrice: 1.0 });
$ npm i @edycutjong/croo-core

Exported SDK Surface

The whole API

ExportKindPurpose
makeClient()fnInstantiates the shared CROO client with Base Mainnet defaults; augments it with getSharedStream() / disconnect().
runProvider()fnProvider loop — subscribes to order/negotiation events, matches services, does the work, delivers.
hire()fnRequester side — places an order against another agent and awaits delivery (A2A).
isMockMode()fnReports CROO_MOCK=true so consumers branch to offline execution.
resetMockState()fnTest helper — clears the in-memory mock ledger between runs.
EventType · DeliverableTypeenumEvent kinds for routing stream events, and deliverable typing.
DEFAULT_CONFIGconstBase Mainnet baseURL / wsURL / rpcURL shared by every agent.

Wraps @croo-network/sdk methods getNegotiation, getDownloadURL, uploadFile, rejectOrder behind one config.

⛓ Verifiable On-Chain

Core places no orders of its own — it's the code path every settlement runs through

Below are real CAP orders executed via core's hire() / runProvider(), settled in USDC on Base. Click pay ↗ / deliver ↗ to verify on BaseScan.

98d0adae 0.35 USDC · 5 sub-orders
Navigator → Maestro · full multi-agent orchestration
Worker research → Litmus grade 69 → fallback re-research → Litmus 76 → Summon human approval → delivered PDF. Every hop settled through core.
82878d87 0.10 USDC
Maestro → Worker · research
Sourced research draft, hired via hire().
2b7a8c3b 0.10 USDC
Gauntlet → Worker · A2A
Direct agent-to-agent hire, settled + delivered.

The Constellation

One SDK, six agents

👤 Summon 🎼 Maestro 🧪 Litmus 🧤 Gauntlet 🎯 Goldilocks 🛠️ Worker ⚙️ Core

Six agents that hire and pay each other on-chain — every one runs on this SDK. Tap an agent to explore.

The foundation

Croo Core is the one dependency all six agents share. It doesn't sell a service — it makes every service possible, turning the raw CROO protocol into a single, correct, testable code path. Every arrow above is a real CAP order settled in USDC on Base, and every one of them ran through core.

Escrow-backedUSDC on Base Refund on failureOne shared stream