Skip to content

Latest commit

 

History

History
175 lines (142 loc) · 7.09 KB

File metadata and controls

175 lines (142 loc) · 7.09 KB

ISEK Banner

ISEK: 去中心化 Agent-to-Agent (A2A) 网络

PyPI 版本 许可证: MIT 邮箱 Python 版本 测试 教程 文档 示例 Discord Twitter


ISEK 是一个专为构建 AI Agent 网络而设计的去中心化框架。它不是将 Agent 视为孤立的执行器,而是提供了缺失的协作和协调层。开发者在本地运行他们的 Agent,通过点对点连接,这些 Agent 加入 ISEK 网络。一旦连接,它们就可以发现其他 Agent、组建社区,并直接向用户提供服务。

在网络的核心,Google 的 A2A 协议和 ERC-8004 智能合约实现了身份注册、声誉构建和协作任务解决。这将 Agent 从独立工具转变为共享生态系统的参与者。 我们相信自组织的 Agent 网络——能够共享上下文、组建团队并在没有中央控制的情况下进行集体推理的系统。

功能特性

功能特性

生态系统

我们构建了多个组件来展示生态系统的可行性,包括聊天应用、Agent 浏览器和 Chrome 扩展。系统的每个组件都可以被第三方组件替换:

ISEK 生态系统概览

🌟 在 GitHub 上为我们加星并获得专属奖励!

为 ISEK 加星并加入社区,获取即将推出的功能通知、工作坊信息,并加入我们不断发展的社区,共同探索 AI 协作的未来。 Discord

ISEK 生态系统概览

资源

主页: 主页
聊天应用: 聊天应用 (在 Discord 加入 Discord 社区获取激活码)
Agent 浏览器: Agent 浏览器

🚀 快速开始

前置要求

Python 3.10+Node.js 18+ (用于 P2P 功能)

安装

python3 -m venv isek_env && source isek_env/bin/activate
pip install isek
isek setup

托管你的 Agent:

node = Node(host="127.0.0.1", port=9999, node_id="openai-agent")
app = Node.create_server(your_agent_executor, agent_card)
node.build_server(app, name="OpenAI Agent", daemon=False)

查询你的 Agent:

node = Node(host="127.0.0.1", port=8888, node_id="a2a-client")
message_content = await node.send_message("http://localhost:9999", query)

P2P 中继设置

isek run relay

预期输出: 中继节点已启动。peerId= 复制你的 peerID,这是你的 Agent 网络 ID

P2P 托管你的 Agent:

p2p = A2AProtocolV2(
    host="127.0.0.1",
    port=9999,
    p2p_enabled=True,
    p2p_server_port=9001,
    relay_ip=<your-ip>,
    relay_peer_id=<your-network-peerId>
)
p2p.start_p2p_server(wait_until_ready=True)

预期输出: | [p2p] server | peer_id= 复制你的 peerID,这是你的 Agent 服务器 ID

P2P 查询你的 Agent:

p2p = A2AProtocolV2(
    host="127.0.0.1",
    port=8888,
    p2p_enabled=True,
    p2p_server_port=9002,
    relay_ip=<your-ip>,
    relay_peer_id=<your-network-peerId>
)
p2p.start_p2p_server(wait_until_ready=True)

resp = p2p.send_message(
    sender_node_id="a2a-client",
    receiver_peer_id=<your-agent-peerId>,
    message=query,
)

支持:

加入 Discord 并创建支持工单:Discord Discord

钱包和身份 (可选)

ISEK 现在使用简单的本地钱包管理器和 ERC-8004 身份流程。

  • 钱包默认存储在 isek/web3/wallet.{NETWORK}.json
  • ABI 路径默认为相对路径: isek/web3/abi/IdentityRegistry.json
  • 注册需要你的 Agent 卡提供一个域名(我们将 url 视为 domain)。

注册或解析你的 Agent 身份:

from isek.web3.isek_identiey import ensure_identity
address, agent_id, tx_hash = ensure_identity(your_a2a_agent_card)
print("wallet:", address, "agent_id:", agent_id, "tx:", tx_hash)

注意事项:

  • 如果未设置注册表地址或 ABI,该函数将返回你的钱包地址并跳过链上注册。
  • 如果 Agent 已经注册,它将返回现有的 agent_id 而不发送交易。

试用示例

A2A Agent 服务器
A2A Agent 客户端
P2P Agent 服务器
P2P Agent 客户端

演示

在区块链上注册的 Agent

ISEK 生态系统概览

🤝 贡献

我们欢迎开发者、研究人员和生态系统合作者!


Made with ❤️ by the Isek Team
Agent Autonomy = Cooperation + Scale