ISEK去中心化A2A代理网络的身份注册与P2P接入机制

ISEK是面向AI代理网络的去中心化框架,代理在本地运行并通过P2P连接加入网络,实现代理发现、社区组建与服务交付。其核心结合Google A2A协议与ERC-8004智能合约完成身份注册、声誉构建与协作任务求解,并提供可替换的聊天应用、代理浏览器等组件。

![ISEK 横幅](<https://raw.githubusercontent.com/isekOS/ISEK/HEAD/assets/banner.png>) ## ISEK:分散代理对代理(A2A) 网络 [![PyPI 版本](<https://img.shields.io/pypi/v/isek>)](<https://pypi.org/project/isek/>) [![许可证: MIT](<https://img.shields.io/badge/license-MIT-blue.svg>)](<https://github.com/isekOS/ISEK/blob/HEAD/LICENSE>) ![电子邮件](<https://img.shields.io/badge/contact-team@isek.xyz-blue>) [![Python 版本](<https://img.shields.io/badge/python-3.10%2B-blue.svg>)](<https://www.python.org/downloads/>) [![测试](<https://github.com/openagents-org/openagents/actions/workflows/pytest.yml/badge.svg?branch=develop>)](<https://github.com/openagents-org/openagents/actions/workflows/pytest.yml>) [![教学](<https://img.shields.io/badge/📖_tutorial-get%20started-green.svg>)](<https://github.com/isekOS/ISEK/blob/HEAD/README.md#-try-it-in-60-seconds>) [![文档](<https://img.shields.io/badge/📚_docs-openagents.org-blue.svg>)](<https://openagents.org/>) [![实例](<https://img.shields.io/badge/🚀_examples-ready--to--run-orange.svg>)](<https://github.com/isekOS/ISEK/blob/HEAD/README.md#-try-it-in-60-seconds>) [![调色板](<https://img.shields.io/badge/Discord-Join%20Community-5865f2?logo=discord&logoColor=white>)](<https://discord.gg/bZNgVQRm5S>) [![推特( 推特)](<https://img.shields.io/badge/Twitter-Follow%20Updates-1da1f2?logo=x&logoColor=white>)](<https://x.com/ISEK_Official>) #### [联合国](<https://github.com/isekOS/ISEK/blob/HEAD/README.md>) | [中文](<https://github.com/isekOS/ISEK/blob/HEAD/README_CN.md>) --- **ISEK** 是一个分权框架,旨在建设 **AI代理网络**。它不是将代理作为孤立的执行者,而是提供缺失的协作和协调层。开发者在当地运行代理,并通过peer-to-peer连接,这些代理加入ISEK网络。一旦连接,他们可以发现其他代理,组成社区,直接向用户提供服务。 在网络的核心,Google的A2A协议和ERC-8004智能合同可以实现身份登记、名声建设和合作任务解决。 这把代理商从独立工具转变为共享生态系统的参与者。 我们相信自我组织代理网络——可以共享上下文,组成团队,在没有中央控制的情况下集体理性的系统. ## 特性 ![特性](<https://raw.githubusercontent.com/isekOS/ISEK/HEAD/assets/feature.png>) ## 生态系统 我们构建多个组件,以展示生态系统在cluding challapp.代理探险器和铬扩展中的可行性. 系统的每个组件都可以被第三方组件取代: ![ISEK ecosystem_overview](<https://raw.githubusercontent.com/isekOS/ISEK/HEAD/assets/ecosystem_overview.png>) ## "星光我们"在GitHub 获得独家奖赏! Star ISEK并加入社区,了解即将到来的特征,工作坊,并加入我们不断壮大的社区探索AI合作的未来. [![调色板](<https://img.shields.io/badge/Discord-Join%20Community-5865f2?logo=discord&logoColor=white>)](<https://discord.gg/bZNgVQRm5S>) ![ISEK ecosystem_overview](<https://raw.githubusercontent.com/isekOS/ISEK/HEAD/assets/star_gif.gif>) ## 资源 主页 : [主页](https://www.isek.xyz/)\ 聊天应用程序 : [聊天应用程序](https://chatbot.isek.xyz/) (联合不和社区) [调色板](https://C.gg/PRzG3MSP) 获取激活代码)\ 代理浏览器 : [代理探险家](https://isek-explorer.vercel.app/) ## QQ 快速启动 ### 先决条件 **Python 3.10 + (英语).** 财务报告和财务报告 **节点.js 18 +** (用于P2P功能). ### 安装 ```bash python3 -m venv isek_env && source isek_env/bin/activate pip install isek isek setup ``` ### 托管您的代理 : ```python 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) ``` ### 查询您的代理 : ```python node = Node(host="127.0.0.1", port=8888, node_id="a2a-client") message_content = await node.send_message("http://localhost:9999", query) ``` ### P2P 中继设置 ```bash isek run relay ``` 预期产出: 中继端开始. peerId QQ your-network-peerId > 复制您的 peerID, 这是您的代理网络 ID ### P2P 托管您的代理 : ```python 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] 服务器 | peer_id=<your-agent-peerId> 收到 peerID 这是你的代理服务器 ID ### P2P 查询你的代理人: ```python 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, ) ``` ## 支助: 加入不和并创建支持票 :[调色板](https://C.gg/PRzG3MSP) [![调色板](<https://img.shields.io/badge/Discord-Join%20Community-5865f2?logo=discord&logoColor=white>)](<https://discord.gg/bZNgVQRm5S>) ### 钱包身份( 可选) (D) ISEK现在使用简单的本地钱包管理器和ERC-8004身份流. - 钱包存储在 `isek/web3/wallet.{NETWORK}.json` 默认。 - ABI 路径默认为相对 : `isek/web3/abi/IdentityRegistry.json`. - 注册要求您的代理卡提供域名( 我们处理 ) `url` 作为 `domain`). ### 登记或确定您的代理人身份: ```python 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_id` 不发送交易。 ### 尝试示例 [A2A 代理服务器](https://github.com/isekOS/ISEK/blob/main/examples/Agent_servers/Pydantic/openai_agent_a2a.py)\ [A2A 代理客户端](https://github.com/isekOS/ISEK/blob/main/examples/Agent_client/a2a_client.py)\ [P2P 代理服务器](https://github.com/isekOS/ISEK/blob/main/examples/Agent_servers/Pydantic/openai_agent_a2a_p2p.py)\ [P2P 代理客户端](https://github.com/isekOS/ISEK/blob/main/examples/Agent_client/a2a_client_p2p.py) ## 演示 ### 区块链上的注册代理 ![ISEK ecosystem_overview](<https://raw.githubusercontent.com/isekOS/ISEK/HEAD/assets/blockchain.png>) ## * 捐款 我们欢迎合作者、研究人员和生态系统合作者! * 加入 Discord 以获取最新更新 : [调色板](https://C.gg/PRzG3MSP) * 💬 通过以下方式提出未解决的问题或建议 [GitHub 问题](https://github.com/your-repo/issues) * 直接联系我们: [团队@isek.xyz](mailto:team@isek.xyz) * 联系人 : [wmswms938@gmail.com (英语).](mailto:wmswms938@gmail.com) * 看我们 [贡献准则](<https://github.com/isekOS/ISEK/blob/HEAD/CONTRIBUTING.md>) --- 由 \ 由 \ 由 \ \ 由 : **伊塞克小组** *代理自主 = 合作+规模*

查看原始来源