Skip to main content

Overview

The xpander.ai CLI is your command-line interface for building and managing AI agents. It handles three core functions:
  1. 🎛️ Control Plane - Create, edit, delete agents in xpander.ai’s cloud platform
  2. 🏗️ Local Development - Download framework templates and run agents locally
  3. ☁️ 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

Purpose: Manage authentication and switch between different xpander.ai organizations or environments (production, staging, etc.).

🎛️ Control Plane - Agent Management

These commands manage agents in Xpander’s cloud platform:
Purpose: Create, configure, and manage your AI agents in xpander.ai’s control plane. These operations affect the agent definitions stored in xpander.ai’s cloud. Key Features:
  • Agent lists are sorted by creation date (newest first)
  • Optional [agent] parameters show selection list if omitted
  • edit opens the agent configuration in your browser
  • delete requires confirmation to prevent accidental deletion
  • invoke tests deployed agents via webhook with real-time responses

🏗️ Local Development - Framework Templates

These commands work with agent code on your local machine:
Purpose: Download pre-built framework templates (agno, agno-team, base) to your local development environment and test agents locally before deployment. What happens:
  • 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:
Purpose: Deploy your local agent code as Docker containers to xpander.ai’s cloud infrastructure and manage running containers. Deployment Process:
  1. Uploads your local agent code
  2. Builds a new Docker image
  3. Deploys and runs the container instantly
  4. Each deploy creates a NEW version
Required files for deployment:
  • Dockerfile - Container definition
  • requirements.txt - Python dependencies
  • xpander_handler.py - Your agent logic
  • .env - Environment variables

🧪 Agent Testing - Invoke Command

Test your deployed agents directly via webhook with real-time responses:
Purpose: Test deployed agents instantly without building chat UIs or API clients. Perfect for development, debugging, and validation. Key Features:
  • 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
Examples:

Command Shortcuts Reference

Advanced Workflows

CI/CD Pipeline

Multi-Organization Setup

Non-Interactive Mode

Auth Priority: --api-key > XPANDER_API_KEY > ~/.xpander/credentials

Available Frameworks

agno - Basic agent framework with core functionality agno-team - Multi-agent team framework for collaborative agents
base - Minimal framework for custom implementations

Need Help?