Agent API
当 Agent Trial 产品目录返回 available: true 时,AI Agent 可以通过标准接口发现、购买并试用 EchoScan 风险检测能力。购买功能关闭时发现入口仍可读取,因此客户端必须先检查实时产品响应,不能根据静态网页直接发起付款。
EchoScan 是设备身份与访问风险 API,不是加密货币产品,也不会要求浏览器用户连接钱包。
发现公开合同
/.well-known/api-catalog是符合 RFC 9727 的 API Catalog。/openapi.json描述 Agent Trial 和 Lite Report 接口。/llms.txt为 Agent 提供精简的产品与安全索引。- 开发者 API 文档 说明 Browser Verifier 与 Report API v1。
HTTP 响应也会通过 api-catalog Link Relation 公布目录。本期不发布 MCP Server 或 MCP Server Card。
先检查是否可购买
调用 GET https://api.echoscan.org/api/v1/agent/products。只有 agent_trial_lite_100 的 available 为 true 时才继续,并以响应中的价格、资产、网络、有效期、Capability 和限制为实时合同。
该产品的三个精确 Capability 是 fingerprint.submit、fingerprint.report.lite 和 agent.trial.status。
公开页面不会写死生产价格或收款地址。支付配置关闭或不完整时,服务端必须 Fail Closed,并明确返回不可购买。
完成 Agent Trial
- 使用一个精确的 HTTP 或 HTTPS Origin 创建 Intent,并保留响应中的
product、activate_url和status_url。 - 一次性 claim token 只保留在进程内,并通过 Bearer 鉴权发送。
- 不带付款凭证请求 Activate URL,读取 HTTP 402 的
PAYMENT-REQUIRED。 - 再次确认挑战与锁定报价、预算、网络、资产和收款地址一致。
- 使用 x402 v2
exactHTTP Client,通过PAYMENT-SIGNATURE自动重试。 - 轮询 Status URL,并在交付窗口内从顶层字段领取
trial_id、Environment ID、API Key、Allowed Origin、Quota、过期时间和 Report Endpoint。 - 从精确 Allowed Origin 运行 Browser Verifier,把
{ imprint }交给服务端代码,再查询规范 Lite Report 接口。
重试、额度、过期和凭证边界见 x402 兼容 Agent Trial 指南。
不让秘密进入 Agent 轨迹
买家私钥、claim token、PAYMENT-SIGNATURE 和 EchoScan API Key 都不能放进 URL、提示词记录、浏览器持久存储、日志、Metrics Label 或代码仓库。Environment ID 可以公开;Agent Trial API Key 和付款凭证不能公开。
Trial Key 只能读取 Lite Report 和自身 Trial 状态,不能访问 Pro Reasons、History、Pick、submit-lite、Billing、Console Session 或 Internal Route。
解读 Lite Report
客户应把 risk.status 作为访问风险上下文,用于自己的 allow、challenge、review 或 deny 策略。Lite 不包含 Pro Reasons 或 Activity History;EchoScan 也不证明个人法定身份或意图。