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
refactor: collapse TxODDS demo to single buyer/seller/verifier, polish live narrative
Simplify the reference kit to its minimal viable loop so it forks cleanly:
- Remove echo-agent, user_proxy (dead/unused), and the seller-base persona
wrapper; the buyer now launches one seller-agent directly instead of five
personas multiplexed through a shared registration.
- Remove the sharp-movement/risk-policy seller services, the research-market
watcher/detector/grading pipeline, and their UI wiring - all downstream of
the persona collapse and unused without it.
- Modularize buyer-agent's src/ into award/, settlement/, verify/,
reputation/, and feed/ submodules instead of a flat file list.
- Rewrite the seller's delivery LLM prompt for a colorful two-sentence take
instead of a clinical one-liner; the live feed's story headline now shows
that narrative directly instead of a stats-table paragraph, and drops the
redundant progress-stage tracker in favor of the prose recap.
- Fix seller-agent's manifest missing the x402 procurement options
(PROCURE_RAIL, PROCURE_X402_URL, SELLER_KEYPAIR_B58) that its own code and
the round launcher already depended on.
Verified live end-to-end on devnet: WANT -> BID -> AWARD -> ESCROW_REQUIRED ->
DEPOSITED -> DELIVERED -> VERIFIED -> ARBITER_RELEASED, real TxLINE data,
real LLM read, real settlement tx.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: LLM.md
+36-14Lines changed: 36 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,29 @@
1
1
# LLM Provider Configuration
2
2
3
-
`packages/agent-runtime/src/llm/complete.ts` exposes one SDK-free `complete()` function over `fetch`. Supports Venice, OpenAI, and Anthropic.
3
+
`packages/agent-runtime/src/llm/complete.ts` exposes one SDK-free `complete()` function over `fetch`. Supports Venice, OpenAI, Anthropic, and Groq.
4
+
5
+
## Which Provider to Use
6
+
7
+
**Groq is the recommended default for this kit.** It's genuinely free — not a one-time credit grant like Venice's signup bonus, but a renewing per-day/per-minute rate limit, so it doesn't run dry the way Venice credits do. Get a key at [console.groq.com/keys](https://console.groq.com/keys), no card required.
8
+
9
+
Venice, OpenAI, and Anthropic remain fully supported for anyone with existing keys or who wants a different model — nothing about them changed.
4
10
5
11
## Environment Variables
6
12
7
13
| Variable | Description |
8
14
|---|---|
9
-
|`LLM_PROVIDER`|`venice`, `openai`, or `anthropic`. Set explicitly when more than one key exists. |
10
-
|`VENICE_API_KEY`| Venice API key. |
15
+
|`LLM_PROVIDER`|`groq`, `venice`, `openai`, or `anthropic`. Set explicitly when more than one key exists. |
16
+
|`GROQ_API_KEY`| Groq API key — free, renewing rate limit. |
17
+
|`VENICE_API_KEY`| Venice API key — free signup credits, one-time (can run out). |
11
18
|`OPENAI_API_KEY`| OpenAI API key. |
12
19
|`ANTHROPIC_API_KEY`| Anthropic API key. |
13
20
|`LLM_MODEL`| Optional model override. |
14
21
|`TRACE`| Set to `1` to log provider/model selection and raw replies. |
15
22
16
23
```ini
17
24
# .env (gitignored)
18
-
LLM_PROVIDER=venice
19
-
VENICE_API_KEY=...
25
+
LLM_PROVIDER=groq
26
+
GROQ_API_KEY=...
20
27
```
21
28
22
29
## Provider Selection
@@ -26,25 +33,29 @@ VENICE_API_KEY=...
26
33
1.`LLM_PROVIDER` set explicitly → use it.
27
34
2.`OPENAI_API_KEY` exists → OpenAI.
28
35
3.`VENICE_API_KEY` exists → Venice.
29
-
4. Fallback → Anthropic (fails if no key).
36
+
4.`GROQ_API_KEY` exists → Groq.
37
+
5. Fallback → Anthropic (fails if no key).
38
+
39
+
Auto-detection is a convenience for having exactly one key set; if you have both `VENICE_API_KEY` and `GROQ_API_KEY` in `.env` (e.g. switching over after Venice ran out), set `LLM_PROVIDER=groq` explicitly rather than relying on priority order.
30
40
31
41
## Default Models
32
42
33
43
| Provider | Default Model |
34
44
|---|---|
45
+
| Groq |`llama-3.3-70b-versatile`|
35
46
| Venice |`llama-3.3-70b`|
36
47
| OpenAI |`gpt-4o-mini`|
37
48
| Anthropic |`claude-haiku-4-5-20251001`|
38
49
39
50
Override with `LLM_MODEL`:
40
51
41
52
```ini
42
-
LLM_PROVIDER=venice
43
-
VENICE_API_KEY=...
44
-
LLM_MODEL=kimi-k2-7-code
53
+
LLM_PROVIDER=groq
54
+
GROQ_API_KEY=...
55
+
LLM_MODEL=llama-3.3-70b-versatile
45
56
```
46
57
47
-
Venice Kimi models: the runtime raises `maxTokens` requests below `1024` to `1024` (Kimi may consume budget on reasoning before emitting content).
58
+
Venice Kimi models: the runtime raises `maxTokens` requests below `1024` to `1024` (Kimi may consume budget on reasoning before emitting content). Groq has no equivalent quirk.
48
59
49
60
## Usage
50
61
@@ -71,10 +82,10 @@ Every decision follows **propose → enforce**: the model proposes, deterministi
71
82
72
83
### Bid Review (Optional)
73
84
74
-
Set `BID_REVIEW_ENABLED=1` on a seller persona to add a second, independently-prompted loop that can veto a proposed bid. The reviewer has no visibility into the first loop's reasoning.
85
+
Set `BID_REVIEW_ENABLED=1` on the seller to add a second, independently-prompted loop that can veto a proposed bid. The reviewer has no visibility into the first loop's reasoning.
75
86
76
87
```toml
77
-
# coral-agents/seller-worldcup/coral-agent.toml
88
+
# coral-agents/seller-agent/coral-agent.toml
78
89
[agent.env]
79
90
BID_REVIEW_ENABLED = "1"
80
91
```
@@ -95,7 +106,7 @@ Every LLM-backed decision emits an `LlmUse` record into the run ledger:
95
106
```ts
96
107
{
97
108
round: 1,
98
-
agent: 'seller-worldcup',
109
+
agent: 'seller-agent',
99
110
purpose: 'bid-decision',
100
111
status: 'ok',
101
112
provider: 'venice',
@@ -110,9 +121,20 @@ Every LLM-backed decision emits an `LlmUse` record into the run ledger:
110
121
111
122
When a provider key is absent, invalid, rate-limited, or exhausted, callers either surface the error or use a deterministic fallback. TxODDS UI labels deterministic reads separately from LLM reads.
112
123
124
+
## Groq Free Tier
125
+
126
+
No credit card, no expiring credit pool — a renewing rate limit instead. Limits vary by model; roughly, at time of writing:
Check [console.groq.com](https://console.groq.com) for current limits per model — Groq adjusts these. If you're hitting the per-minute token cap in a tight bid/verify loop, either switch to a lighter-limit model via `LLM_MODEL`, or fall back to another configured provider for that run.
134
+
113
135
## Adding a Provider
114
136
115
-
All wiring is in `packages/agent-runtime/src/llm/complete.ts`:
137
+
All wiring is in `packages/agent-runtime/src/llm/complete.ts`. `completeGroq()` there is a real, working example of the pattern below — copy it.
0 commit comments