Skip to content

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.

5.2 KB
Raw Blame

Update flow — update #N

Loaded when: user wants to update an existing agent, or fix a rejected / QA-failed listing. Pairs with SKILL.md.

Rejected listing → update the same agent, never create new. QA failure (§4 of register.md) or review rejection (approvalStatus/approvalDisplayStatus: 5): fix path is agent update on the existing id → re-activate. Never offer a new agent as remedy; only create if user explicitly insists after steer.


  1. agent get-agents --agent-ids <id> FIRST — before collecting ANY change → render the current detail card (§Invariants Verbatim-render contract). Never start editing from the user's words alone; always fetch current state first.

    • Service id lookup (ASP, on demand only): an existing service's id is needed ONLY to update or delete it. When — and only when — the user asks to modify or remove an existing service, run agent service-list --agent-id <id> to get that id. Skip it for agent-level edits (name / description / picture) and for adding a new service (a create entry has no id). If services aren't being touched, never call service-list.
  2. Ownership check: returned ownerAddress ≠ current wallet → STOP: "This agent doesn't belong to your current wallet."

  3. Collect changes one field per turn. If the changed field is a service endpoint, apply the same rules as register.md §6 (must be https://, publicly reachable, ≤512 chars). Never proactively offer or guide service deletion — only build a delete entry (step 6) when the user explicitly asks to remove a service; otherwise deletion is never raised. Do NOT run validate-listing while collecting — QA is a single batch pass that happens in step 4 after all changes are gathered (never per-field, never per-service).

  4. QA — single batch pass, semantic checks identical to register.md §4. role = asp AND a QA-governed field changed (QA-governed = the agent name, the agent description, or any service create/update entry — a name-only change still triggers the pass) → after ALL changes are collected, run validate-listing exactly once, validating ONLY this call's create + update service entries (NOT delete entries, NOT unchanged services — there is nothing to validate in those): --role asp --name <new-or-current> --description <new-or-current> --service '[… ONLY the create + update entries, WITHOUT the operation/id keys …]'. If no service is created/updated this call (e.g. name-only or delete-only change) → pass --service '[]' (name/description QA only). Then follow register.md §4 steps 2–4 verbatim: always run the step-4 semantic checks and merge with CLI findings; only when both pass:true AND no semantic issues → skip the findings card; otherwise render findings as suggestions only (do not apply any fix yet) → ask the two-choice confirmation (1. apply suggested fixes / 2. I'll revise myself) → on confirm apply once / on self-revise collect new values → never re-run validate-listing. user / evaluator skip QA. Resolved values then flow into the step-5 diff card.

  5. Update Diff card (§Invariants diff variant — 3 columns | Field | Current | New |, unchanged → (unchanged), changed New cell bold, real before→after values). Show each service delta as its own row — added (Current (none)), modified (before→after), removed (New (removed), so the user explicitly sees and confirms a deletion). Wait for 1 / 执行; no agent update before confirm.

  6. --service = DELTA, never full coverage. Send only the services that change, each tagged with operation; unchanged services are omitted (omitting a service no longer deletes it). Build each entry as:

    • add a service → "operation":"create" — a brand-new service, with all fields per register.md §6 rules.
    • modify a service → "operation":"update" — targets an existing service via its id (from the on-demand agent service-list in step 1), plus the full new field values.
    • remove a service → "operation":"delete" — targets an existing service via its id (from the on-demand agent service-list in step 1).

    Example: --service '[{"operation":"update","id":"7","serviceName":"…","serviceDescription":"…","serviceType":"A2MCP","fee":"12","endpoint":"https://…"},{"operation":"delete","id":"9","serviceName":"…","serviceDescription":"…","serviceType":"A2A","fee":"5"}]'

    No-op guard: if nothing changed (no agent field, no service entry) → "No changes to submit." Don't call agent update; re-enter update Q&A. --description "" does NOT clear a description. Post-update:

    • agent.approvalStatus == 2 (WS push payload, if the field is present) → "Update saved. Under review — once approved it will go live automatically. No further action needed." If the agent key or approvalStatus field is absent (WS push timed out or field not returned), fall through to the standard update success line per §10 update template.
    • step-1 detail showed approvalDisplayStatus == 5 (not auto-resubmitted) → "Update saved — not yet resubmitted. Say 'activate #<id>' to send it for review."
    • else → "Update saved." → Step 6.