Skip to main content
Serverless is the default deployment mode when you build agents entirely in the Workbench without customizing code. Your agent runs on agent-workers (xpander cloud or self-hosted) without you managing containers or code files.
When you customize agent code (write your own xpander_handler.py), your agent automatically becomes containerized when you run xpander deploy. See Agent Containers for the code-first workflow.

How It Works

Build your agent visually in Workbench:
  1. Configure in UI: Set LLM model, system prompt, tools, knowledge bases
  2. Click Deploy: Agent runs on serverless agent-workers
  3. Invoke: Use REST API, SDK, Slack, webhooks, or any integration
No code required. The platform handles everything. Agent-worker architecture:
  • xpander Cloud: Managed agent-workers that auto-scale
  • Self-Hosted: Deploy agent-workers to your own Kubernetes cluster
1

Build Agent in Workbench

Configure your agent using the visual interface:
  • LLM Settings: Choose model (GPT-5, Claude Sonnet 4.5, etc.)
  • Instructions: Define agent role, goals, and behavior
  • Connectors: Add tools (Slack, GitHub, Google, etc.)
  • Knowledge Bases: Upload documents for RAG
  • Memory: Enable user memories and session storage
2

Deploy from Workbench

Click Deploy in Workbench.Your agent automatically runs on serverless agent-workers.No Dockerfile, no CLI commands, no code files needed.
3

Invoke from Anywhere

Call your agent via REST API, SDK, Slack, webhooks, or any integration:
from xpander_sdk import Backend, Configuration

backend = Backend(configuration=Configuration(api_key="<your-key>"))

result = backend.invoke_agent(
    agent_id="<agent-id>",
    input="Your message",
    user_id="user@example.com",
    session_id="session-123"
)

Benefits

Zero Code

Build agents visually without writing code

Zero Infrastructure

No containers, servers, or Kubernetes to manage

Instant Deployment

Deploy from Workbench in seconds

Auto-Scaling

Agent-workers automatically scale based on load

Serverless vs Containers

FeatureServerless (No Code)Containers (Code-First)
How you buildWorkbench UI onlyWrite xpander_handler.py code
DeploymentClick Deploy in WorkbenchRun xpander deploy CLI
InfrastructureAgent-workers (managed or self-hosted)Docker containers + registry
ComplexityZero code, zero configurationWrite code, manage Dockerfile
FlexibilityPre-configured runtimeFull control over environment
Use caseMost agentsCustom dependencies, advanced logic

Where Agent-Workers Run

xpander Cloud (Default)

Your agent runs on xpander’s managed agent-workers:
  • Automatic scaling
  • Pay-as-you-go pricing
  • No infrastructure to manage
  • Data processed in xpander cloud

Self-Hosted

Deploy agent-workers to your own Kubernetes:
  • Full data control
  • Runs in your infrastructure
  • Deploy once, use for all serverless agents
  • See Self-Hosted Deployment

Configuration

Environment Variables

Set environment variables in Workbench SettingsEnvironment Variables:
# Custom configuration
DATABASE_URL=postgresql://...
API_ENDPOINT=https://api.example.com

Resource Limits

Configure in Workbench SettingsResources:
  • CPU: 0.25 - 4 vCPUs
  • Memory: 512MB - 8GB
  • Timeout: 30s - 15min

Monitoring

View execution metrics in Monitor tab:
  • Request count and latency
  • Memory and CPU usage
  • Error rates
  • Token usage
  • Thread history and logs
See Observability for detailed monitoring.

When to Use

Use Serverless (no code) when:
  • ✅ Building agents with Workbench UI
  • ✅ Don’t need custom code logic
  • ✅ Standard connectors and tools are sufficient
  • ✅ Want zero infrastructure management
Use Containers (code-first) when:
  • ❌ Need to write custom agent logic
  • ❌ Require custom system dependencies
  • ❌ Need specific Python packages or base images
  • ❌ Want full control over agent behavior
Taking over agent code? Once you customize the agent code with xpander agent new, your agent automatically becomes containerized when you run xpander deploy. See Agent Containers.