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.
Get your Agent ID from the Workbench URL or from the Task sources tab in the Workbench.
# Install the xpander CLI
npm install -g xpander-cli

# Initialize your agent project
xpander agent init "your-agent-id"
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 and Tools 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!

Next Steps