<!-- 来源: https://hostanagent.com/docs/integration/overview/ | 协议: 1.0 | 更新: 2026-09-30 -->

# 选择接入方式

先在控制台发布 Agent，并为产品后端创建限制到该 Agent 的 Key。平台模型凭证留在 HostAnAgent；产品管理自己的登录、业务权限、工具和页面。[先读产品身份](/docs/integration/backend-auth/)。

| 入口 | 适合什么 | 包与运行位置 |
|---|---|---|
| Python SDK | Python 服务端发起、观察和恢复 Run | `hostanagent-client==0.2.5`；Python 3.10+ |
| Client Core | 浏览器或 Node 的无界面状态客户端 | `@hostanagent/client-core@0.2.5`；Node 22.12+ 或现代浏览器 |
| 聊天组件 | 将标准聊天界面放入已有页面 | `@hostanagent/chat-widget@0.2.5`；经产品自己的后端代理 |
| ToolRunner | 显式处理产品业务工具 | `@hostanagent/tool-runner@0.2.5`；需产品授权与可靠回执 |

```bash
python -m pip install hostanagent-client==0.2.5
npm install --save-exact @hostanagent/client-core@0.2.5 @hostanagent/chat-widget@0.2.5 @hostanagent/tool-runner@0.2.5
```

只安装需要的包即可。浏览器对接自己的 `/api/agent` 产品代理；代理再携带服务端 Key 访问 `https://api.hostanagent.com/v1`。MCP 地址 `https://api.hostanagent.com/mcp` 用来管理配置，不作为 Widget endpoint。[Python](/docs/integration/python/)、[JS](/docs/integration/javascript/)、[Widget](/docs/integration/widget/)、[MCP](/docs/mcp/quickstart/)。

三种 JS 包应按同一版本成组升级。独立浏览器脚本可用固定版本 URL 和 SRI；更换版本需重新核对脚本和产品代理。MIT 许可只覆盖客户端代码与随包示例，托管服务和模型额度分别提供。[版本兼容](/docs/releases/compatibility/)。
