Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.xpander.ai/llms.txt

Use this file to discover all available pages before exploring further.

Agents.alist returns a list of summary objects (AgentsListItem) for every agent visible to the configured organization. Each item carries enough metadata for display (id, name, icon, status, instructions, access scope) and a .aload() shortcut to fetch the full Agent.
from xpander_sdk import Agents

agents = Agents()
items = await agents.alist()

for item in items:
    print(f"{item.id}\t{item.status.value}\t{item.name}")

Parameters

None.

Returns list[AgentsListItem]

AgentsListItem is a lightweight summary: not the full Agent. Notable fields:
FieldTypeDescription
idstrAgent ID.
namestrDisplay name.
iconstrEmoji or icon identifier.
instructionsAgentInstructionsrole, goal, general text.
statusAgentStatusDRAFT, ACTIVE, or INACTIVE.
organization_idstrOwning organization.
created_atdatetimeCreation timestamp.
descriptionstr | NoneAgent description.
access_scopeAgentAccessScopePersonal or Organizational.
created_bystr | NoneCreator user id.
typeAgentType | NoneManager, Regular, A2A, Curl, or Orchestration.
To load the full agent (graph, tools, model config, …) call .aload() on the item, or pass item.id to agents.aget().

Examples

Filter active agents

items = await agents.alist()
active = [i for i in items if i.status.value == "ACTIVE"]

Load all in parallel

import asyncio

items = await agents.alist()
full = await asyncio.gather(*(item.aload() for item in items))
For a large org this can be heavy: prefer loading only the agents you’ll actually use.

Sync version

items = agents.list()
Same return type; blocks until the list is fetched.

Errors

alist raises ModuleException on failure:
StatusCause
401Missing or invalid api_key.
403Wrong organization_id.
500Server error or network failure.