AI Agent

Agents in Workspace

GEThttps://openapi.longbridge.com/v1/ai/workspaces/{workspace_id}/agents

Authorization

Signed mode: every request is signed with your App Key/Secret. Header set:

NameTypeRequiredDescription
Authorizationstring · headerRequiredThe account Access Token from the OpenAPI dashboard — passed as the raw token (no Bearer prefix) and included in the signature calculation.
X-Api-Keystring · headerRequiredYour App Key.
X-Timestampstring · headerRequiredRequest timestamp in seconds (Unix epoch).
X-Api-Signaturestring · headerRequiredHMAC-SHA256 signature. Format: HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=.

List the Agents in the specified Workspace. The returned uid is the Agent identifier used in the Start Conversation endpoint path; only Agents with is_published set to true can start conversations.

Request

Path parameters

NameTypeRequiredDescription
workspace_idstringRequiredWorkspace ID

Query parameters

NameTypeRequiredDescription
pageintegerOptionalPage number, starts at 1, default 1
limitintegerOptionalPage size, default 20

Response

Response properties

NameTypeRequiredDescription
agentsobject[]RequiredAgent list
└ uidstringRequiredAgent UID, used as the path parameter of [Start Conversation](/docs/ai/chat/conversation)
└ namestringRequiredAgent name
└ descriptionstringOptionalAgent description
└ modestringRequiredAgent mode, e.g. `chat`
└ iconstringOptionalIcon URL
└ is_publishedbooleanRequiredWhether published; only published Agents can start conversations
└ published_atint64OptionalPublish time, Unix timestamp in seconds; 0 if unpublished
└ created_atint64OptionalCreation time, Unix timestamp in seconds
└ updated_atint64OptionalLast updated time, Unix timestamp in seconds
totalint32RequiredTotal number of matching Agents

Response JSON example

{
  "code": 0,
  "message": "success",
  "data": {
    "agents": [
      {
        "uid": "ag_7d3f9b2c",
        "name": "US Stock Analyst",
        "description": "Answers US stock questions with market and fundamental data",
        "mode": "chat",
        "icon": "https://cdn.longbridge.com/icons/agent.png",
        "is_published": true,
        "published_at": 1742000000,
        "created_at": 1741000000,
        "updated_at": 1742001000
      }
    ],
    "total": 12
  }
}

Error code

See the Error Codes page for the full list of error codes.