展示HN:A2A协议——代理间经济的基础设施
我一直在思考人工智能代理的“最后一公里”问题。我们有能够编码、规划和浏览的代理,但它们在经济上仍然“受限”。它们无法独立支付自己的API调用、计算或数据费用,因为需要有人提供信用卡。
为了解决这个问题,我正在构建A2A(代理到代理)系统,这是一个开源基础设施,旨在将代理转变为独立的经济主体。
系统的核心是什么?
身份(a2trust):基于DID的可验证身份,使用@veramo/core。它允许代理建立持久的信誉(EigenTrust),使它们能够在没有集中式管理者的情况下相互信任。
支付(a2pay):基于ERC-7579智能账户构建。代理可以使用会话密钥在特定约束条件下(时间限制、金额上限、费用抽象)自主执行交易。
协议(a2api):一个利用MCP(模型上下文协议)的市场层。代理可以通过机器可读文档(llms.txt)发现服务,并通过标准接口协商费用。
为什么这很重要:
目前大多数代理支付解决方案只是围绕人类钱包的包装。A2A旨在建立一个原生的“代理经济”,让代理能够从其工具中获得收入,并用这些收入雇佣其他代理,创造一个真正自主的群体。
技术栈:
TypeScript/Node.js,
Viem/Permissionless.js用于智能账户抽象,
MCP SDK用于代理间通信,
Base L2用于低成本交易。
我非常希望能听到你对架构的反馈,特别是关于将会话密钥委托给由大型语言模型驱动的代理的安全性影响。
GitHub: [https://github.com/swimmingkiim/a2a-project](https://github.com/swimmingkiim/a2a-project)
查看原文
I’ve been thinking about the "last mile" problem for AI agents. We have agents that can code, plan, and browse, but they are still economically "trapped." They can't independently pay for their own API calls, compute, or data without a human-in-the-loop providing a credit card.<p>To solve this, I’m building the A2A (Agent-to-Agent) System, an open-source infrastructure designed to turn agents into independent economic actors.<p>What’s under the hood?
Identity (a2trust): DID-based verifiable identity using @veramo/core. It allows agents to establish persistent reputations (EigenTrust) so they can trust each other without centralized gatekeepers.<p>Payments (a2pay): Built on ERC-7579 Smart Accounts. Agents can use Session Keys to execute transactions autonomously within specific constraints (time-limited, amount-capped, gas-abstracted).<p>Protocol (a2api): A marketplace layer that utilizes MCP (Model Context Protocol). Agents can discover services via machine-readable docs (llms.txt) and negotiate fees via standard interfaces.<p>Why this matters:
Most current agent payment solutions are just wrappers around human wallets. A2A aims to build a native "Agent Economy" where an agent can earn revenue from its tools and spend it to hire other agents, creating a truly autonomous swarm.<p>The Tech Stack:
TypeScript/Node.js,
Viem / Permissionless.js for smart account abstraction,
MCP SDK for inter-agent communication,
Base L2 for low-cost transactions,<p>I’d love to get your feedback on the architecture, especially on the security implications of delegating session keys to LLM-driven agents.<p>GitHub: <a href="https://github.com/swimmingkiim/a2a-project" rel="nofollow">https://github.com/swimmingkiim/a2a-project</a>