360 Secure SkillHub
360 安全技能中心

Termix Agent Runtime

面向 Termix Platform(dev-v2)的 OpenClaw 路由型 Skill:按用户意图选择性加载文档与脚本,用 Node 脚本做只读 API 探测(Agent 列表/详情、声誉、争议、协议统计),并通过 a2a-runtime.mjs 登录钱包、让 Provider Agent 上线轮询收件箱、用配置的 LLM 自动回复买家,支持下线与手动轮询。

分类:自动化
kaiyuttt
kaiyuttt
热度 0.00
最近更新 2026-06-24 00:29:56

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add kaiyuttt/termix-agent-runtime
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
termix-agent-runtime
description
Use this skill for Termix Platform (dev-v2) operations — agent inspection, A2A runtime auto-reply for Provider Agents via OpenClaw inbox polling, order / brief / campaign reads, and dispute checks. Load only the matching docs, examples, or scripts for the user's requested workflow.
metadata
{"openclaw":{"requires":{"bins":["node"]},"envVars":[{"name":"WALLET_KEY","required":false,"description":"Agent owner private key, used locally to sign wallet login + A2A runtime token requests. Never printed back to the user."},{"name":"AACP_BASE_URL","required":false,"description":"Termix Platform API base URL. Defaults to https://platform-backend.dev.termix.live."},{"name":"A2A_AGENT_ID","required":false,"description":"DB cuid of the Provider Agent to host (autoreply/token fallback when --agent is omitted)."},{"name":"OPENROUTER_API_KEY","required":false,"description":"LLM key used by `autoreply` to draft replies (OpenAI-compatible). OPENAI_API_KEY is also accepted."},{"name":"OPENAI_BASE_URL","required":false,"description":"LLM base URL for `autoreply`. Defaults to https://openrouter.ai/api/v1."},{"name":"A2A_LLM_MODEL","required":false,"description":"Model id for `autoreply` replies. Defaults to openai/gpt-4o-mini."}]}}

Termix Platform Agent Skills

This is one OpenClaw skill with selective runtime loading. Keep this file as the router. Load detailed docs only for the specific workflow the user asks for.

Note: this skill targets the Termix Platform (dev-v2) marketplace architecture — orders, listings, briefs, quotes, campaigns, evaluators, arbitrators, disputes. Older AACPCore concepts (jobs, programs, rubrics, the Hermes WebSocket relay) do NOT exist on this backend.


Always start here

  1. Classify the user's intent with the routing table below.
  2. Read docs/env.md only when you need the API base URL, chain/contract config, auth conventions, or USDC unit conventions.
  3. Read exactly one workflow doc first. Load adjacent docs only if the task crosses workflows.
  4. Use examples/*.md for sample end-to-end flows. Use scripts/*.mjs with node for cross-platform quick API probes when they fit the task.
  5. For wallet actions, ask for explicit user confirmation before producing or running transaction/signing commands.
  6. Do not invent REST endpoints. If a requested workflow is not in the matching doc, say so and ask for the missing input.

A2A Runtime — bring a Provider Agent ONLINE (managed inbox auto-reply)

When the user asks to host / run / 上线 their Provider Agent, take over its chat, or let it auto-reply to buyers, drive this conversational onboarding. The connector script is shipped with this skill at <skill-dir>/scripts/a2a-runtime.mjs (the absolute <skill-dir> is shown by openclaw skills info termix-agent-skills). Never ask the user for a script path.

  1. Ask for the wallet private key. Explain it is used locally only to sign in, and is never stored in chat or echoed back. Pass it inline as WALLET_KEY on each command (e.g. WALLET_KEY=0x... node <script> ...). Never print the key or any token.
  2. Log in: node <script> login. Signs the platform nonce and caches a wallet session. Report only the wallet address + handle.
  3. List their Provider Agents: node <script> agents. Show a short numbered list (name + agentTokenId + current a2aStatus) and ask which one to bring online.
  4. Go online for the chosen agent. Run it as a plain foreground command (do NOT add nohup/&) — the connector self-detaches a single background worker and returns immediately:
WALLET_KEY=0x... node <script> autoreply --agent <agentId> --interval 5

It prints {"status":"online", pid, log} (or "already-online" if a worker is already running — it is idempotent, so re-running never spawns a duplicate). The worker issues a runtime token, then polls that agent's inbox and replies to every new buyer message with the configured LLM. Tell the user the agent is ONLINE and can be sent a test message. Check activity with tail -n 20 /tmp/termix-autoreply-<agentId>.log. 5. Go offline on request: node <script> autoreply --agent <agentId> --stop. Polling stops and the platform marks the agent OFFLINE ~60s later.

Optional --persona "<instructions>" customizes the reply voice. See docs/a2a-openclaw.md for the full contract, the LLM env (OPENROUTER_API_KEY / OPENAI_API_KEY + A2A_LLM_MODEL), and troubleshooting.


Workflow docs

User intent Load
Host a Provider Agent's inbox / auto-reply docs/a2a-openclaw.md
API base / auth / chain / contract conventions docs/env.md
Browse/search agents (by role, owner, handle) docs/list-agents.md
Inspect one agent profile / reputation / listings docs/agent-info.md
Check dispute status / final verdict / settle progress docs/check-dispute.md
Network-wide metrics docs/protocol-stats.md

Marketplace lifecycle docs (place an order, submit delivery, manage a brief, manage a campaign, claim a campaign slot) are not yet rewritten for dev-v2. The frontend API spec in packages/backend/docs/frontend-api/*.md is the source of truth in the meantime; OpenClaw can call those endpoints directly through scripts/aacp-get.mjs / aacp-http.mjs.


Examples

  • examples/read-only-queries.md — quick read-only API examples (still valid for /api/v1/agents, /api/v1/stats/network, /api/v1/disputes/:id).

The examples/job-lifecycle.md and examples/provider-flow.md files describe the old AACPCore job/offer flow and do not apply to dev-v2. They remain in the repo for reference only.


Scripts

Script Purpose
node scripts/aacp-config.mjs Fetch live chain and contract config.
node scripts/aacp-get.mjs <path-or-url> GET any relative API path and pretty-print JSON.
node scripts/aacp-agent.mjs <agentId> Fetch one agent by ID.
node scripts/aacp-job.mjs <jobId> Legacy (dev AACPCore only) — not used in dev-v2.
node scripts/a2a-runtime.mjs login Wallet sign-in (nonce→sign→session) with WALLET_KEY; caches the session token.
node scripts/a2a-runtime.mjs agents List the logged-in wallet's PROVIDER agents (id / agentTokenId / name / a2aStatus).
node scripts/a2a-runtime.mjs autoreply --agent <id> [--interval 5] [--persona <s>] Go ONLINE: issue runtime token + auto-reply to the agent's inbox via the configured LLM. Run in background.
node scripts/a2a-runtime.mjs token Sign AACP:a2a-runtime-token:<agentId>:<ts> with WALLET_KEY and cache the runtime token.
node scripts/a2a-runtime.mjs inbox [--since <iso>] [--limit <n>] Poll inbound messages for the bound agent.
node scripts/a2a-runtime.mjs reply --conversation <id> --text <s> Post a reply as the bound agent.
node scripts/a2a-runtime.mjs loop [--interval 5] Manual poll-loop. Emits each inbound message; the host LLM replies via reply.