> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 绑定资产 - POST /v1/workspaces/:workspace_id/agents/:agent_id/bindings

> 通过 POST /v1/workspaces/:workspace_id/agents/:agent_id/bindings 把一个资产绑定到智能体编队。最小角色 contributor。

把一个资产（知识库 / 记忆立方 / Wiki / 技能 / 对话记忆 / 代码图谱）绑定到智能体编队，并指定优先级与使用模式。

## 接口

```http theme={null}
POST /v1/workspaces/:workspace_id/agents/:agent_id/bindings
```

## 认证

`Authorization: Bearer <jwt>` 或 `X-API-Key <sk_...>`。最小角色：**contributor**。

## 路径参数

<ParamField path="workspace_id" type="string" required>
  工作空间 id。
</ParamField>

<ParamField path="agent_id" type="string" required>
  智能体 id。
</ParamField>

## 请求体

<ParamField body="asset_type" type="string" required>
  资产类型：`kb` / `cube` / `wiki` / `skill` / `chat_memory` / `codegraph`。
</ParamField>

<ParamField body="asset_id" type="string" required>
  资产 id。
</ParamField>

<ParamField body="priority" type="integer">
  优先级（数值越大越优先）。
</ParamField>

<ParamField body="usage_mode" type="string">
  使用模式：`bootstrap`（启动时装载）/ `on_demand`（按需调用）。
</ParamField>

## 响应

<ResponseField name="id" type="string">
  绑定 id（`bind_...`）。
</ResponseField>

<ResponseField name="agent_id" type="string">
  所属智能体 id。
</ResponseField>

<ResponseField name="asset_type" type="string">
  资产类型。
</ResponseField>

<ResponseField name="asset_id" type="string">
  资产 id。
</ResponseField>

<ResponseField name="priority" type="integer">
  优先级。
</ResponseField>

<ResponseField name="usage_mode" type="string">
  使用模式。
</ResponseField>

<ResponseField name="created_at" type="string">
  创建时间（RFC3339）。
</ResponseField>

## 示例

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://memo.ariacompute.cn/v1/workspaces/ws_01a2b3c4d5e6/agents/agent_01a2b3c4d5e6/bindings \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{"asset_type":"kb","asset_id":"kb_01a2b3c4d5e6","priority":10,"usage_mode":"bootstrap"}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "bind_01a2b3c4d5e6",
    "agent_id": "agent_01a2b3c4d5e6",
    "asset_type": "kb",
    "asset_id": "kb_01a2b3c4d5e6",
    "priority": 10,
    "usage_mode": "bootstrap",
    "created_at": "2026-10-12T12:05:00Z"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.