How to Let an AI Agent Book Flights (Safely, with Spending Limits)
An AI agent can already plan a trip — compare routes, read your calendar, suggest dates. The thing it could not do, until now, was actually book the flight, because booking means handing over both a payment method and a passenger's identity. Agentcard closes that gap. The same buy tool that lets an agent shop and check out can now search and book flights, pay from a virtual card with a hard spending limit, and complete the booking only after you explicitly confirm.
This guide shows how it works, what the agent needs from you, and the guardrails that keep an autonomous booking from turning into an expensive surprise.
How agent flight booking works
Flight booking runs through Agentcard's conversational buy tool. You describe the trip in plain language; a server-side shopping agent searches live flight offers, walks you through the options, collects (or reuses) the passenger details an airline requires, and books the chosen fare against a virtual card. Nothing is purchased until you say so.
Two things make this safe to hand to an agent: the card is a virtual debit card funded with exactly the amount you allow, and checkout is gated behind an explicit confirmation step. For background on why a funded virtual card is the right payment primitive for agents, see How AI Agents Make Payments.
Prerequisites
- The Agentcard CLI installed and an account funded with a payment method (see How to Give an AI Agent a Credit Card).
- The Agentcard MCP server connected to your agent (Claude Desktop, Claude Code, Cursor, or any MCP client).
- A few minutes to provide passenger details the first time — they are saved for future bookings.
Step 1: Ask in plain language
You do not call a search API or a booking endpoint. You describe the trip. The buy tool takes the whole request as natural language and runs the flow for you:
"Book me a one-way economy flight from SFO to JFK on July 10th, departing in the morning. Keep it under $350 and use an Agent Card."
From the CLI the same request looks like this:
agent-cards buy "one-way economy SFO to JFK on July 10, morning, under $350"The tool is conversational. It returns a conversation id and your follow-ups continue the same booking, so when you later say "yes, book the second option," it remembers the cart you were looking at.
Step 2: Review the flights it finds
The shopping agent searches live flight offers and presents a short list — airline, times, stops, and total price — and waits. It does not pick for you and it does not pay. You reply to narrow things down ("only nonstop," "the cheapest morning option") exactly as you would with a human travel agent.
Step 3: Save a traveler profile (once)
Airlines require Secure Flight passenger data: legal first and last name, date of birth, gender, and contact details. The agent collects these conversationally the first time and stores them as your traveler profile, so you never re-enter them on the next trip. The fields are:
- Legal given name and family name (exactly as on your ID)
- Date of birth (YYYY-MM-DD)
- Gender (required by Secure Flight)
- Email and a phone number in international format, e.g.
+14155550100
Your date of birth is encrypted at rest with AES-256-GCM — the same encryption that protects card numbers on Agentcard. The profile is scoped to you (and to each connected app separately), so a third-party agent never sees identity data it was not given.
Step 4: Confirm, then it pays
When you approve a fare, the agent issues a one-time virtual debit card funded for that booking and completes the purchase. Because the card carries a hard limit, the charge can never exceed what you authorized — even if a fare changes at the last second, the card simply declines rather than overspending.
"Yes, book the 8:05am nonstop on the second airline."
Only after that explicit confirmation does any money move. The agent returns the booking confirmation, and the charge shows up in your transaction history tagged to the card that paid for it.
Why this is safe to automate
- Hard spending ceiling. The booking is paid by a virtual card funded with a fixed amount. The network enforces the limit; the agent cannot talk its way past it. See How to Set Spending Limits on AI Agents.
- Confirmation before every charge. Search and selection are free; checkout happens only when you say so.
- Least-privilege identity. Passenger data is encrypted and scoped per connection, in line with financial zero trust for AI agents.
Next steps
- Set up your first funded card in How to Give an AI Agent a Credit Card.
- Let the same tool handle everyday purchases in How to Let an AI Agent Shop and Check Out for You.
- Give each trip its own budget with How to Give Your AI Agent a Budget.