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.aget loads one agent’s complete configuration: instructions, model settings, the execution graph, all attached tools, knowledge-base links, and framework settings. Use this whenever you need to actually invoke an agent or inspect its config in code.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
agent_id | str | No¹ | Configuration.agent_id → XPANDER_AGENT_ID | Agent to load. |
version | int | No | None | Specific version. Latest if omitted. |
Configuration.agent_id and then XPANDER_AGENT_ID. If none of those are set, you’ll hit a 404 from the cloud.
Returns Agent
A full Agent instance. See Agent class reference for attributes (instructions, framework, graph, deployment_type, tools, knowledge_bases, agno_settings, etc.).
Examples
Latest version
Pinned version
Use a default agent ID
@on_task handlers: you don’t usually pass an agent ID explicitly because the runtime injects it.
Sync version
What gets loaded
When you callaget, the SDK:
- Fetches the agent record (
GET /agents/:id). - Builds the
AgentGraphfrom the graph items returned in the response. - Initializes a
ToolsRepositorypopulated with the agent’s tools. - If any local tools (Python
@register_toolfunctions) need syncing to the platform’s graph, kicks off a backgroundsync_local_toolstask: non-blocking.
agent.graph to inspect the tool/connector wiring, agent.tools.list for all tools, agent.knowledge_bases for KB links, and agent.mcp_servers for the configured MCP servers.
Errors
aget raises ModuleException on failure:
| Status | Cause |
|---|---|
| 404 | Agent not found, or wrong organization. |
| 403 | Agent exists but isn’t accessible to your account. |
| 500 | Server error or network failure. |

