Travel & Expense Assistant
Build an AI assistant that manages travel booking and expense tracking using Xpander.ai and the Agno framework
Tutorial Summary
- Goal: Build a Travel & Expense Assistant powered by Xpander.ai + Agno
- Estimated Time: 25–35 minutes
- Prerequisites: Python 3.12+, Xpander SDK, Agno framework, required API keys (Slack, Aviationstack, Nebius/OpenAI)
Frameworks like Agno have made it easier than ever to create AI agents. Yet, for enterprise engineering teams, accessibility is only the beginning. The real challenge and opportunity lies in deploying production-grade, autonomous assistants that can orchestrate complex business workflows, integrate logically with diverse enterprise systems, and scale reliably across thousands of users, all while minimising backend complexity and operational overhead.
Here Xpander.ai comes in!
Xpander.ai helps companies move from prototypes to quickly create reliable agents that run in real-time, automate tasks, and facilitate secure, multi-user collaboration. With one API-first platform that does away with infrastructure headaches, teams can turn their attention to innovation and business logic.
To help you visualise how Xpander.ai works, we will be building a Travel & Expense Assistant using Xpander.ai and the Agno Framework. If you’re ready to scale intelligent agents with minimal friction and maximum impact, then read on 🚀
🗺️ Xpander.ai: An Overview
Xpander.ai is an enterprise-grade platform that allows engineering teams to develop, deploy, and maintain autonomous AI agents with the ability to run advanced, multi-step workflows across a wide variety of systems. Productised for production environments, Xpander.ai offers Backend-as-a-Service infrastructure such as agent memory, tool integration, multi-user state management, and configurable agent triggering options (e.g. APIs, web UI, Slack, Teams).
The Xpander ecosystem contains several packages that streamline agent development:
- xpander-sdk – main SDK for interacting with Xpander.ai agents (Python, Node.js, C#, Java).
- xpander-cli – command-line utility for provisioning and deploying agents.
- xpander-mcp-remote – MCP bridge utility for IDE integrations (e.g. Cursor, Claude Desktop).
- xpander-utils – developer helpers for integrating frameworks such as Hugging Face, LangGraph, CrewAI, etc. (Python).
📚 Read the docs: https://docs.xpander.ai/docs/01-get-started/01-index
🎯 What We’re Building: Travel & Expense Assistant
Below is the high-level user journey for our assistant (powered by Agno agents and orchestrated by Xpander):
- Flight booking – user enters flight details → booking agent fetches real-time flight data from Aviationstack.
- Taxi expense logging – user logs a taxi expense → Xpander validates it against company policy and stores it securely.
- Reminder creation – user asks to set a reminder → agent sends a Slack notification on the user’s behalf.
✨ Key Features
1. Travel Management
- Flight reservation – reserve flights with IATA airport codes and real-time availability.
- Hotel reservations – book rooms based on date, location and budget.
- Trip planning – bundle flights and hotels into best-fit itineraries.
2. Expense Management
- Expense logging – categorise expenses (meals, taxi, lodging, …).
- Policy compliance – auto-check spending against company rules.
- Summaries & reports – generate well-formatted expense reports.
- Automated reminders – Slack pings for pending reports.
🛠️ Prerequisites
- Python 3.12.1+ (required by
xpander-utils
). - Xpander SDK access (Backend orchestration, memory, tools).
- Agno framework familiarity.
- API keys: Aviationstack, Slack Bot, Nebius AI (or OpenAI).
Follow the steps below to prepare your environment.
1. Clone the Repository
2. Create & Activate a Virtual Environment
3. Install Dependencies
4. Configure Environment Variables
Create a .env
file in the project root:
5. xpander_config.json
🧑💻 Hands-on: Building the Assistant
Below you’ll find the CLI agent interaction loop built on top of the Xpander backend for managing AI agents and workflows.
(Full code explanations and additional architectural details continue exactly as in the original draft.)
Heads-up: Random flights cannot be booked via free-tier Aviationstack. Test with:
How the Xpander Handler Works?
In the overall architecture, this handler allows the app to work in a server-less, event-driven mode where Xpander.ai triggers agent executions remotely.
Unlike main.py
, which runs a CLI-based local loop, xpander_handler.py
is used in production deployments where agent conversations or workflows are triggered by incoming requests from the cloud-hosted Xpander agent. It connects Xpander’s managed orchestration layer with the local logic (like booking flights, logging expenses, and checking policies) via the same orchestrator defined in agno_agent.py
.
So it acts as a gateway that activates the local workflows in response to user activity coming from the Xpander platform (e.g. chat interface, API, or third-party app).
Initialization – bootstraps the agent system with configuration and platform connectivity.
- Loads
xpander_config.json
and environment variables - Creates an
AgnoAdapter
to connect to Xpander’s backend - Instantiates the
AgnoAgentOrchestrator
for agent coordination
Event Handling – manages the complete request lifecycle:
- Listens for execution requests via XpanderEventListener
- Parses inputs (user messages, metadata)
- Routes tasks to the orchestrator (
agno_agent_orchestrator.run()
) - Tracks metrics (LLM token usage, performance)
- Returns structured results (
AgentExecutionResult
)
Key Features
- Async-first design (high-concurrency processing)
- Error resilience with try/catch wrappers
- Observability: reports metrics (token costs, model used) back to Xpander
🧪 Quickly Test the Agent
CLI Chat
Event Handler
Docker
Sample Run
Below is an example conversation to demonstrate end-to-end capabilities:
Prompt: Book me a flight from NGB → ICN on 9 July 2025 (flight YG9021, budget ₹3000). Once booked, confirm details and log the expense.
Prompt: Please book a hotel for ₹2000 on the same date.
Prompt: Send a summary notification on Slack for all expenses.
Output: Slack notification
🏁 Final Thoughts
Xpander.ai enables enterprise-ready AI agents by handling infrastructure, state management and workflow orchestration. The Travel & Expense Assistant showcases how Xpander.ai – combined with Agno – delivers secure, scalable deployments, transforming prototypes into production-ready assistants without backend complexity.
- Seamless integration of business logic with external systems (Slack, Aviationstack)
- Real-time multi-user collaboration with built-in session memory
- Production-grade reliability with zero infrastructure overhead
Happy building! ✈️💸