Skip to content

Backend-as-a-Service for AI Agents. Equip any AI Agent with tools, memory, multi-agent collaboration, state, triggering, storage, and more.

License

Notifications You must be signed in to change notification settings

xpander-ai/xpander.ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

82 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

xpander.ai Logo

A framework-agnostic Backend for your AI Agents

License PyPI Version NPM Version Platform Login

Follow on X LinkedIn Discord


xpander.ai offers Backend-as-a-Service infrastructure for autonomous agents: memory, tools, multi-user state, various agent triggering options (MCP, A2A, API, Web interfaces), storage, agent-to-agent messaging β€” designed to support any agent framework and SDK

Demo

xpander.ai-demo.mov
Feature Description
πŸ› οΈ Framework Flexibility Choose from popular frameworks like OpenAI ADK, Agno, CrewAI, LangChain, or work directly with native LLM APIs
🧰 Tool Integration Access our comprehensive MCP-compatible tools library and pre-built integrations
πŸš€ Scalable Hosting Deploy and scale your agents effortlessly on our managed infrastructure
πŸ’Ύ State Management Opt for framework-specific local state or leverage our distributed state management system
⚑ Real-time Events Harness our event streaming capabilities for Slackbots, ChatUIs, Agent2Agent communication, and Webhook integrations
πŸ›‘οΈ API Guardrails Implement robust guardrails using our Agent-Graph-System to define and manage dependencies between API actions of tool-use

By abstracting away infrastructure complexity, xpander.ai empowers you to focus on what matters most: building intelligent, effective, production-ready AI agents.

⭐ Featured template - fully-featured cloud-based SWE agent

  1. Login to https://app.xpander.ai and go to the Templates section
  2. Deploy the Coding agent
  3. Send tasks to the agent.
    Examples:
    Clone the <my-repo-name> repo and add the following feature to the codebase ..., then create a PR with the new code.
    
    Find all open PRs that have been waiting on review for more than 3 days.
    
  4. Continue customizing, adding tools, configure triggering (MCP, A2A, Webhooks), multi-agent collaboration, and more.
xpander.ai Logo

Adding a backend to your agents in less than 5 minutes

πŸ“¦ Installation

# Python
pip install xpander-sdk

# Node.js
npm install @xpander-ai/sdk

# CLI (for agent creation)
npm install -g xpander-cli

Use xpander-cli to scaffold a new agent template

xpander login
xpander agent new
image

Prepare virtual env

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Develop the agent and run it

xpander dev
image

Bring your AI agent code and stream events to your agent

Add one line of code to xpander_handler.py and your agent will be accessible via Agent2Agent, Slackbots, MCP servers, or WebUI.

on_execution_request(execution_task: AgentExecution) -> AgentExecutionResult:
  your_agent.invoke(execution_task.input.text)
  return AgentExecutionResult(
        result="your-agent-result",
        is_success=True,
    ) 

(Optional but highly recommended): Instrument your agent with AI tools and state management

from xpander_sdk import XpanderClient, Agent

# Init the clients
xpander_client = XpanderClient(api_key="YOUR_XPANDER_API_KEY")
agent_backend : Agent = xpander_client.agents.get(agent_id="YOUR_AGENT_ID")  

# Initializing a new task creates a new conversation thread with empty agent state
xpander_agent.add_task("What can you do?")

response = openai_client.chat.completions.create(
      model="gpt-4o", 
      messages=agent_backend.messages,  # <-- Automatically loads the current state in the LLM format
      tools=agent_backend.get_tools(),  ## <-- Automatically loads all the tool schemas from the cloud
      tool_choice=agent_backend.tool_choice,
      temperature=0.0
  )
        
# Save the LLM Current state
agent.add_messages(response.model_dump())

# Extract the tools requested by the AI Model
tool_calls = XpanderClient.extract_tool_calls(llm_response=response.model_dump())

# Execute tools automatically and securely in the cloud after validating schema and loading user overrides and authentication
agent.run_tools(tool_calls=tool_calls)

Deploy agent to the cloud

xpander deploy  # Will deploy the Docker container to the cloud and run it via the xpander_handler.py file
xpander logs    # Will stream logs locally from the agent configured locally

🌟 Featured Open Source AI Agents Using xpander.ai

Project Description License Tech Stack Link
☸️ Agno EKS Agent Kubernetes operations agent with Agno framework, xpander backend, and AWS EKS MCP servers Apache 2.0 Python, Agno, AWS EKS, MCP Repo
πŸ’» Coding Agent Framework-agnostic agent that reads, writes, and commits code to Git repositories MIT Python, OpenAI, Anthropic, Gemini, Llama 3 Repo
πŸŽ₯ NVIDIA Meeting Recorder AI assistant that records, transcribes, and extracts insights from meetings Apache 2.0 Python, NVIDIA SDKs, Speech Recognition Repo

🧩 Getting Started Examples

The repository provides comprehensive examples to help you build AI agents with xpander.ai:

Hello World Examples

Choose your preferred language to get started:

🐍 Python Example

Getting-Started/python/hello-world/ - A comprehensive Python implementation demonstrating:

python/hello-world/
β”œβ”€β”€ app.py                      # CLI entry point for the agent
β”œβ”€β”€ my_agent.py                 # Main agent implementation
β”œβ”€β”€ my_agent.ipynb              # Jupyter notebook version
β”œβ”€β”€ xpander_handler.py          # Event handler for platform events
β”œβ”€β”€ agent_instructions.json     # Agent persona configuration
β”œβ”€β”€ xpander_config.json         # API credentials configuration
β”œβ”€β”€ Dockerfile                  # Container definition for deployment
β”œβ”€β”€ providers/
β”‚   β”œβ”€β”€ ai_frameworks/          # Framework integrations
β”‚   └── llms/                   # LLM provider implementations
β”‚       └── openai/             # OpenAI specific implementation
└── tools/
    β”œβ”€β”€ local_tools.py          # Custom tool implementations
    └── async_function_caller.py # Async function caller utility

🟨 Node.js Example

Getting-Started/node/hello-world/ - A Node.js implementation with camelCase conventions:

node/hello-world/
β”œβ”€β”€ app.js                      # Main application entry point
β”œβ”€β”€ MyAgent.js                  # Agent implementation class
β”œβ”€β”€ package.json                # Node.js dependencies and scripts
β”œβ”€β”€ xpander_config.json         # Xpander API configuration
β”œβ”€β”€ agent_instructions.json     # Agent role and instructions
└── env.template               # Environment variables template

See individual README files in each directory for detailed setup instructions:

πŸ“š Documentation & Resources

βš–οΈ License

  • Open-source runtime: Apache License 2.0
  • Hosted platform: Commercial (free tier available)

↑ Back to Top ↑

About

Backend-as-a-Service for AI Agents. Equip any AI Agent with tools, memory, multi-agent collaboration, state, triggering, storage, and more.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •