# Build a WhatsApp AI agent with Appwrite Functions and TablesDB

DevFeed: [Build a WhatsApp AI agent with Appwrite Functions and TablesDB](<https://devfeed.tech/articles/build-a-whatsapp-ai-agent-with-appwrite-functions-and-tablesdb-31445.md>)

Original publisher: [Read original article](<https://appwrite.io/blog/post/whatsapp-ai-agent-appwrite-functions>)

Author: Atharva Deosthale

Published: 2026-09-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Appwrite Blog](<https://devfeed.tech/sources/appwrite-blog.md>)

Topics: [Appwrite](<https://devfeed.tech/topics/appwrite.md>), [AI Agent](<https://devfeed.tech/topics/ai-agent.md>), [Messaging](<https://devfeed.tech/topics/messaging.md>), [Serverless](<https://devfeed.tech/topics/serverless.md>), [API](<https://devfeed.tech/topics/api.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [api](<https://devfeed.tech/tags/api.md>), [app](<https://devfeed.tech/tags/app.md>), [build](<https://devfeed.tech/tags/build.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [messages](<https://devfeed.tech/tags/messages.md>), [messaging](<https://devfeed.tech/tags/messaging.md>), [meta](<https://devfeed.tech/tags/meta.md>), [serverless](<https://devfeed.tech/tags/serverless.md>), [support](<https://devfeed.tech/tags/support.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>), [tutorials](<https://devfeed.tech/tags/tutorials.md>), [whatsapp](<https://devfeed.tech/tags/whatsapp.md>)

## AI overview

This tutorial shows how to build a WhatsApp AI support agent with Appwrite Functions and TablesDB. One function receives and stores incoming messages, while a second function retrieves conversation history, uses an order-lookup tool, sends replies through Meta's WhatsApp Cloud API, and stores the responses. Conversation summaries help keep long threads within the model's token budget.

## Source excerpt

Turn a WhatsApp number into an AI support agent. Two Appwrite Functions receive messages and reply, TablesDB keeps the conversation history, and a compaction step keeps the context small.