Skip to Content

Agents in Workspace

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

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

Path Parameters

NameTypeRequiredDescription
idstringYESWorkspace ID

Query Parameters

NameTypeRequiredDescription
pageint32NOPage number, starts at 1, default 1
limitint32NOPage size, default 20
namestringNOFuzzy search by Agent name

Request Example

Response

Response Headers

  • Content-Type: application/json

Response Example

json
{
  "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
  }
}

Response Status

StatusDescriptionSchema
200Successagents_response
400Invalid parametersWorkspace not found or not accessible
500Internal errorNone

Schemas

agents_response

NameTypeRequiredDescription
agentsobject[]trueAgent list
∟ uidstringtrueAgent UID, used as the path parameter of Start Conversation
∟ namestringtrueAgent name
∟ descriptionstringfalseAgent description
∟ modestringtrueAgent mode, e.g. chat
∟ iconstringfalseIcon URL
∟ is_publishedbooleantrueWhether published; only published Agents can start conversations
∟ published_atint64falsePublish time, Unix timestamp in seconds; 0 if unpublished
∟ created_atint64falseCreation time, Unix timestamp in seconds
∟ updated_atint64falseLast updated time, Unix timestamp in seconds
totalint32trueTotal number of matching Agents