Skip to content

Repository files navigation

Goldilocks Logo

Goldilocks 🎯

Paid pricing-oracle agent β€” surveys Agent Store listings, estimates demand, and recommends a statistically justified price

Goldilocks β€” Stop guessing what to charge β€” get a data-backed price.

Live on CROO Agent StoreLive Pitch PageDoraHacks BUIDL


TypeScriptNode.jsReleaseCI


πŸ“Έ See it in Action

Goldilocks Demo

Hire Goldilocks β†’ Get Data-Backed Price. survey β†’ estimate β†’ recommend.


πŸ’‘ The Problem & Solution

Every builder in this hackathon has to set a price with zero market data, on day one, on mainnet. Price too low and you're swamped serving USDC-losing calls; price too high and your agent sits at zero hires while the leaderboard fills up.

Goldilocks solves this by turning a blind guess into a recommendation grounded in what the market is actually paying.

Key Features:

  • ⚑ Comparable survey: pulls public Agent Store listings in your category (price, tags, description).
  • πŸ“ˆ Demand signal: if you pass your own agentId, factors your fill-rate (orders vs negotiations).
  • 🎯 Recommendation: a "just right" price + a low/high band + the 3 comps that drove it + rationale.
  • πŸ”„ Active State Recovery: Automatically recovers and processes paid pricing evaluation requests upon startup.
  • ❌ Active Rejections: Rejects unmatched categories or malformed requests instantly to free requester agents.

🌌 The Constellation β€” On-Chain A2A Graph

Goldilocks is the constellation's pricing oracle: agents pay it on-chain to read the live Agent Store market and get a statistically grounded price. It only earns when it has real market data β€” if it can't find comparables it triggers an "honest-oracle" escrow refund rather than guess. Pricing intelligence that reads its own marketplace and refunds on low confidence is not something a flat REST API can do.

graph LR
User([Any Agent / User]) -->|hires for a price| GL[Goldilocks 🎯]
GL -->|surveys comparables| Store[(Agent Store)]
GL -.->|honest-oracle refund if no data| User
G[Gauntlet 🧀] -.->|certifies| GL
classDef hot fill:#F59E0B,stroke:#111,color:#111,font-weight:bold;
class GL hot;
Loading
  • Trust premium: factors an agent's on-chain reputation (PTS) into the recommended price.
  • Honest oracle: zero comparables β†’ escrow refunded, not a low-confidence guess charged to the buyer.

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

Real CAP pricing orders Goldilocks fulfilled as a provider.

Total real CAP orders: 1 Β· last updated: 2026-07-07 Β· [pay tx] Β· [deliver tx] on Base Mainnet.

#DateCounterparty (requester)USDCOrder IDTx (BaseScan)Recommended price
12026-07-07Navigator0.1016991619pay Β· deliver0.40 USDC (input priced at 0.10 β†’ underpriced)

Honest-oracle refunds (a category with zero comps) settle as rejected on-chain rather than delivering a low-confidence price.

πŸ—οΈ Architecture & Tech Stack

LayerTechnology
RuntimeNode.js 20, TypeScript
Agent Core@edycutjong/croo-core
ReasoningAnthropic Claude 3.5 Sonnet
Mathsimple-statistics
ValidationZod

πŸ† Sponsor Tracks Targeted

  • Developer Tooling Agents
  • Base Mainnet
  • Anthropic

🧩 CROO SDK Methods Used

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

MethodSourceRole in Goldilocks
makeClient(sdkKey)croo-coreInstantiates the shared CROO AgentClient (Base Mainnet config) from the SDK key.
runProvider(...)croo-coreRuns Goldilocks as an on-chain provider β€” subscribes to order/negotiation events and fulfils incoming hires.
hire(...)croo-coreActs as a consumer β€” places orders against other Constellation agents (A2A).
isMockMode()croo-coreBranches between offline mock mode and live on-chain execution.
client.getDownloadURL(...)@croo-network/sdkResolves the deliverable's download URL.

πŸ“ž Hire Goldilocks (A2A)

Any agent can hire Goldilocks 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: '570e4562-04c3-4b52-ad84-afd6f48d0bf6',// Goldilocks on the CROO Agent Storerequirement: {description: 'On-chain research agent that returns sourced drafts',category: 'research',// optional β€” omit to compare against the full marketcurrentPrice: 0.10,// USDC you charge today},maxPrice: 1.0,});

delivery β†’ { median, low, high, confidence, recommendedAdjustment } (all USDC; confidence 0–1)

πŸš€ Getting Started

Prerequisites

  • Node.js β‰₯ 20
  • npm

Installation

  1. Clone: git clone https://github.com/edycutjong/goldilocks.git
  2. Enter the directory: cd goldilocks
  3. Install: npm install
  4. Configure: cp .env.example .env.local and add your keys (CROO_SDK_KEY + ANTHROPIC_API_KEY) β€” skip for mock mode
  5. Run: npm run dev

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

npm install
CROO_MOCK=true npm run dev # boots the pricing provider + health server, no on-chain calls

The rationale step works with no API key (deterministic template fallback); set ANTHROPIC_API_KEY to enable the Claude-written rationale.

For Judges: Skip account creation! Use test credentials if available or follow the SDK guide.

πŸ§ͺ Testing & CI

Quality Gates Pipeline: Quality β†’ Security β†’ Build

# ── Code Quality ────────────────────────────
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# ── Security ────────────────────────────────
make security-scan # npm audit + license check
LayerToolStatus
Code QualityESLint + TypeScriptβœ…
Unit TestingVitest (31 tests)βœ…
Security (SAST)CodeQLβœ…
Security (SCA)Dependabot + npm auditβœ…

πŸ“ Project Structure

goldilocks/
β”œβ”€β”€ docs/ # README assets (hero, screenshots)
β”œβ”€β”€ src/ # Core agent logic
β”œβ”€β”€ __tests__/ # Vitest test suite
β”œβ”€β”€ .env.example # Environment template
β”œβ”€β”€ .github/ # CI workflows
└── README.md # You are here

🚒 Deploy

Containerized web service with a PaaS health check on /health (port $PORT, default 8080):

docker build -t goldilocks .
docker run -p 8080:8080 --env-file .env.local goldilocks
# Health: http://localhost:8080/health

πŸ“„ License

MIT Β© 2026 Edy Cu

πŸ™ Acknowledgments

Built for CROO Agent Hackathon 2026. Thank you to the sponsors for the APIs and tools.

About

🎯 Paid pricing-oracle agent β€” surveys CROO Agent Store listings, estimates demand, and recommends a statistically justified price (CROO Constellation)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages