返回资讯中心
外部精选
软件工程
#开发者实时流

Agent-Mediate 推出面向 AI 代理的非托管密封报价争议解决协议

来源标题:Agent-Mediate – Non-custodial sealed-offer dispute protocol for agents

Agent-Mediate 发布了一套面向自主 AI 代理的中立、零托管争议解决协议,两个代理可提交受委托方约束的密封数值报价,由确定性机制在报价重叠时取中点或提出公平分割。协议输出不可篡改的 Ed25519Signature2026 结算指令或 UNRESOLVED 证书,同时保密各方的退出底线与议题权重。该工具可从官方 npm 或 PyPI 安装,并支持针对托管 Practice Bot 的 1–5 项数值争议测试。

Hacker News 最新Agent-Mediate2026/11/25 · 今天20 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

Neutral, zero-custody dispute resolution for autonomous AI agents. Two agents in a commercial or SLA dispute submit principal-bounded, sealed numerical offers; a deterministic mechanism (docs/mechanism.md) settles overlapping offers at the midpoint or proposes a fair split, returning an immutable Ed25519Signature2026 settlement instruction or UNRESOLVED certificate while keeping confidential walkaways and issue weights private.

Install directly from official npm or PyPI (never third-party MCP wrapper marketplaces):

Local Coding Agents vs. Hosted Cloud Sandboxes: Run real commercial mediations from local coding agents (Antigravity, Claude Code, Cursor, Codex CLI) or your own server so your Ed25519 private keys never leave your infrastructure. Hosted cloud chat sandboxes (e.g. Gemini Tasks) disable outbound internet and stdio MCP by default — use cloud VMs only with ephemeral keys for $0.00 Practice Bot tests, or have them generate local setup commands for your machine.

Test Against the Live Hosted Practice Bot (zero repo clone): File any 1–5 numeric issue dispute (SLA credits, redelivery windows, invoice terms, API allowances, refunds) or $0.00 invite naming did:key:z6Mkn42ijWNFD285Ru7xAfVPtVB1LRpmGe5f649fDwxPEanY as respondentId (also returned by GET /v1/platform -> practiceBot.did). It auto-joins, negotiates, and settles in ~15 seconds.

Run a Local Practice Respondent: npm run build && node examples/practice-respondent.ts

2-Agent Cross-Language Demo (<8s): npm run build && node examples/e2e-sla-demo.ts — Python (agent-mediate) buyer + TypeScript (@agent-mediate/mcp) vendor co-sign a clause, settle via sealed offers on https://api.ai-agents-mediation.com, and dual-verify the Ed25519Signature2026 outcome (see examples/README.md).

AP2 + Stripe ACP Pre-Chargeback Adapter: npm run build && node examples/ap2-stripe-prechargeback.ts --offline (or without --offline for live $0.00 Mode A) — binds a Google AP2 Closed Payment Mandate + Stripe PaymentIntent via RFC 8785 JCS, settles an integrative cash + credit split, and executes an idempotent POST /v1/refunds after fail-closed Ed25519Signature2026 verification.

x402r + Coinbase AgentKit Escrow Adapter: npm run build && node examples/x402r-agentkit-escrow.ts --offline (or without --offline for live $0.00 Mode A) — binds an x402r AuthCaptureEscrow PaymentInfo via RFC 8785 JCS, negotiates a partial USDC refund + SLA patch window via an AgentKit-compatible ActionProvider, and verifies Ed25519Signature2026 fail-closed before calling refundInEscrow + releaseEscrow.

  1. MCP Server (Claude Desktop, Claude Code, Cursor, Antigravity)

{ "mcpServers": { "agent-mediate": { "command": "npx", "args": ["-y", "@agent-mediate/mcp"], "env": { "AGENT_MEDIATE_URL": "https://api.ai-agents-mediation.com", "AGENT_MEDIATE_PLATFORM_DID": "did:key:z6Mkg7r4aHyPrNKYy1gbWGXu15VgyN9fCbhqKVwftdhHxJ3W", "AGENT_MEDIATE_AGENT_KEY_FILE": "./agent-ed25519.pem" } } } }

  1. TypeScript SDK (npm install @agent-mediate/sdk)

import { AgentMediateClient, contractHash, generateAgentKey, } from "@agent-mediate/sdk";

const client = new AgentMediateClient({ baseUrl: "https://api.ai-agents-mediation.com", agentKey: generateAgentKey(), // persist PEM locally in production platformDid: "did:key:z6Mkg7r4aHyPrNKYy1gbWGXu15VgyN9fCbhqKVwftdhHxJ3W", });

// File against the $0.00 Practice Bot -> closeEvidence -> confirmIssues -> submitOffer -> outcome const { disputeId } = await client.fileDispute({ respondentId: "did:key:z6Mkn42ijWNFD285Ru7xAfVPtVB1LRpmGe5f649fDwxPEanY", contractHash: contractHash({ orderId: "sla-demo-01", monthlyFeeUsd: 600 }), claim: { summary: "API unavailable for 42 minutes against a 99.9% monthly SLA.", requestedRemedy: "Pro-rata SLA service credit in USD.", }, proposedIssues: [{ id: "serviceCreditUsd", label: "SLA Service Credit", unit: "USD", min: 0, max: 600, step: 10, claimantPrefers: "higher", obligor: "respondent", }], bounds: { serviceCreditUsd: { min: 150, max: 600 } }, determinationConsent: true, });

await client.waitFor(disputeId, (v) => v.status === "EVIDENCE"); await client.closeEvidence(disputeId);

const { view: ic } = await client.waitFor(disputeId, (v) => Boolean(v.issueNegotiation.proposedHash)); await client.confirmIssues(disputeId, ic.issueNegotiation.proposedHash!);

await client.waitFor(disputeId, (v) => v.status === "BARGAINING"); await client.submitOffer(disputeId, 1, { offer: { serviceCreditUsd: 300 }, private: { weights: { serviceCreditUsd: 1 }, walkaway: { serviceCreditUsd: 200 } }, });

const r2 = await client.waitForTurn(disputeId); if (r2.view.status === "BARGAINING" && r2.view.proposalWithinYourMandate) { await client.submitOffer(disputeId, 2, { offer: { serviceCreditUsd: 260 }, proposalResponse: "accept" }); }

const exec = await client.waitFor( disputeId, (v) => v.status !== "BARGAINING" && (v.status !== "EXECUTION_PENDING" || Boolean(v.execution?.proofs.respondent)), ); if (exec.view.status === "EXECUTION_PENDING") await client.confirmExecution(disputeId); const signedOutcome = await client.outcome(disputeId);

  1. Python SDK (pip install agent-mediate)

from agent_mediate import AgentKey, AgentMediateClient, contract_hash

client = AgentMediateClient( base_url="https://api.ai-agents-mediation.com", agent_key=AgentKey.generate(), # persist PEM locally in production platform_did="did:key:z6Mkg7r4aHyPrNKYy1gbWGXu15VgyN9fCbhqKVwftdhHxJ3W", )

filed = client.file_dispute( respondent_id="did:key:z6Mkn42ijWNFD285Ru7xAfVPtVB1LRpmGe5f649fDwxPEanY", contract_hash=contract_hash({"orderId": "sla-demo-01", "monthlyFeeUsd": 600}), claim={ "summary": "API unavailable for 42 minutes against a 99.9% monthly SLA.", "requestedRemedy": "Pro-rata SLA service credit in USD.", }, proposed_issues=[{ "id": "serviceCreditUsd", "label": "SLA Service Credit", "unit": "USD", "min": 0, "max": 600, "step": 10, "claimantPrefers": "higher", "obligor": "respondent", }], bounds={"serviceCreditUsd": {"min": 150, "max": 600}}, determination_consent=True, ) dispute_id = filed["disputeId"]

client.wait_for(dispute_id, lambda v: v["status"] == "EVIDENCE") client.close_evidence(dispute_id)

ic = client.wait_for(dispute_id, lambda v: bool(v["issueNegotiation"]["proposedHash"])) client.confirm_issues(dispute_id, ic["view"]["issueNegotiation"]["proposedHash"])

client.wait_for(dispute_id, lambda v: v["status"] == "BARGAINING") client.submit_offer( dispute_id, 1, offer={"serviceCreditUsd": 300}, private={"weights": {"serviceCreditUsd": 1}, "walkaway": {"serviceCreditUsd": 200}}, )

r2 = client.wait_for_turn(dispute_id) if r2["view"]["status"] == "BARGAINING" and r2["view"].get("proposalWithinYourMandate"): client.submit_offer(dispute_id, 2, offer={"serviceCreditUsd": 260}, proposal_response="accept")

exec_res = client.wait_for( dispute_id, lambda v: v["status"] != "BARGAINING" and (v["status"] != "EXECUTION_PENDING" or bool((v.get("execution") or {}).get("proofs", {}).get("respondent"))), ) if exec_res["view"]["status"] == "EXECUTION_PENDING": client.confirm_execution(dispute_id) print("Verified outcome:", client.outcome(dispute_id)["document"]["terms"])

Repository Layout

packages/core/ Pure deterministic bargaining & verifiability engine (zero dependencies, zero I/O) packages/protocol/ did:key, did:web, JWKS, key-history, RFC 9421, mandates & pre-dispute clauses packages/sdk/ TypeScript client SDK & x402 EIP-3009 USDC payer packages/mcp/ Model Context Protocol stdio server + MCP Registry server.json packages/python/ Zero-dependency Python 3.9+ SDK (agent-mediate on PyPI) skills/agent-mediate/ Portable Agent Skill (SKILL.md) for Claude Code, Cursor, Codex & Antigravity examples/ Runnable TypeScript & Python adapters (AP2/Stripe ACP, x402r/AgentKit), quickstarts, clauses & webhook receiver testdata/ Cross-language JCS, Ed25519, RFC 9421, and Merkle conformance vectors docs/mechanism.md Formal mathematical mechanism specification (RULES_VERSION 1.4.0)

Local Verification

npm ci --ignore-scripts npm run check

License

Apache License 2.0 — see LICENSE and NOTICE.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →