For agents · protocol v0给 agent · 协议 v0
Ask here.Order here. 在这里找,在这里下单。
There is no catalogue to browse. An agent sends the user’s need to one endpoint and gets back ranked products it can order. This page is the contract. Humans can read it to see exactly what their agent will be shown.这里没有要翻的目录。agent 把用户的需求发到一个接口,拿回排好序、可以直接下单的产品。这一页就是接口约定,人类也可以读它,确切知道自己的 agent 会看到什么。
The contract below stays in English so agents can read one text. The summary is for people.下面的协议正文以英文为准,方便 agent 读取。给人看的摘要:把需求 POST 到 /v1/ask,选中产品后 POST /v1/orders,把返回的链接给用户。支付接通后,款项将由平台托管。目前早期站点尚未接入支付,无法付款。
Quick start
Two calls: search, then order. Pick what your runtime can do.
# 1 · search: only a URL fetch is needed curl -s "https://agenfora.com/ask?intent=Audit%20my%20agent%20tool%20permissions&budget_max=10000¤cy=CNY&deadline_days=7" # 1 · search: canonical, POST JSON (idempotent) curl -s https://agenfora.com/v1/ask -H 'content-type: application/json' -H 'Idempotency-Key: 7f3c…' -d '{ "intent": "Audit my agent tool permissions; threat model + fix list", "budget": {"currency":"CNY","max_minor":1000000}, "deadline_days": 7, "agent": {"name":"my-agent","operator_contact":"me@example.com"} }' # 2 · order: copy "order.body" from the product you chose, fill in "inputs" curl -s https://agenfora.com/v1/orders -H 'content-type: application/json' -H 'Idempotency-Key: 9a21…' -d '{ "product_id": "prd_s001", "variant_id": "standard", "ask_id": "ask_…", "inputs": {"tool_list":["search","email"],"config_access":"https://…","risk_focus":"data exfiltration"} }' # 3 · hand "authorize.url" from the response to your human
Browser agents can use WebMCP: the page registers agenfora_ask and agenfora_order through navigator.modelContext, and the ask form on the home page is declared with toolname.
Entry points
| Method | URL | Use |
|---|---|---|
| GET | /ask?intent=… | Search with a URL only. Also budget_max, budget_min, currency, deadline_days, deadline, category, format=md. The same URL gives the same ask. |
| POST | /v1/ask | Canonical search. JSON body; optional Idempotency-Key. |
| GET | /v1/ask/{ask_id} | Re-run an earlier ask against the current index. Returns status_changed. |
| POST | /v1/ask/{ask_id}/watch | Leave a callback_url or contact for when a product appears (delivery not running yet). |
| GET | /v1/products?category=&q= | Read-only search of live products. |
| GET | /p/{product_id}(.md) | One product: variants, scope, acceptance, required inputs. |
| POST | /v1/orders | Place an order. Freezes price, scope and acceptance terms. |
| GET | /v1/orders/{order_id} | Order status. Human-readable twin at /orders/{order_id}. |
| GET | /v1/categories | What is open now, what opens next, what is not taken. |
| GET | /v1/pulse | Public aggregates of demand. No raw requests. |
The ask
Only intent is required. Money in JSON is in minor units (1000000 = ¥10,000.00); the convenience fields budget.max and budget_max use major units.
| Field | Type | Notes |
|---|---|---|
| intent | string ≤ 4000 | Required. What must be delivered, to which acceptance standard, in what timeframe. Any language. |
| category | enum | Optional hint: audit, automation, research, video, goods, courses. Omit to let the platform classify. There is no other. |
| budget | object | {currency, max_minor, min_minor}. Currencies: CNY USD EUR GBP HKD JPY SGD. Products whose every tier is over budget are dropped. |
| deadline_days | integer 1–365 | Or deadline as an ISO 8601 date. Tiers that take longer are dropped. |
| agent | object | {name, version, operator_contact}. Recorded with the ask. |
| notify | object | {callback_url (https), contact}. Used if nothing matches yet. |
| locale | en | zh | Language of message in the answer. Defaults to the language of intent. |
| dry_run | boolean | Answer without logging anything. |
Four answers
Every answer has status and message.for_agent / message.for_human. The second is written so you can repeat it to your user as is. No answer is a dead end.
| status | Meaning | What you do |
|---|---|---|
| matched | Products fit. Up to 3, ranked, each with price tiers and a ready-made order. | Compare, pick a product and tier, call the order instruction. |
| needs_input | Too thin to match. missing lists fields with examples. | Add them and ask again. |
| waitlisted | In scope, but no product fits yet (none live, over budget, or too tight a deadline). | See No product yet. |
| out_of_scope | We don’t take this. reason says why; also_available lists what we take. | Don’t retry unchanged. |
A matched product looks like this (trimmed):
{
"status": "matched",
"products": [{
"product_id": "prd_s001",
"title": "Agent permission & prompt-injection review",
"variants": [
{"variant_id":"standard","price":{"currency":"CNY","amount_minor":680000,"display":"¥6,800"},"lead_days":7,"fits":true},
{"variant_id":"deep","price":{"currency":"CNY","amount_minor":1380000,"display":"¥13,800"},"lead_days":10,"fits":false}
],
"suggested_variant": "standard",
"inputs_required": [{"field":"tool_list","type":"string[]"}, …],
"order": {"method":"POST","url":"https://agenfora.com/v1/orders","body":{"product_id":"prd_s001","variant_id":"standard","ask_id":"ask_…","inputs":{…}}}
}]
}
Ordering
An order is the point of the platform. POST /v1/orders picks one product and one tier, and freezes the tier’s price, the scope and the acceptance terms. They never change afterwards; the order only gains status and evidence. A dispute is judged against the frozen terms.
| Field | Type | Notes |
|---|---|---|
| product_id | string | Required. |
| variant_id | string | Required when the product has several tiers; otherwise optional. |
| inputs | object | Every field in the product’s inputs_required. Missing ones come back as a 422 with a fix per field, so you can ask your human. |
| ask_id | string | Optional. Links the order to the ask that found the product. |
| buyer | object | Optional. {agent, human_contact}. |
| dry_run | boolean | Validate and preview without creating an order. |
The response carries order_id, the frozen terms, and authorize.url. Give that link to your human. 支付接通后,款项将由平台托管。目前早期站点尚未接入支付,无法付款。Once payment is connected, funds will be held by the platform. This early site cannot take payment yet. Until then the order stays awaiting_authorization.
- Products with
order_mode: confirmare confirmed by the supplier within a stated number of hours, then go to your human for payment. - Status after authorization (
paid→in_progress→delivered→accepted→settled, ordisputed) is defined but not live in this prototype. Payment is not connected. - A future spending mandate (the user pre-authorizes a budget) would let an agent complete payment itself. Not available yet.
When there’s no product yet
Early on, supply is thin. Every ask is recorded in detail anyway, and a waitlisted or out_of_scope answer carries a hook:
- A receipt.
ask_idis permanent. - A way back.
GET /v1/ask/{ask_id}re-runs matching against the latest products and reportsstatus_changed. Suggested after ~24 hours. - A notification.
POST /v1/ask/{ask_id}/watchwithcallback_url(https) or a contact. Stored now; delivery is not running yet. - What else we take.
also_availablelists open categories with an example ask you can send straight away.
An ask that waited here is matched first when a fitting product goes live.
Guarantees
- Same action, same result. Send an
Idempotency-Key(header or body) on asks and orders. A replay returns the original and never creates a duplicate. A GET ask is keyed by its URL. - Frozen terms. Price, scope, acceptance and the platform service fee written on the product card are fixed at order time.
- Platform service fee by product type. From 1% of accepted, settled orders: goods 1%, standardised services 5%, custom professional services 8% (unclassified defaults to 8%, never to 1%). Payment processing is charged separately at actual channel cost; who bears it is not yet confirmed. See the
feesobject on/.well-known/agent-market.json. - Ranking by fit. Not for sale.
- Honest samples. Products marked
sample: trueare illustrative. Don’t present them to a human as real; orders on them are not fulfilled. - Two readers. Every page, product and order also exists as Markdown: add
.md, or sendAccept: text/markdown.
Errors & limits
Errors are {ok:false, error:{code, message, fix, fields?}}. Validation errors use HTTP 422 and give a fix per field, so you can correct and resend without guessing.
| HTTP | code | When |
|---|---|---|
| 422 | invalid_ask · variant_required · missing_inputs | Bad or missing fields. |
| 404 | unknown_product · unknown_order · unknown_ask | No such id. Dry-run ids are never stored. |
| 413 | too_large | Body over 32 KB. Send links, not material. |
| 429 | rate_limited | 30 asks and 20 orders per minute per IP. See Retry-After. |
Discovery
/llms.txt: a short index to read first./openapi.json: every endpoint, typed./.well-known/agent-market.json: machine-readable capabilities and links.- Every HTML response has
Link: rel="alternate"; type="text/markdown"and ax-agenfora-twinheader.
What to tell your human
Copy message.for_human as is. When you order, give them authorize.url and say: 支付接通后,款项将由平台托管。目前早期站点尚未接入支付,无法付款。Once payment is connected, funds will be held by the platform. This early site cannot take payment yet. Say it is a sample if sample is true.
Try it
A real call to POST /v1/ask with dry_run: true. Nothing is logged. When it matches, you can place a dry-run order too.
Products that fit, with price tiers and a one-call order.
Exactly which fields are missing, with examples.
Logged in detail. A receipt, a way back, what else we take.
Why not, plainly, and what we do take.