Overview
The xpander.ai CLI is your command-line interface for building and managing AI agents. It handles three core functions:- ๐๏ธ Control Plane - Create, edit, delete agents in xpander.aiโs cloud platform
- ๐๏ธ Local Development - Download framework templates and run agents locally
- โ๏ธ Cloud Deployment - Deploy Docker containers, stream logs, manage containers
Installation
Requirements: Node.js 20+, Python 3.12+Command Structure
All commands support shortcuts for faster usage:Authentication & Profiles
๐๏ธ Control Plane - Agent Management
These commands manage agents in Xpanderโs cloud platform:- Agent lists are sorted by creation date (newest first)
- Optional
[agent]
parameters show selection list if omitted edit
opens the agent configuration in your browserdelete
requires confirmation to prevent accidental deletioninvoke
tests deployed agents via webhook with real-time responses
๐๏ธ Local Development - Framework Templates
These commands work with agent code on your local machine:init
downloads the agentโs framework files (Dockerfile, requirements.txt, xpander_handler.py, .env)dev
runs the agent locally using your local Python environment
โ๏ธ Cloud Deployment - Container Management
These commands manage deployed agent containers in Xpanderโs cloud:- Uploads your local agent code
- Builds a new Docker image
- Deploys and runs the container instantly
- Each deploy creates a NEW version
Dockerfile
- Container definitionrequirements.txt
- Python dependenciesxpander_handler.py
- Your agent logic.env
- Environment variables
๐งช Agent Testing - Invoke Command
Test your deployed agents directly via webhook with real-time responses:- Real-time responses - Get immediate webhook responses with timing
- Smart agent resolution - Resolves agent names to IDs automatically
- Agent caching - Caches agent list for 24 hours for faster performance
- Interactive selection - Shows agent list if no agent specified
- Multiple input methods - Support for agent names, IDs, and interactive selection
- Clean output format - Formatted responses with response time tracking
Command Shortcuts Reference
Advanced Workflows
CI/CD Pipeline
Multi-Organization Setup
Non-Interactive Mode
--api-key
> XPANDER_API_KEY
> ~/.xpander/credentials
Available Frameworks
agno - Basic agent framework with core functionality agno-team - Multi-agent team framework for collaborative agentsbase - Minimal framework for custom implementations
Need Help?
- Join our Slack: https://join.slack.com/t/xpandercommunity/shared_invite/zt-2mt2xkxkz-omM7f~_h2jcuzFudrYtZQQ
- Schedule free AI agent consultation: https://e.xpander.ai/meetings/xpander/book-a-demo-website