1

Start from a new or existing agent

Use the Workbench at app.xpander.ai to set up your agent’s framework (runtime environment), instructions, model, tools, and knowledge bases through the intuitive web interface.You can also start from a template.
You can also start from the CLI and skip the UI, by running xpander agent new and following the wizard. Install the xpander CLI by running npm install -g xpander-cli
Agent Workbench

The Agent Workbench is used to control and test the agent backend

2

Download and customize your agent code

The init command is used to download the entire agent code to your local machine, pre-scaffolded with the desired framework (runtime environment - i.e. Agno), as well as the configuration of the agent.
You can use the agent ID, agent name, or run without specifying an agent to get an interactive selection list.
# Install the xpander CLI
npm install -g xpander-cli

# Initialize your agent project (choose one):
xpander agent init                    # Option 1: Interactive selection list
# OR
xpander agent init "my-agent"         # Option 2: Use agent name
# OR  
xpander agent init "abc123"           # Option 3: Use agent ID
# OR
x a i                                 # Option 4: Shortcut with selection list
3

Add your business logic

By editing your agent’s code, you can add your own business logic, workflows and functions, or external API calls - giving you full control over how your agent behaves.
The @on_task decorator registers your function as an event handler that processes incoming tasks from Slack, WebUI, or webhooks.The @register_tool decorator makes your custom functions available to the AI agent, allowing it to call your business logic when needed.Read more about these decorators in the [Events](/API reference/events/index) and [Tools](/API reference/tools/index) sections of the API Reference.
Agent Code
from xpander_sdk import Backend, on_task, Task, register_tool
from agno.agent import Agent

@register_tool  # Register local tools
def weather_check(location: str) -> str:
    """Check weather for a location"""
    return f"Weather in {location}: Sunny, 25°C"

@on_task
def handle_request(task: Task):
    backend = Backend(task.configuration)
    agent = Agent(**backend.get_args())  # Gets remote tools + your local tools
    
    result = agent.arun(message=task.to_message())
    task.result = result.content
    return task
4

Test locally

Test your agent in real-time by running it locally. The development server connects to your xpander backend and routes all incoming requests (Slack, WebUI, webhooks) to your local machine for instant feedback and debugging.
Local Development
# Start local development server
xpander dev

# Or run with debug logging
xpander dev --debug
Development Output
DEBUG    | Events initialised 
INFO     | Listener started; waiting for events…
INFO     | Agent 'Support AI Engineer' chat: https://amaranth-mammal.agents.xpander.ai | builder: https://app.xpander.ai/agents/4b4cf37c-53ae-4280-8b96-844ed13bea6c
5

Deploy to your environment

Deployment
# Deploy the agent to the xpander cloud
xpander deploy
Your agent is now live with automatic scaling, monitoring, and all human interfaces (Slack, WebUI, webhooks) configured!

CLI Command Reference

The xpander.ai CLI supports both full commands and shortcuts for faster usage:

🎛️ Control Plane Commands

Manage agents in xpander.ai’s cloud platform:
xpander login               # Authenticate with xpander.ai (opens browser)
x l                         # ↑ shortcut

xpander agent new           # Create new agent interactively  
x a n                       # ↑ shortcut
x a n --name "bot" --folder "." --framework "agno"  # Non-interactive

xpander agent edit [agent]  # Edit agent configuration (browser)
x a e [agent]               # ↑ shortcut

xpander agent delete [agent] # Delete agent permanently
x a del [agent]             # ↑ shortcut

xpander agent invoke [agent] "message" # Test agent via webhook
x a invoke [agent] "message" # ↑ shortcut

🏗️ Local Development Commands

Download framework templates and test locally:
xpander agent init [agent]  # Download agent files to current folder
x a i [agent]               # ↑ shortcut

xpander agent dev [agent]   # Run agent locally for testing
x a dev [agent]             # ↑ shortcut

☁️ Cloud Deployment Commands

Deploy containers and monitor in the cloud:
xpander agent deploy [agent] # Deploy agent as Docker container
x a d [agent]               # ↑ shortcut

xpander agent logs [agent]  # Stream real-time logs from cloud
x a l [agent]               # ↑ shortcut

xpander agent restart [agent] # Restart deployed container
x a restart [agent]         # ↑ shortcut

xpander agent stop [agent]  # Stop running container
x a stop [agent]            # ↑ shortcut
Commands with [agent] show a selection list if no agent is specified. Agent lists are sorted by creation date (newest first).
For complete CLI documentation including advanced workflows, CI/CD integration, and all command options, see the [Full CLI Reference](/API reference/cli-reference).

Next Steps