text stringlengths 0 59.1k |
|---|
volt prompts pull --names support-agent --prompt-version 4 |
# These pulls are stored as .voltagent/prompts/<promptName>/<version>.md |
# Custom output directory and clean existing files first |
volt prompts pull --out ./.prompts --clean |
# Push local changes (creates new versions) |
volt prompts push |
# Push selected prompts only |
volt prompts push --names support-agent router |
``` |
If you pull to a custom directory, set `VOLTAGENT_PROMPTS_PATH` so agents can read from it. |
<|endoftext|> |
# source: VoltAgent__voltagent/website/recipes/whatsapp-order.md type: docs |
--- |
id: whatsapp-order |
slug: whatsapp-ai-agent |
title: WhatsApp Order Agent |
description: Learn how to build a WhatsApp AI agent chatbot for food ordering with VoltAgent. |
repository: https://github.com/VoltAgent/voltagent/tree/main/examples/with-whatsapp |
--- |
This example demonstrates a WhatsApp chatbot using VoltAgent that can handle food orders through natural conversation. The complete ordering system interacts with customers via WhatsApp, manages menu items from a database, and processes orders with full conversation context. |
This example includes a WhatsApp AI agent that: |
- Displays menu items from a Supabase database |
- Takes food orders through natural conversation |
- Collects delivery addresses |
- Tracks order status in real-time |
- Maintains conversation context using working memory |
- Stores all orders persistently in the database |
## Setup |
<Info title="Before you begin, line up these accounts and keys:"> |
- Sign in to [VoltOps LLM Observability platfrom](https://console.voltagent.dev/login) |
- A [Supabase account](https://supabase.com) (free tier works) |
- WhatsApp Business API access via [Meta for Developers](https://developers.facebook.com) |
- An OpenAI API key from [platform.openai.com](https://platform.openai.com/api-keys) |
</Info> |
### Get the example code |
Use the VoltAgent CLI to get the WhatsApp order AI agent example from our repository: |
```bash |
npm create voltagent-app@latest -- --example with-whatsapp |
cd with-whatsapp |
``` |
You can find the source code of this example [here](https://github.com/VoltAgent/voltagent/tree/main/examples/with-whatsapp). |
### Configure environment variables |
Create a `.env` file with your API keys: |
```env |
# OpenAI Configuration |
OPENAI_API_KEY=your_openai_api_key |
# Supabase Configuration |
SUPABASE_URL=your_supabase_project_url |
SUPABASE_ANON_KEY=your_supabase_anon_key |
# WhatsApp Configuration |
WHATSAPP_WEBHOOK_TOKEN=your_webhook_verification_token |
WHATSAPP_ACCESS_TOKEN=your_whatsapp_access_token |
WHATSAPP_PHONE_NUMBER_ID=your_whatsapp_phone_number_id |
# VoltOps Platform (Optional but recommended) |
VOLTAGENT_PUBLIC_KEY=your_public_key |
VOLTAGENT_SECRET_KEY=your_secret_key |
``` |
### Set up the database |
First, set up your Supabase database: |
1. Create a Supabase account at [supabase.com](https://supabase.com) |
2. Create a new project in your Supabase dashboard |
3. Once your project is ready, navigate to the **SQL Editor** from the sidebar |
4. Run the following SQL commands to create the necessary tables for your ordering system: |
For detailed Supabase setup instructions, see the [official Supabase documentation](https://supabase.com/docs/guides/getting-started). |
 |
### Menu Items Table |
```sql |
CREATE TABLE public.menu_items ( |
id SERIAL PRIMARY KEY, |
category VARCHAR(50) NOT NULL, |
name VARCHAR(100) NOT NULL, |
description TEXT, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.