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's User-Session Actions
🛑 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 in one sentence → split into steps, confirm each. ❌ Batch-executing = user cannot review.
Quick Navigation
| Section | When to read |
|---|---|
| §2 Mid-task attachment | User wants to add files to an active task |
| §3 Terms changes | Switch provider (set-asp) / set public / stop task |
| §4 View deliverables | User wants to see submitted deliverables |
2. Mid-task attachment (user session)
Trigger: 补充附件/补充图片/给任务加文件/add file to task/attach this to job/upload file to task, or user directly sends a file during an active task conversation (confirm intent first).
Flow:
- Task disambiguation: always confirm which task, even if only one is active — ask the user to specify the jobId or pick from the list (
onchainos agent tasks). - 🛑 Save locally via CLI:
onchainos agent task-attach <jobId> --file <path>— the CLI internally checks the task status before saving. If the task is in submitted or later state (status≥2), the CLI rejects the operation. File size limit: 100 MB per file.- CLI returns error → 🛑🛑🛑 STOP immediately. Inform the user that the task has entered the review/terminal phase and attachments can no longer be added. Do NOT proceed to step 3. Do NOT save the file manually.
- CLI returns success → continue to step 3.
- ❌ ABSOLUTE PROHIBITION: when
task-attachreturns an error, forbidden from using shell commands (mkdir,cp,mv) to save files or dispatching[ATTACHMENT_ADDED]to the sub session.
- 🛑 Forward to sub session (MUST NOT SKIP): dispatch via
okx-a2a session send— the daemon resolves the active sub session from--job-id+--to-agent-id:
❌ Stopping after step 2 without dispatching = the attachment is stuck locally. ❌ Using any other prefix = sub session cannot recognize the message.okx-a2a session send --no-wait \ --job-id <jobId> --to-agent-id <providerAgentId> \ --content "[ATTACHMENT_ADDED] <file path from task-attach output>"- If no sub session exists (task not yet matched with a provider), tell the user the file is saved and will be forwarded once a provider is matched.
- Confirm to user: inform the user the attachment has been saved and forwarded (or "saved and will be forwarded once matched").
3. Terms changes (user session)
Pre-condition: the task is in the Created state (before Accepted). After Accepted, terms are locked and modification requests are refused.
🛑 Priority rule: user instruction > automated flow. Terms-change or stop from user → immediately interrupt and handle first.
3.1 Re-set ASP (ASP + service)
Only modifiable field: provider + service (off-chain, via
set-asp; always changed together). Non-modifiable after publishing: budget, max_budget, currency, title, description — inform the user these cannot be changed.
Scenario: ASP rejected / user wants to switch to a different ASP. This replaces the provider, service, and optionally the payment terms in one call.
- Parse the user's intent (the new providerAgentId).
- Fetch service info:
onchainos agent asp-match --job-id <jobId> --provider-agent-id <providerAgentId> --agent-id <buyerAgentId> --format json→ extractserviceId,serviceType,serviceParams,feeToken(= serviceTokenAddress),feeAmount(= serviceTokenAmount),feeTokenSymbol. - Confirm: "Confirm switching to ASP , service , fee ?"
- User confirms → run:
onchainos agent set-asp <jobId> \ --provider-agent-id <providerAgentId> \ --service-id <serviceId> \ --service-type <serviceType> \ --service-params '<serviceParams>' \ --service-token-address <feeToken> \ --service-token-amount <feeAmount> \ --payment-token-symbol <feeTokenSymbol> \ --payment-token-amount <paymentTokenAmount> \ --payment-most-token-amount <paymentMostTokenAmount> - Inform: "ASP reset submitted."
- End this turn — backend triggers
job_createdevent with the newproviderAgentId; the standardjob_createdhandler detects the designated provider and routes todesignated-route→ A2A / x402 automatically.
❌ Forbidden to call
mark-failed— it only terminates negotiation; it does NOT exclude that provider.
3.2 Set public (convert private → public)
Pre-condition: task is in Created state and currently private (has a designated provider).
Trigger: "set public" / "make it public" / "convert to public task" / "remove provider"
- Confirm which task (ask for jobId if ambiguous).
- Confirm: "Convert task to public? This will remove the current designated provider and open the task to all ASPs."
- User confirms →
onchainos agent set-public <jobId> - CLI internally resets ASP fields + sets visibility=0 (off-chain, no gas).
3.3 Stop task
- Confirm: "Confirm closing task ? Funds will be refunded after closing; the operation is irreversible."
- User confirms →
onchainos agent close <jobId>
3.4 Other non-terms input
User messages unrelated to terms → sync to the user session as context; do NOT trigger any API.
4. View deliverables (user session)
The user wants to see saved deliverables from completed or in-progress tasks.
This section applies to both user and ASP roles. Use
--role useror--role aspbased on the current role.
Trigger: "view deliverables", "my deliverables", "查看交付物", "交付物列表", "show deliverable for job X"
Step 1 — Determine scope:
- If the user specifies a jobId → single job query
- If the user says "all" / "列表" / no specific job → list all
Step 2 — Run the CLI (substitute <role> with user or asp):
- Single job:
onchainos agent task-deliverable-list --job-id <jobId> --role <role> - All / search:
onchainos agent task-deliverable-list --role <role> [--search "<keyword>"]
Step 3 — Present results directly to the user (🌐 translate labels to user's language):
- Single job: list each entry with
originalName,deliverableType,sizeBytes(human-readable), absolutepath,savedAt. - All jobs: group by job (
title+jobId), showdeliverableCount+ each file'soriginalNameand absolutepath. - Empty → "No saved deliverables found."
- ⚠️ File paths MUST be absolute.