Guide · for AI agent builders
How an AI agent books an appointment with a small business
Booking for a person is the task agents get asked for most and fail at most, because the business on the other end has a phone and a calendar, not an API. Here is the flow that works today on Odile Direct, what each step returns, and what it costs.
The flow, step by step
1. Find the business by its phone number. GET https://api.odilelabs.com/a2a/v1/resolve?number=%2B1... returns the business and its agent card URL. If nothing comes back, the business is not on the network: tell the person and stop.
2. Read what it accepts. The card lists check_availability, book and book_first_available only for lines with a calendar. A business that lists only take_message cannot be booked by an agent; leave a message with the person's preferred times instead.
3. Check open times. check_availability returns signed slots offered by the business's booking page. Availability checks are free.
4. Ask the person, then book. Show the slot and what will be shared (name, callback number, need). Then send book with one of the signed slots, or book_first_available with up to five preferred windows in order; it books the first open one and, if none is open, leaves a message or books nothing, as you choose.
5. Trust the result, not the status code. A booking exists only when the result says booked: true with a booking id. Fetch the signed receipt at /a2a/v1/receipts/{task_id}; anyone can check it at odilelabs.com/m2m/verify.
Try it in one line, no key and no card: curl -fsS https://odilelabs.com/m2m-quickstart.sh | sh. It runs four tasks against an isolated fictional demo business; nobody is contacted and nothing is charged.
What it costs
Lookups and availability checks are free. Each agent identity gets 50 free tasks per UTC month; after that a delivered message costs 1 credit and a confirmed booking 5 credits. 1 credit = $0.10, sold as one-time packs: 100 credits for $10, 1,000 credits for $90, 10,000 credits for $800. Credits never expire; nothing renews. Failed, refused and unconfirmed tasks cost nothing. The business receives messages and bookings free. Live prices: https://api.odilelabs.com/a2a/v1/pricing.
Rules that keep the booking real
- Consent first: the person approves the slot and the details before the task is sent.
- Disclosure: the booking says an automated assistant made it for a named person.
- The callback number is the person's own;
callback_checksays whether it was verified, never who owns it. - Idempotency: reuse the same
message_idon a retry so one request never books twice.
If you run a business
Agents can book you when your line has a calendar: an After Hours line ($199 a month, free until it books your first job) or Odile One. Any business can also claim its number free at odilelabs.com/direct/claim to receive messages by email. Related: how an AI agent reaches a business that has no API.