Skip to main content
This endpoint returns every active agent registered under the given project, along with each agent’s currently active API keys. Use it to audit which agents exist, verify key expiry dates, or build management UIs. Inactive agents and revoked keys are excluded from the response automatically.

Endpoint

GET /api/agent/v1/list/
Base URL: http://localhost:8000

Request headers

X-OTAS-USER-TOKEN
string
required
JWT obtained from the OTAS login endpoint, identifying the calling user.
X-OTAS-PROJECT-ID
string
required
UUID of the project whose agents you want to list.

Response

status
number
1 on success.
status_description
string
"agents_listed" on success.
response
object
Only agents with is_active=True are returned. Within each agent, only keys with active=True appear in agent_keys. The full API key secret is never included — use POST /api/agent/v1/create/ or POST /api/agent/v1/agents/key/create/ to obtain a new plaintext key.

Example

cURL
curl --request GET \
  --url http://localhost:8000/api/agent/v1/list/ \
  --header "X-OTAS-USER-TOKEN: <your-user-jwt>" \
  --header "X-OTAS-PROJECT-ID: 4b7e2f1a-9c3d-4e8b-a012-3f5d6e7c8b9a"
Response (200)
{
  "status": 1,
  "status_description": "agents_listed",
  "response": {
    "project_id": "4b7e2f1a-9c3d-4e8b-a012-3f5d6e7c8b9a",
    "agents": [
      {
        "id": "d1e2f3a4-b5c6-7890-abcd-ef1234567890",
        "name": "Summarizer",
        "description": "Summarizes long documents",
        "provider": "Anthropic",
        "created_at": "2026-04-16T10:00:00.000000+00:00",
        "created_by": "a1b2c3d4-e5f6-7890-abcd-ef0987654321",
        "is_active": true,
        "agent_keys": [
          {
            "id": "c9d8e7f6-a5b4-3210-fedc-ba9876543210",
            "prefix": "xYz1Ab2C",
            "name": null,
            "created_at": "2026-04-16T10:00:00.000000+00:00",
            "expires_at": "2026-05-16T10:00:00.000000+00:00",
            "active": true
          }
        ]
      }
    ]
  }
}

Build docs developers (and LLMs) love