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

intelak/xpander.ai

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 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
python xpander_handler.py  # <-- Events with entry point for your agents

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
💻 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
🌍 Hello World Example Simple starter template for building agents with xpander.ai Apache 2.0 Python, OpenAI Repo

🧩 Hello World Example

The Getting-Started/hello-world directory contains a simple agent implementation to demonstrate core concepts of how to run asynchronous AI Agents with local tools and cloud tools, and a fully managed stateful state in a backend with xpander.ai:

hello-world/
├── app.py                      # CLI entry point for the agent with local thread
├── my_agent.py                 # Agent implementation (Your agent code goes here)
├── xpander_handler.py          # Event handler for incoming events from the platform
├── Dockerfile                  # For containerized deployment
├── providers/
│   ├── ai_frameworks/          # Framework integrations
│   └── llms/                   # LLM provider implementations
│       ├── openai/             # OpenAI specific implementation
│       └── ...
└── tools/
    ├── local_tools.py          # Custom tools implementation
    └── async_function_caller.py # Async function caller utility

See Hello-world.md for more details

📚 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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.2%
  • Dockerfile 2.8%