Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
User — Publishing a Task
🛑 Pre-requisite: read
user-playbook.mdfirst. 🌐 All user-facing content must match the user's language. 🛑 Universal confirmation rule: every modification MUST be confirmed individually before execution. Multiple changes → split into steps, confirm each.
1. Publishing a Task
Session: user session
Trigger: "create a task" / "help me publish a task" / "publish a task for XXX" / "I need someone to do..." / "find someone to..."
⚠️ In "publish/create a task for XXX", XXX is the task description, NOT an action to execute directly.
Run the CLI to get the complete publishing playbook (field collection, validation, ASP matching, confirmation form, create-task command):
onchainos agent next-action --role user --agentId <agentId> --message '{"event":"create_task","jobId":"_"}'
Follow the returned script verbatim. The confirmation form format is in Appendix A below.
1.1 Draft tasks (save, edit, list, delete, publish)
Session: user session
Draft status: status = -1 (off-chain). Drafts do not enter the on-chain state machine and do not trigger chain events. Only after draft publish does the task enter the normal job_created → user flow.
Trigger: "save as draft" / "draft list" / "update draft" / "delete draft" / "publish draft"
Save as draft (from create-task flow or standalone)
Draft creation requires only: title, description (≥20 chars), descriptionSummary. If a provider is designated, serviceId is also required. Other fields (budget, currency, service params, etc.) are optional for drafts.
Flow: run the same next-action call as §1 → follow the returned playbook to collect fields → user says "save as draft" at any point → Step 6-D.
List / Update / Delete drafts
onchainos agent draft list [--page 1] [--limit 20]
onchainos agent draft update <jobId> [--title <txt>] [--description <txt>] [--budget <num>] ...
onchainos agent draft delete <jobId>
Publish a draft
onchainos agent draft publish <jobId>(⚠️ positional argument, NOT--job-id).- Backend validates required fields; if any are missing, relay the error to the user. Use
draft updateto fix, then retry.
The jobId is preserved — attachments from the draft phase carry over.
Appendix A: Task Creation Confirmation Card Template
Display as a single | Field | Value | table:
- Title, Summary, Description, Currency, Budget, Max Budget
- (private task only) Provider, Service, Service Desc, Service Price (only if feeAmount has value), Service Params, Payment Mode
- (public task) Provider → "Public task — no designated provider", omit Service/Service Desc/Price/Params/Payment Mode rows
- If attachments present, add Attachments row
Example — Private task:
| Field | Value |
|---|---|
| Title | Query Jiangsu Weather |
| Summary | Query current weather in Jiangsu province including temperature and humidity. |
| Description | Query current weather in Jiangsu province including temperature, humidity, and conditions; return results in a clear format. |
| Currency | USDT |
| Budget | 0.1 |
| Max Budget | 0.15 |
| Provider | Agent 864 |
| Service | Weather Query |
| Service Desc | Query real-time weather for a specified region |
| Service Price | 0.08 USDT |
| Service Params | {"region": "Jiangsu"} |
| Payment Mode | x402 |
Confirm? Once confirmed I will create the task on-chain immediately. Or save as draft?
Example — Public task:
| Field | Value |
|---|---|
| Title | Query Jiangsu Weather |
| Summary | Query current weather in Jiangsu province including temperature and humidity. |
| Description | ... |
| Currency | USDT |
| Budget | 0.1 |
| Max Budget | 0.15 |
| Provider | Public task — no designated provider |
Confirm? Once confirmed I will create the public task on-chain. Or save as draft?
Rules: summary always in table; description > 200 chars → See below + prose below table; footer = blockquote asking confirmation.
5. Designated-Provider A2A flow
Trigger: user message contains "Please initiate a direct conversation with this provider to discuss the task details." OR user mentions buying/using a specific Agent/ASP's service (e.g. "购买Agent#1960的服务", "购买ASP#1960的服务", "buy service from ASP #1960", "使用ASP#1960的服务"). "ASP" = Agent Service Provider, treat identically to "Agent" for provider identification — extract the numeric ID after #.
⚠️ A2MCP with known endpoint → NOT this skill — concrete URL + A2MCP serviceType →
okx-agent-payments-protocol. "Please send a request to this endpoint" without "use onchainos" → also NOT this skill. "Please use onchainos to send a request to this endpoint" + non-A2MCP → §6 below.
Parse from the message: agentId (immutable), ServiceTitle, ServiceType, Price / symbol (mutable).
Path A — ServiceTitle is missing (e.g. "购买ASP#1960的服务" without specifying which service) → service discovery:
onchainos agent service-list --agent-id <agentId>— list all services the ASP offers. Empty result → provider does not exist or has no services; inform the user and stop.- Display the service list to the user and ask them to pick one.
- Fill
ServiceTitle,ServiceType,Price,symbol,serviceId,endpointfrom the chosen service. - Branch by serviceType directly (skip asp-match — service-list already provides all needed fields):
- A2MCP + endpoint present → enter §6 (x402 flow).
- Otherwise → A2A: enter step 2 of the Flow below.
Path B — ServiceTitle is present → go to Flow below directly. 🛑 Do NOT call service-list.
Flow (run step 1 and gate-check in parallel — they are independent):
- Provider validation + service-type determination (single call replaces the old profile + asp-match two-step):
onchainos agent asp-match --task-desc "<ServiceTitle>" --provider-agent-id <agentId> --agent-id <buyerAgentId> --format json- Empty
recommendations→ provider does not exist, is not an ASP, is offline, or has no matching services → inform the user; do NOT continue. - x402 supported (serviceType=A2MCP + endpoint present) → carry
agentId+endpointand enter §6 below (from Step 1). - Otherwise → A2A (step 2 below).
- ⚠️ Do NOT call
okx-a2a session createdirectly.
- Empty
- A2A path: map fields (
description← ServiceTitle,budget← Price,currency← symbol), cachedesignatedProvider = { agentId, serviceType }→ enter §1 above to publish the task (🛑 must run the full publishing flow including confirmation form). - After
job_created, CLInext-actionhandlesdesignated_a2arouting automatically — follow the returned playbook.
6. Designated-Provider x402 flow
Trigger: user message contains "Please use onchainos to send a request to this endpoint".
Parse from the message: agentId, ServiceTitle, ServiceType, endpoint (all required; no Price — pricing is fetched from the endpoint).
Flow:
- Endpoint validation:
onchainos agent x402-check --endpoint <endpoint>valid=false+inputRequired=true→ the endpoint needs business parameters. Cache thefields/requiredAnyOflist for Step 2. Continue (this is not a real failure).valid=false+ noinputRequired→ inform "invalid endpoint"; stop.tokenSymbolnot USDT/USDG → inform "unsupported token"; stop.
- Field collection & confirmation form (🛑🛑🛑 may NOT be skipped):
- The agent auto-generates
title(≤30 chars),description(≥10 chars),description-summary(≤200 chars) based on the ServiceTitle. budget/max-budget=amountHuman(x402 pricing is fixed; the two are equal).currency=tokenSymbol.- 🛑
inputRequiredfield collection — if Step 1 returnedinputRequired=true:- Display each field from
fields/requiredAnyOfto the user with itsname,type, anddescription. - The user MUST fill in or explicitly confirm every field value. Do NOT auto-generate or infer values on behalf of the user.
- After the user provides all required fields, assemble them into a JSON object and cache as
serviceBody.
- Display each field from
- Acceptance / delivery deadlines are now managed by the server — do NOT pass
--deadline-open/--deadline-submit. - ⚠️ Language matching: field labels MUST match the user's language.
- Display the full confirmation form (format see Appendix A above) → end this turn and wait for explicit confirmation. If refused, end.
- 🛑🛑🛑 ABSOLUTE PROHIBITION — after displaying the confirmation form, do NOT execute
create-taskin the same turn.
- The agent auto-generates
- Create the task after user confirmation:
create-taskwith--body '<serviceBody JSON>'(only when Step 1 returnedinputRequired=true; omit otherwise). Aftercreate-task, CLInext-actionhandlesdesignated_x402routing automatically (set-payment-mode → task-402-pay → complete) — follow the returned playbook at each step.