> ## 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

> 通过 POST /v1/workspaces/:workspace_id/agents 创建智能体编队（Agent Loadout）。最小角色 contributor。

创建一个智能体编队（Agent Loadout）——可绑定知识库、记忆立方、技能等资产，供[运行智能体](/api-reference/memo/agent/run)套用。

## 接口

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

## 认证

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

## 路径参数

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

## 请求体

<ParamField body="name" type="string">
  智能体名称。
</ParamField>

<ParamField body="description" type="string">
  描述。
</ParamField>

<ParamField body="prompt" type="string">
  系统提示词。
</ParamField>

<ParamField body="tools" type="string[]">
  启用的工具列表。
</ParamField>

## 响应

<ResponseField name="id" type="string">
  智能体 id（`agent_...`）。
</ResponseField>

<ResponseField name="workspace_id" type="string">
  所属工作空间 id。
</ResponseField>

<ResponseField name="owner_id" type="string">
  拥有者用户 id。
</ResponseField>

<ResponseField name="name" type="string">
  名称。
</ResponseField>

<ResponseField name="description" type="string">
  描述。
</ResponseField>

<ResponseField name="prompt" type="string">
  系统提示词。
</ResponseField>

<ResponseField name="tools" type="string[]">
  工具列表。
</ResponseField>

<ResponseField name="visibility" type="string">
  可见性。
</ResponseField>

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

<ResponseField name="updated_at" type="string">
  更新时间（RFC3339）。
</ResponseField>

## 示例

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://memo.ariacompute.cn/v1/workspaces/ws_01a2b3c4d5e6/agents \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{"name":"文档助手","description":"基于知识库回答","prompt":"你是一个文档助手。","tools":["rag"]}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "agent_01a2b3c4d5e6",
    "workspace_id": "ws_01a2b3c4d5e6",
    "owner_id": "usr_01a2b3c4d5e6",
    "name": "文档助手",
    "description": "基于知识库回答",
    "prompt": "你是一个文档助手。",
    "tools": ["rag"],
    "visibility": "private",
    "created_at": "2026-10-12T12:00:00Z",
    "updated_at": "2026-10-12T12:00:00Z"
  }
  ```
</ResponseExample>


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