Skip to main content

Two Ways to Build Agents

Both approaches run on xpander’s infrastructure - either serverless cloud or your VPC with AgentOS (xpander’s K8s environment). The key difference: How will users interact with your agent?

☁️ Managed Agents

Your complete AI agent, ready to use. Configure everything visually in the Workbench:
  • ✅ Select AI models (pre-configured or bring your own keys)
  • ✅ Add tools and MCP servers from the repository
  • ✅ Set up memory, knowledge bases, and instructions
  • ✅ Connect directly to Slack, webhooks, or web chat
  • ✅ Built on Agno-AGI framework (additional frameworks on roadmap)
What you get: A fully functional AI agent that users interact with directly. No frontend to build, no infrastructure to manage - just configure and interact with the agent via Slack, Webhook, WebUI or scheduled tasks.
managed-agent-example

Real-world managed agent examples

IT Support Bot

Deploy to Slack to answer employee questions, reset passwords, check system status

Customer Service Agent

Handle support tickets via web chat, search docs, escalate complex issues

Sales Assistant

Qualify leads through webhooks, update CRM, schedule follow-ups

DevOps Helper

Monitor deployments, run diagnostics, alert on issues via scheduled tasks

Knowledge Base Q&A

Answer questions from your docs, accessible via web UI or Slack

Onboarding Assistant

Guide new employees through processes, answer FAQs, collect information

🔧 Embedded Agents

Build your own product with AI capabilities. Use xpander as the AI backend for your application.
  • ✅ Integrate with any Python agent framework (LangChain, CrewAI, AutoGen)
  • ✅ Add custom business logic and tools with @register_tool
  • ✅ Control your own frontend and user experience
  • ✅ Deploy to xpander’s infrastructure or your K8s cluster
  • Framework agnostic - works with any Python application
What you get: An AI backend for YOUR application. You build the UI, xpander handles the AI processing, memory, and scaling.

Real-world embedded agent examples

SaaS Platform

Your web app’s frontend sends user requests to xpander agents for AI processing

Mobile App

iOS/Android app uses xpander SDK to add conversational AI features

Enterprise Portal

Custom internal system with xpander handling the AI logic

E-commerce Site

Your checkout flow uses embedded agents for product recommendations

Healthcare App

Patient portal with HIPAA-compliant AI assistant powered by xpander

Educational Platform

Learning app where xpander agents provide tutoring and feedback

How to build embedded agents

1. Test your agent locally:
local_test.py
from xpander_sdk import Backend
from agno.agent import Agent

# Get all your workbench configuration
backend = Backend()
agent = Agent(**backend.get_args())

# Test the agent locally
agent.print_response("What can you help me with?")
2. Your application creates tasks (frontend/API layer):
your_app.py
from xpander_sdk import Tasks
import asyncio

async def handle_user_request(user_id: str, message: str):
    # Your app creates a task for xpander to process
    task = await Tasks().acreate(
        agent_id="your-agent-id",
        prompt=message,
        metadata={"user_id": user_id}  # Pass any context
    )

    # Wait for xpander to process it
    while task.status not in ["completed", "failed"]:
        await asyncio.sleep(1)
        task = await task.areload()

    # Return result to your users
    return task.result
3. Optionally, customize task processing (backend):
xpander_handler.py
from xpander_sdk import on_task, Backend, register_tool
from agno.agent import Agent

@register_tool
def query_inventory(sku: str) -> dict:
    """Your custom business logic"""
    # Connect to YOUR database, APIs, etc.
    return {"sku": sku, "quantity": 100}

@on_task
async def handle_task(task: Task):
    backend = Backend(configuration=task.configuration)
    agent = Agent(**backend.get_args())

    # Process with your custom tools available
    result = await agent.arun(message=task.to_message())
    task.result = result.content
    return task
Without the @on_task handler: Tasks created via SDK are processed by managed agents automatically. With the @on_task handler: Your custom container code processes the tasks. Run xpander deploy to deploy your container.Both agent types can be deployed to:
  • Serverless cloud: xpander’s managed infrastructure (default)
  • Your VPC: Install AgentOS in your K8s cluster for complete data control

Dive Deeper

xpander is built for production-grade AI agent development. Learn more about the platform capabilities:
I