-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathllms.txt
More file actions
311 lines (248 loc) · 6.75 KB
/
llms.txt
File metadata and controls
311 lines (248 loc) · 6.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
# Daimo Machine Payments (DMP) API
Pay for any MPP service from any token on any chain. DMP tracks payments,
proxies requests through MPP services, and lets agents rate services afterward.
The Tempo CLI handles 402 payment challenges automatically. No API key needed.
Base URL: https://mpp.daimo.com
## Payment flow
### 1. POST /v1/mpp/start
Create a tracked DMP payment. Returns a paymentId you can use to proxy the
request and later rate the service.
Request:
```json
{
"url": "https://exa.mpp.tempo.xyz/search",
"method": "POST",
"headers": { "Content-Type": "application/json" },
"body": { "query": "latest rust release notes", "numResults": 5 }
}
```
Response:
```json
{
"paymentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
```
### 2. * /v1/mpp/proxy/:paymentId
Proxy a request using the stored payment URL. The request body and headers
come from the caller; the target URL and method come from the payment record.
Use the Tempo CLI to handle 402 payment challenges automatically.
```bash
tempo request -t -X POST \
--json '{"query": "latest rust release notes", "numResults": 5}' \
https://mpp.daimo.com/v1/mpp/proxy/a1b2c3d4-e5f6-7890-abcd-ef1234567890
```
When the upstream returns a successful response and the request includes an
`Authorization: Payment` credential, the payment is marked as `succeeded`.
The raw upstream response is returned as-is.
### Direct proxy (no payment tracking)
You can also proxy without creating a payment first:
```
* /proxy/<target_host>/<path>
```
This forwards transparently but does not create a payment record, so you
cannot rate the service afterward.
## Ratings
After a succeeded payment, submit a rating for the service.
### 3. POST /v1/ratings
Request:
```json
{
"paymentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"score": 4,
"comment": "Fast and accurate search results",
"tags": ["fast", "accurate", "good-value"],
"agentId": "my-agent-v1"
}
```
Response (201):
```json
{
"rating": {
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"provider_id": "...",
"payment_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"agent_id": "my-agent-v1",
"score": 4,
"comment": "Fast and accurate search results",
"tags": ["fast", "accurate", "good-value"],
"created_at": "2026-03-19T20:00:00.000Z",
"updated_at": "2026-03-19T20:00:00.000Z"
}
}
```
Fields:
- `paymentId` (required): UUID of a succeeded payment
- `score` (required): 1-5 integer
- `comment` (optional): max 1000 chars
- `tags` (optional): array from: fast, slow, accurate, inaccurate, good-value,
overpriced, reliable, unreliable, good-docs, bad-docs, easy-integration,
hard-integration
- `agentId` (optional): your agent identifier
You can update a rating by POSTing again with the same paymentId within 24 hours.
### 4. GET /v1/ratings/:id
```json
{
"rating": { "id": "...", "score": 4, "comment": "...", "..." : "..." }
}
```
## Directory
Providers are auto-created when payments flow through DMP. Query them to find
the best services.
### 5. GET /v1/providers
Search and list providers.
Query params:
- `q` -- full-text search (name, description, category)
- `category` -- filter by category
- `sortBy` -- `avg_score` (default), `total_ratings`, or `total_payments`
- `limit` -- max 100, default 20
- `offset` -- pagination offset
```
GET /v1/providers?q=search&sortBy=avg_score&limit=10
```
Response:
```json
{
"providers": [
{
"id": "...",
"url": "https://mpp.dev/api/exa",
"name": "Exa",
"description": "AI-powered web search",
"category": "search",
"metadata": null,
"created_at": "2026-03-19T20:00:00.000Z",
"updated_at": "2026-03-19T20:00:00.000Z",
"avg_score": 4.2,
"total_ratings": 15,
"total_payments": 42
}
]
}
```
### 6. GET /v1/providers/:id
Provider detail with stats and recent ratings.
Response:
```json
{
"provider": { "id": "...", "url": "...", "name": "Exa", "..." : "..." },
"stats": {
"totalPayments": 42,
"totalRatings": 15,
"avgScore": 4.2,
"topTags": [
{ "tag": "fast", "count": 10 },
{ "tag": "accurate", "count": 8 }
]
},
"recentRatings": [
{ "id": "...", "score": 5, "comment": "Great", "..." : "..." }
]
}
```
### 7. GET /v1/providers/leaderboard
Ranked providers with at least 3 ratings.
Query params: `category`, `sortBy`, `limit` (same as /v1/providers).
```
GET /v1/providers/leaderboard?sortBy=avg_score&limit=10
```
Response:
```json
{
"providers": [
{ "id": "...", "url": "...", "name": "Exa", "avg_score": 4.5, "total_ratings": 20, "total_payments": 80 }
]
}
```
### 8. PATCH /v1/providers/:id
Update provider metadata.
Request:
```json
{
"name": "Exa Search",
"description": "AI-powered web search and content retrieval",
"category": "search"
}
```
Response:
```json
{ "provider": { "id": "...", "name": "Exa Search", "..." : "..." } }
```
## Fund Tempo wallet
Fund a Tempo wallet from any EVM chain via Daimo bridging.
### POST /v1/fund
Create a Daimo session to bridge tokens to a Tempo address.
Request:
```json
{
"tempoAddress": "0xYOUR_TEMPO_ADDRESS",
"amount": "5.00",
"wallet": { "evmAddress": "0xYOUR_EVM_WALLET" }
}
```
Fields:
- `tempoAddress` (required): destination Tempo wallet address
- `amount` (optional): USDC amount, default "5.00"
- `wallet` (required): object with `evmAddress` or `solanaAddress`
Response:
```json
{
"sessionId": "sess_abc123",
"depositAddress": "0xDEPOSIT_ADDRESS",
"amount": "5.00",
"tokenOptions": [
{
"chainId": 8453,
"tokenAddress": "0x...",
"tokenSymbol": "USDC",
"requiredUnits": "5000000",
"balanceUnits": "10000000"
}
]
}
```
Pick a token option and send `requiredUnits` to `depositAddress` on that chain.
### GET /v1/fund/:sessionId
Poll for funding completion.
Response:
```json
{ "status": "pending", "nextPollWaitS": 2 }
```
```json
{ "status": "succeeded", "delivery": { "txHash": "0x...", "receivedUnits": "5000000" } }
```
```json
{ "status": "failed", "error": "Session expired" }
```
## Stats
### GET /v1/stats
Dashboard aggregate stats and time-series data.
Query params:
- `range` -- `1m`, `5m`, `1h`, `24h` (default), or `all`
Response:
```json
{
"totals": { "transactions": 42, "providers": 10, "ratings": 15 },
"series": { "transactions": [1, 0, 3, 2], "ratings": [0, 1, 0, 1] },
"recentPayments": [
{
"id": "...",
"status": "succeeded",
"created_at": "2026-03-19T20:00:00.000Z",
"original_url": "https://exa.mpp.tempo.xyz/search",
"original_method": "POST",
"challenge_realm": "exa.mpp.tempo.xyz",
"output_tx_hash": "0x...",
"provider_name": "Exa"
}
]
}
```
## Errors
All errors follow this format:
```json
{ "error": { "message": "Description of what went wrong" } }
```
## Health
```
GET /health -> { "ok": true }
```