xpander.ai is an Agentic Platform that simplifies how you build, enhance, and deploy AI agents. It works with popular frameworks (SmolAgents, LangGraph) and LLM providers (OpenAI, Anthropic, Gemini) without vendor lock-in.

The platform handles the complex infrastructure needed for managing thousands of user interactions, maintaining complex agent states, and orchestrating multi-step agent workflows. This comprehensive approach lets developers focus exclusively on agent logic rather than worrying about underlying infrastructure concerns.

Key Platform Features

xpander.ai is designed with two core principles:

  1. Focus on agent logic, not infrastructure: We handle complex state management, scaling, and deployment concerns so you can focus on what your agents do.

  2. Framework and provider independence: Build once and deploy with any LLM provider or agent framework without rewriting your code.

Agentic Interfaces

Automatically create AI interfaces that integrate agents with any system through HTTP traffic analysis or API documentation.

Agent Graph System

Control autonomous AI agents with precise boundaries and predictable behavior patterns.

State Management

Scale AI state machines horizontally to handle thousands of concurrent users across different frameworks and LLM providers.

Human Interfaces

Connect your agents to popular channels like Slack, Teams, REST APIs, and voice interfaces with minimal configuration.

Framework Flexibility

Switch between different agent frameworks (SmolAgents, LangGraph) without rewriting your agent logic.

Provider Independence

Avoid vendor lock-in by easily switching between LLM providers (OpenAI, Anthropic, Gemini).

On-Premises Deployment

Run the entire platform within your organization’s VPC for complete data control and security compliance.

Enterprise Security

Deploy on-premises with full control over your data and infrastructure for complete security compliance.

Getting Started

Install the SDK

Install the xpander SDK to connect programmatically:

pip install xpander-sdk

Hello World Example with Web UI

1

Create an agent and define the graph of tasks and tools

2

Test your agent with the hosted Chainlit UI

3

Connect to your agent programmatically

The following steps show how to execute your agent locally, with full control over the execution loop.

First, initialize the clients:

from xpander import XpanderClient
from openai import OpenAI

# Initialize clients
xpander_client = XpanderClient(api_key=XPANDER_API_KEY)
openai_client = OpenAI(api_key=OPENAI_API_KEY)

# Get your agent
agent = xpander_client.agents.get(agent_id=XPANDER_AGENT_ID)
4

Create a task and initialize state

Create an immutable task for the agent. Tasks are immutable by design, allowing you to track state changes throughout execution:

# Create a task for the agent
task1 = agent.add_task("""
Summarize the last 24 hours top hackernews
""")

# Initialize agent memory with the task
agent.memory.init_messages(
    input=agent.execution.input_message,
    instructions=agent.instructions
)
5

Execute the agent loop locally (optional)

Run the agent execution loop locally. The is_finished() method allows you to check if the agent has completed its task, errored out, or is still processing:

# Run the agent until completion
while not agent.is_finished():
    # Get LLM response with available tools
    response = openai_client.chat.completions.create(
        model="gpt-4o",
        messages=agent.messages,
        tools=agent.get_tools(),
        tool_choice=agent.tool_choice,
        temperature=0.0
    )
            
    # Process LLM response
    agent.add_messages(response.model_dump())
    
    # Extract and run tool calls
    tool_calls = XpanderClient.extract_tool_calls(llm_response=response.model_dump())
    agent.run_tools(tool_calls=tool_calls)

The is_finished() API checks the execution state of the agent, enabling you to control the execution loop programmatically. This approach gives you full visibility into the agent’s execution process.

6

Retrieve execution results

Once execution is complete, you can retrieve the immutable execution result:

# Get final results
execution_result = agent.retrieve_execution_result()
print("Status:", execution_result.status)
print("Result:", execution_result.result)

The execution result is immutable, meaning it can be safely retrieved at any point during or after execution without affecting the agent’s state. This design allows you to monitor progress or record results while the agent continues processing.

Example Output

# execution_result.status
Status: ExecutionStatus.COMPLETED

# execution_result.result
Result: Here are the top Hacker News stories from the last 24 hours:

1. Show HN: Nash, I made a standalone note with a single HTML file
   - Author: yevgenyhong
   - Score: 204
   - Comments: 47
   - Summary: A user has created a standalone note application using a single HTML file. This tool does not require any membership or software installation and can be used both online and offline. It is suitable for sharing content through messengers like Telegram and can also be used for hosting and blogging.
   - Link: [Read more](https://keepworking.github.io/nash/)

2. Finding Signal in the Noise: Machine Learning and the Markets (Jane Street)
   - Author: lewiscarson
   - Score: 76
   - Comments: 32
   - Summary: An article discussing the application of machine learning in financial markets, focusing on how to find meaningful signals amidst the noise.
   - Link: [Read more](https://signalsandthreads.com/finding-signal-in-the-noise/)

3. Sign in as anyone: Bypassing SAML SSO authentication with parser differentials
   - Author: campuscodi
   - Score: 200
   - Comments: 73
   - Summary: A security blog post detailing a method to bypass SAML SSO authentication using parser differentials, highlighting a significant security vulnerability.
   - Link: [Read more](https://github.blog/security/sign-in-as-anyone-bypassing-saml-sso-authentication-with-parser-differentials/)

These stories highlight a range of topics from innovative tech projects to significant security insights.