Skip to main content
Choose your integration method based on your use case:

Quick Comparison

FeatureREST APIPython SDKModel Context Protocol
Language SupportAny languagePython onlyAny MCP client
Primary Use CaseControl plane operationsBuilding agentsDiscovering & invoking agents
Setup ComplexityMinimal (API key)pip installMCP client config
Best ForCRUD operations, integrationsAgent development, workflowsIDE/AI client integration
Real-timePolling or webhooksEvent decoratorsServer-Sent Events

Getting Started

1

Get API Credentials

Sign up at app.xpander.ai and generate your API key from the dashboard
2

Choose Your Integration

  • REST API: For universal access from any language
  • Python SDK: For building agents in Python
  • MCP Protocol: For IDE and AI client integration
3

Follow the Guide

Each integration method has comprehensive documentation, examples, and quick start guides

REST API - Platform

The REST API provides complete control over your resources:
# List agents
curl -X GET "https://api.xpander.ai/v1/agents" \
  -H "x-api-key: YOUR_API_KEY"

# Invoke an agent
curl -X POST "https://api.xpander.ai/v1/agents/{agent_id}/invoke" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": {"text": "Analyze this data"}}'

Explore REST API

View complete REST API documentation with all endpoints

Python SDK - Build Agents

The Python SDK enables rapid agent development with powerful abstractions:
from xpander_sdk import Agents, on_task

# Initialize SDK
agents = Agents()

# Define task handler
@on_task
async def handle_task(task):
    print(f"Processing: {task.id}")
    task.result = "Task completed"
    return task

# List and invoke agents
agent = await agents.aget("agent-id")
task = await agent.acreate_task(prompt="Analyze data")

Explore Python SDK

View complete SDK documentation with modules and examples

Model Context Protocol - Expose to Claude & IDEs

Connect your agents and tools to Claude Desktop, Cursor, and other MCP clients:
{
  "mcpServers": {
    "xpander.ai": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.xpander.ai/mcp/",
        "--header",
        "x-api-key:YOUR_API_KEY"
      ]
    }
  }
}

Explore MCP Integration

View complete MCP setup guide with examples

Authentication

All integration methods use API key authentication:
export XPANDER_API_KEY="your-api-key"
Get your API key from the dashboard.

Common Use Cases

Use Python SDK for building agents with complex workflows, tool integrations, and event handling. The SDK provides decorators and lifecycle management for sophisticated agent architectures.
Use REST API for integrating xpander into existing applications written in any language. Perfect for microservices, web apps, and mobile applications.
Use Model Context Protocol for accessing agents from Claude Desktop, Cursor, VSCode, or any MCP-compatible client. Enables seamless agent discovery and invocation from your development environment.
Combine all three: Build agents with the SDK, manage them via REST API, and access them through MCP clients. All methods work together seamlessly.

API Resources

Support & Community