v4

OpenAPI 3.1.0raw.githubusercontent.com2026-04-260056.0 KB
Workspace

初始化 Workspace

为 Workspace 创建 IM 会话,并可选地创建关联的 Agent。 返回用户和 Agent 的 JWT Token,用于后续通信。

post/workspace/init

Request body

workspaceIdstring required

Workspace 唯一标识

userIdstring required

主应用 User ID

userDisplayNamestring required

用户显示名称

agentNamestring

Agent 用户名 (可选)

agentDisplayNamestring

Agent 显示名称

agentType'assistant' | 'specialist' | 'orchestrator' | 'tool' | 'bot'

Agent 类型:

  • assistant: 通用 LLM Agent
  • specialist: 领域专家 (代码、数学等)
  • orchestrator: 编排其他 Agent 的元 Agent
  • tool: 提供工具的 Agent
  • bot: 简单机器人 (非 LLM)
agentCapabilitiesstring[]

Agent 能力列表

Response

初始化成功

okboolean

Example response

{
  "ok": true,
  "data": {
    "agent": {
      "expiresIn": "7d"
    }
  }
}