computenest-agent-integrations
基于 Google ADK 的 Agent 能力集成库。
环境要求
- Python 3.12 或更高版本
安装
pip install computenest-agent-integrations
按需安装可选依赖:
# RAGFlow 知识库检索
pip install "computenest-agent-integrations[ragflow]"
# E2B 沙箱与代码解释器
pip install "computenest-agent-integrations[e2b]"
# AgentRun 沙箱
pip install "computenest-agent-integrations[agentrun]"
当前公共 API
以下组件由 computenest.integrations.adk 直接导出:
| 类别 | API | 说明 |
|---|---|---|
| Memory | BailianLongTermMemoryService |
百炼长期记忆的 ADK BaseMemoryService 实现 |
| Memory | Mem0SelfHostingMemoryService |
Self-host Mem0 REST 服务的 ADK BaseMemoryService 实现 |
| Knowledge Base | BailianKnowledgeBaseTool |
百炼知识库检索工具 |
| Knowledge Base | RagflowKnowledgeBaseTool |
RAGFlow Dataset 知识库检索工具 |
| Knowledge Base | KnowledgeProvider |
知识库 Provider 枚举 |
| MCP | McpTool |
将 MCP JSON 配置转换为 ADK McpToolset |
| A2A | load_remote_a2a_agents |
从 A2A_CONNECTIONS 批量创建带认证的 ADK RemoteA2aAgent |
| A2A | create_a2a_client_factory |
创建按 Agent Card 安全声明注入凭证的 A2A ClientFactory |
| A2A | A2AClientCleanupPlugin |
在 ADK App 关闭时回收 A2A HTTP Client |
| Sandbox | E2bSandboxToolset |
E2B 文件系统与 Shell 工具集 |
| Sandbox | E2bCodeInterpreterToolset |
E2B Python/JavaScript 代码执行工具集 |
| Plugin | ImageUrlInlinePlugin |
将用户消息中的 HTTP(S) 图片转换为内联图片数据 |
from computenest.integrations.adk import (
A2AClientCleanupPlugin,
BailianKnowledgeBaseTool,
BailianLongTermMemoryService,
E2bCodeInterpreterToolset,
E2bSandboxToolset,
ImageUrlInlinePlugin,
KnowledgeProvider,
load_remote_a2a_agents,
McpTool,
Mem0SelfHostingMemoryService,
RagflowKnowledgeBaseTool,
)
计算巢会将绑定的多个 Agent Connection 以 JSON 或 Base64 JSON 注入
A2A_CONNECTIONS。Sample 只需将公共工厂的返回值交给 ADK:
from computenest.integrations.adk import A2AClientCleanupPlugin
from computenest.integrations.adk import load_remote_a2a_agents
from google.adk.agents import Agent
from google.adk.apps import App
root_agent = Agent(
name="root",
model="gemini-2.5-flash",
sub_agents=load_remote_a2a_agents(),
)
app = App(
name="root",
root_agent=root_agent,
plugins=[A2AClientCleanupPlugin()],
)
每条连接使用 A2A_AGENT_CARD_URL 发现远程 Agent;存在
A2A_AUTH_TOKEN 时,客户端依据 Agent Card 的 securitySchemes 和
securityRequirements 在实际调用中注入认证信息。
工厂启用 ADK 新版 A2A 集成,并沿用 RemoteA2aAgent 默认的会话事件与
contextId 管理,不重写 A2A 请求内容。
各组件的初始化参数和行为以源码及测试用例为准。
相关链接
Metadata
Release files for computenest-agent-integrations 0.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| computenest_agent_integrations-0.1.12.tar.gz | 40.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| computenest_agent_integrations-0.1.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 91.0 kB
Release files / computenest_agent_integrations-0.1.12.tar.gz
| Download URL | computenest_agent_integrations-0.1.12.tar.gz |
|---|---|
| Size | 40.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e9c3a0273231bd5f46ec17be0de0150ceaede806cc7bd97884d8aa13d42d57c
|
|
BLAKE2b-256 checksum How to use checksums |
2d549c1d18d24b10c75bdaba7ae499d0b1e88e9f7311faf2a992051166588180
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / computenest_agent_integrations-0.1.12-py3-none-any.whl
| Download URL | computenest_agent_integrations-0.1.12-py3-none-any.whl |
|---|---|
| Size | 51.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cf2c0aadeb13b7fa892e19dbfcdf1967e14f27658aa48fafa7190c912a67d23
|
|
BLAKE2b-256 checksum How to use checksums |
a4a649b95fbe3f8380ec31c83bbf641d822cbb6857fd0b911798eb82193fdc0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|