Metadata-Version: 2.4
Name: computenest-agent-integrations
Version: 0.1.1
Summary: 计算巢Agent部署集成库，基于 Google ADK 架构对接云上 Agent 能力
Author-email: Bali <zhaoyu.zhaoyu@alibaba-inc.com>, Yunyao <ziqiao.lzq@alibaba-inc.com>, Zhongsi <zhongsi.lz@alibaba-inc.com>
Project-URL: Homepage, https://computenest.console.aliyun.com/agent/market/cn-hangzhou/overview
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: alibabacloud-bailian20231229>=1.0.0
Requires-Dist: google-adk>=2.0.0
Requires-Dist: mcp<2.0.0,>=1.24.0
Requires-Dist: typing-extensions>=4.12.0
Provides-Extra: app
Requires-Dist: circus==0.19.0; extra == "app"
Requires-Dist: uvicorn[standard]==0.34.3; extra == "app"
Requires-Dist: python-dotenv==1.0.1; extra == "app"
Requires-Dist: fastapi==0.115.13; extra == "app"
Requires-Dist: sse-starlette==2.1.3; extra == "app"
Requires-Dist: pydantic-settings<3.0.0,>=2.2.1; extra == "app"

# computenest-agent-integrations

面向 [计算巢Agent部署](https://computenest.console.aliyun.com/agent/market/cn-hangzhou/overview) 的集成库。以 [Google ADK](https://google.github.io/adk-docs/)（Agent Development Kit）为底层 Agent 架构，将部署所需的能力与 ADK 标准接口对接，帮助开发者在 ADK 生态中构建、集成并部署 Agent 服务。

凭证由调用方在运行时传入，库内不包含任何密钥。

## 环境要求

- Python >= 3.12

## 安装

```bash
pip install computenest-agent-integrations
```

## 架构说明

```
计算巢Agent部署          ADK Agent 架构
        │                        │
        └──── ADK 集成适配层 ────┘
```

本库在 ADK 的 Tool、Memory、MCP 等扩展点上提供与计算巢Agent部署及云上 Agent 生态的对接实现。开发者使用标准 ADK API 编写 Agent 逻辑，通过本库接入部署侧所需的外部能力。

## 当前已提供的集成

以下为实现示例，后续会持续扩展更多计算巢Agent部署与 ADK 的对接能力：

```python
from computenest.integrations.adk import (
    BailianLongTermMemoryService,
    BailianRagTool,
    McpTool,
)
```

| 组件 | ADK 扩展点 | 说明 |
|------|-----------|------|
| `BailianRagTool` | Tool | 知识库检索 |
| `McpTool` | Tool (MCP) | 从 MCP JSON 配置构建 `McpToolset`（支持任意 `${VAR}` 占位符） |
| `BailianLongTermMemoryService` | Memory | 长期记忆存储与检索 |

### 接入 ADK Agent

```python
from google.adk.agents.llm_agent import Agent
from computenest.integrations.adk import BailianRagTool, McpTool

agent = Agent(
    model=...,
    name="my_agent",
    tools=[rag_tool, *McpTool(mcp_config, variables={"DASHSCOPE_API_KEY": api_key})],
    # memory_service=BailianLongTermMemoryService(...),
)
```

各组件的初始化参数见源码 docstring。

## 相关链接

- [计算巢Agent部署](https://computenest.console.aliyun.com/agent/market/cn-hangzhou/overview)
- [Google ADK 文档](https://google.github.io/adk-docs/)
