You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sync READMEs and root scripts with the agent-commerce layer
Doc audit: the root README, examples/ and coral-agents/ indexes, and
CORAL.md predated the harness/verifier/ledger/policy work. Bring them
in line with what ships and is validated live on devnet:
- README: verifier step in the loop diagram + the live-validation proof
(release tx link), prebuilt rows for harness adapters / verifier gate /
policy choke point / run ledger, freelancer + research in the examples
table and repo layout, runtime section now covers ledger/, policy/,
and packages/harness-runtime
- examples/README: freelancer + research entries (five views, not three)
- coral-agents/README: full agent table (verifier-agent, broker, echo,
user_proxy) + the five personas and the claude image build
- CORAL.md: layer diagram + file map gain the new launchers, the
verifier, harness-runtime, and CORAL-IMPLEMENTATION.md cross-link
- package.json: npm run freelancer / research / research:watch
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+48-12Lines changed: 48 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,11 @@ Some things agents can sell on these exact rails:
34
34
|**Oracle agent**| a verified fact / a checked output | trust in a number |
35
35
|**Reseller agent**| packages other agents' services into one | a bundle, one payment |
36
36
37
+
The first two already ship as working markets: [`examples/freelancer`](examples/freelancer/README.md)
38
+
(heterogeneous harnesses — a plain LLM vs headless **Claude Code** — bid on a brief, an independent
39
+
verifier gates the release) and [`examples/research`](examples/research/README.md) (live odds moves
40
+
trigger the WANT — quiet board, no spend). Fork those instead of starting blank.
41
+
37
42
> **The World Cup oracle is only the default demo — not the product.** It sells a verified, de-margined
38
43
> betting line to prove the rails work end-to-end. The invitation isn't "here's a repo about sports
39
44
> odds"; it's **"here are the rails for autonomous services with on-chain settlement — fork one function,
@@ -44,14 +49,21 @@ Some things agents can sell on these exact rails:
44
49
The competitive market runs one round as a chain of on-chain-anchored steps. All of it ships working:
45
50
46
51
```
47
-
WANT ─▶ BID ─▶ AWARD ─▶ DEPOSITED ─▶ DELIVERED ─▶ RELEASED
48
-
│ │ │ │ │ │
49
-
buyer sellers buyer funds lock seller escrow pays
50
-
asks compete picks in escrow delivers the winner
51
-
best (devnet) the service (or REFUNDED
52
-
value on a no-show)
52
+
WANT ─▶ BID ─▶ AWARD ─▶ DEPOSITED ─▶ DELIVERED ─▶ (VERIFIED) ─▶ RELEASED
53
+
│ │ │ │ │ │ │
54
+
buyer sellers buyer funds lock seller independent escrow pays
55
+
asks compete picks in escrow delivers verifier the winner
56
+
best (devnet) the service gates the (or REFUNDED
57
+
value (hash-bound) release on a no-show)
53
58
```
54
59
60
+
**Validated live on devnet, both ways.** A seller that delivered a broken payload got its release
61
+
**refused** (verifier fail → policy gate → funds stayed refundable), and a good delivery settled
62
+
through the neutral arbiter —
63
+
[see the release tx](https://explorer.solana.com/tx/3MEWxbYUPVGV4QXN3VH4J7Rripz4vbrFKCbBNAbXtYAhXG3NecAkFZkQmYmqBuykJZkHhkiMruXkbnYDCN1BpbM8?cluster=devnet).
64
+
Every round leaves a **run ledger** folder (bids, award reasoning, hash-bound delivery, verifier
65
+
verdict, Explorer-linked txs) and feeds a **reputation score** buyers weigh on the next award.
66
+
55
67
| You get, prebuilt | Where | So you don't have to |
|**Run ledger + reputation** (auditable rounds) |[`packages/agent-runtime/src/ledger`](packages/agent-runtime/src/ledger)| build an audit trail + track record |
63
79
64
80
## Prerequisites
65
81
@@ -134,6 +150,9 @@ One `npm run` per example, from the repo root. **Each command installs that exam
134
150
|`npm run demo:coral`| the same oracle as a **multi-agent CoralOS round** (buyer + competing sellers) | Docker + `docker compose up -d coral` + a TxLINE token (`npm --prefix examples/txodds run mint`) |
135
151
|`npm run marketplace`|**the full market** — a buyer + LLM sellers bidding in one session | Docker + `docker compose up -d coral` + `bash build-agents.sh`|
136
152
|`npm run marketplace:web`| the market **visualizer** — live rounds, bids, settlement badges (:5173) | the marketplace feed running |
153
+
|`npm run freelancer`|**the freelancer market** — heterogeneous harnesses bid on a brief; an independent verifier gates the escrow release | Docker + coral + `bash build-agents.sh` (add `CLAUDE_SELLER=1` after `bash build-agents.sh claude`) |
154
+
|`npm run research`|**the research market** — live odds moves trigger paid research rounds (quiet board = no spend) | Docker + coral + the txodds proxy + `npm run research:watch`|
155
+
|`npm run research:watch`| the research **event watcher** — diffs the live board, queues WANTs (:4600) | the txodds proxy (`npm run dev` or `npm --prefix examples/txodds run proxy`) |
137
156
|`npm run agent-economy`|**autonomous** agent→agent purchase | Docker + `docker compose up -d coral`|
138
157
|`npm run agent-economy:bridge`| the **human checkout** bridge (HTTP + React) | Docker + `docker compose up -d coral`|
139
158
|`npm run agent-economy:quickstart`| the **bare 402** pay-per-call seller (no Docker, no CoralOS) | LLM key + funded wallet |
@@ -159,7 +178,7 @@ build?"** — the rails don't care what you sell.
159
178
160
179
## Under the hood — the runtime
161
180
162
-
Agents import [`packages/agent-runtime`](packages/agent-runtime) and write only behaviour. Four modules,
181
+
Agents import [`packages/agent-runtime`](packages/agent-runtime) and write only behaviour. Six modules,
163
182
one per concern:
164
183
165
184
-**`llm/`** — [`complete()`](packages/agent-runtime/src/llm/complete.ts), one provider-agnostic call
@@ -170,9 +189,23 @@ one per concern:
170
189
the **devnet guard** that throws on a mainnet RPC unless `ALLOW_MAINNET=1`, so it applies everywhere
171
190
value moves.
172
191
-**`coral/`** — a CoralOS (MCP) client + agent entrypoint: the coordination fabric the sellers and
173
-
buyer meet on. Deep dive, source → example: **[CORAL.md](CORAL.md)**; official docs:
192
+
buyer meet on. Deep dive, source → example: **[CORAL.md](CORAL.md)** (implementation walkthrough:
193
+
[CORAL-IMPLEMENTATION.md](CORAL-IMPLEMENTATION.md)); official docs:
|`examples/txodds/`|**the default demo** — the World Cup oracle. `agent/` (`service.ts` = the `deliverService()` fork point; `edge.ts` = its transform; escrow/arbiter clients), `server/` (proxy + mint), `web/` (React board), `escrow/` (the two Anchor programs) |
202
-
|`examples/marketplace/`|**the full market** — a buyer + competing sellers in one CoralOS session; `feed/` (SSE feed → rounds), `web/` (React visualizer). Needs Docker |
235
+
|`examples/marketplace/`|**the full market** — a buyer + competing sellers in one CoralOS session; `feed/` (rounds + the **run ledger**`runs/`, `/api/runs`, `/api/reputation`, disk replay), `web/` (React visualizer). Needs Docker |
236
+
|`examples/freelancer/`|**the freelancer market** — heterogeneous harnesses (plain LLM vs **Claude Code**) bid on a brief; the **verifier** gates the arbiter release. Needs Docker |
237
+
|`examples/research/`|**the research market** — live odds moves trigger paid research WANTs (event watcher + event-mode buyer; quiet board = no spend). Needs Docker + the txodds proxy |
203
238
|`examples/agent-economy/`|**three front doors** on CoralOS — autonomous (agent→agent), a human checkout bridge, and a bare 402 pay-per-call quickstart |
204
-
|`coral-agents/`| the agents coral-server launches per session —`buyer-agent`, `seller-agent` (+ personas), `broker` (swarm reseller), `echo-agent`, `user_proxy`|
205
-
|`packages/agent-runtime/`| the runtime —`llm/`, `solana/`, `coral/`, `market/`|
239
+
|`coral-agents/`| the agents coral-server launches per session —`buyer-agent`, `seller-agent` (+ personas incl. `seller-claude`), `verifier-agent` (the release gate), `broker` (swarm reseller), `echo-agent`, `user_proxy`|
240
+
|`packages/agent-runtime/`| the runtime —`llm/`, `solana/`, `coral/`, `market/`, `ledger/`, `policy/`|
241
+
|`packages/harness-runtime/`| the **harness adapter SDK** — `node-llm` / `claude-code` / any CLI as market sellers |
206
242
|`scripts/`|`txodds.js` (`npm run dev`), `setup.js` (devnet wallets) |
207
243
|`docker-compose.yml`| coral-server (the MCP coordinator) for the market |
0 commit comments