跳轉到內容

Workspace 下的 Agent

獲取指定 Workspace 下的 Agent 列表。返回的 uid發起對話 接口路徑中的 Agent 標識;只有 is_publishedtrue 的 Agent 才能發起對話。

Request

HTTP MethodGET
HTTP URL/v1/ai/workspaces/:id/agents

Path Parameters

NameTypeRequiredDescription
idstringYESWorkspace ID

Query Parameters

NameTypeRequiredDescription
pageint32NO頁碼,從 1 開始,默認 1
limitint32NO每頁數量,默認 20
namestringNO按 Agent 名稱模糊搜索

Request Example

Response

Response Headers

  • Content-Type: application/json

Response Example

json
{
  "code": 0,
  "message": "success",
  "data": {
    "agents": [
      {
        "uid": "ag_7d3f9b2c",
        "name": "美股分析助手",
        "description": "結合行情與基本面數據,回答美股相關問題",
        "mode": "chat",
        "icon": "https://cdn.longbridge.com/icons/agent.png",
        "is_published": true,
        "published_at": 1742000000,
        "created_at": 1741000000,
        "updated_at": 1742001000
      }
    ],
    "total": 12
  }
}

Response Status

StatusDescriptionSchema
200返回成功agents_response
400參數非法Workspace 不存在或無權訪問
500內部錯誤None

Schemas

agents_response

NameTypeRequiredDescription
agentsobject[]trueAgent 列表
∟ uidstringtrueAgent UID,用於 發起對話 的路徑參數
∟ namestringtrueAgent 名稱
∟ descriptionstringfalseAgent 描述
∟ modestringtrueAgent 模式,如 chat
∟ iconstringfalse圖標 URL
∟ is_publishedbooleantrue是否已發佈,僅已發佈的 Agent 可發起對話
∟ published_atint64false發佈時間,Unix 時間戳(秒),未發佈為 0
∟ created_atint64false創建時間,Unix 時間戳(秒)
∟ updated_atint64false最後更新時間,Unix 時間戳(秒)
totalint32true符合條件的 Agent 總數