跳轉到內容

公開 Agent

列出平台上所有公開可用的 Agent——與探索頁展示的是同一份目錄。返回的 uid發起對話接口路徑中使用的 Agent 標識。

Workspace 下的 Agent 不同,本接口不限定 Workspace:返回所有已發佈且公開分享的 Agent。

Request

HTTP MethodGET
HTTP URL/v1/ai/agents

Query Parameters

NameTypeRequiredDescription
pageint32NO頁碼,從 1 開始,默認 1
limitint32NO每頁條數,默認 20,最大 50
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": 35
  }
}

Response Status

StatusDescriptionSchema
200返回成功public_agents_response
500內部錯誤None

Schemas

public_agents_response

NameTypeRequiredDescription
agentsobject[]trueAgent 列表,按最後更新時間倒序
∟ uidstringtrueAgent UID,用作發起對話的路徑參數
∟ namestringtrueAgent 名稱,按 Accept-Language 請求頭本地化
∟ descriptionstringfalseAgent 描述,按 Accept-Language 請求頭本地化
∟ modestringtrueAgent 模式,如 chat
∟ iconstringfalse圖標 URL
∟ is_publishedbooleantrue本接口下恆為 true
∟ published_atint64false發佈時間,Unix 秒級時間戳
∟ created_atint64false創建時間,Unix 秒級時間戳
∟ updated_atint64false最後更新時間,Unix 秒級時間戳
totalint32true符合條件的公開 Agent 總數