Documentation Index
Fetch the complete documentation index at: https://docs.zavu.dev/llms.txt
Use this file to discover all available pages before exploring further.
Restaurant booking agent
A full agent that handles three things customers want from a restaurant on WhatsApp:- Browse the menu (with filters: vegan, gluten-free).
- Check availability for a date and party size.
- Confirm a reservation with a code they can quote on arrival.
The This guide walks through what that template produces and how to evolve it
into a production setup with real data.
restaurant-booking template ships with the CLI:What you’ll build
1. Scaffold
index.ts is the entire integration:
index.ts
2. Configure
3. Deploy
4. Test
Send a WhatsApp to the sender’s number:hola, qué tienen vegano?The agent answers, calls tools, and confirms a reservation.
Moving to production
The template uses in-memory state — fine for demo, useless in real life (Lambda cold start wipes it).Step 1: persist reservations
Add a real database. We’ll use Postgres via thepostgres npm package:
package.json
Step 2: real availability
Replace the demo logic with a query against your reservations + capacity:Step 3: send confirmation message
After creating a reservation, send a follow-up WhatsApp confirming the booking. The auto-provisionedZAVU_API_KEY already lets you do this:
Step 4: cancellation tool
WHERE phone = ${ctx?.contactPhone} — customers can only cancel
their own reservations, even if they get the right ID.
Step 5: opening hours guard
Add reasoning the LLM can’t accidentally bypass:message field and incorporates it into a natural-sounding
reply. No need to add “and we’re closed Mondays” to the prompt — the tool
itself enforces it.
Iterating fast
zavu deploy deletes it from the
agent automatically. The summary will show:
Costs
For a busy restaurant doing ~50 customer conversations a day:| Item | Per conversation | Per month |
|---|---|---|
| LLM (gpt-4o-mini via Zavu gateway, ~3 turns) | ~$0.0006 | ~$0.90 |
| Lambda invocations | ~$0.00000001 × 6 invocations | negligible |
| WhatsApp conversation fee (Meta) | ~$0.005 (utility tier) | ~$7.50 |
| Total | ~$0.006 | ~$9 |
Next
Customer support example
Knowledge base lookup + ticket creation.
Ecommerce example
Order tracking + smart recommendations.
