跳转到内容

公开 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 总数