OpenBSP API stands out by intentionally separating the WhatsApp communication layer from the agent logic through a clean decoupled architecture. This design enables teams to swap AI frameworks or extend agent capabilities without altering the core messaging infrastructure โ a pattern worth understanding for anyone building agentic systems or multi-agent platforms.
What openbsp api does and how it is structured
OpenBSP API is a self-hostable, multi-tenant WhatsApp Business platform built using Deno and Supabase, written in TypeScript. Its primary goal is to provide a serverless-first, cloud-native solution for integrating WhatsApp Business API with AI-driven agents and workflows.
At its core, OpenBSP structures the platform into two main layers:
Communication layer: This handles all interaction with the WhatsApp Business API, including message sending, receiving, and media processing. It enforces Meta’s required 24-hour service window rules, ensuring compliance with WhatsApp policies.
Agent logic layer: Decoupled from messaging, this layer manages the AI agents that process messages, generate responses, or perform actions. It supports multiple built-in lightweight agents with tools for SQL, HTTP, calculators, and Model Context Protocol (MCP) interactions.
The platform exposes an MCP server over Server-Sent Events (SSE), allowing external clients or advanced agents to interact agentically with WhatsApp conversations. This includes support for the a2a (agent-to-agent) and chat-completions protocols, enabling integration with frameworks like OpenAI or Claude.
Technically, OpenBSP leverages Supabase for multi-tenant backend services, including authentication, database storage, and edge functions. The use of Supabase’s GitHub integration allows fully serverless deployment without any local environment setup.
This architecture means teams can swap or upgrade AI agent frameworks independently of the WhatsApp communication infrastructure, enabling flexibility and modularity in agent design and deployment.
Technical strengths and design tradeoffs
OpenBSP’s standout feature is its deliberate decoupling of the communication and agent layers. This separation:
Enables framework agnosticism: Developers can integrate different AI SDKs (OpenAI, Google ADK, etc.) or replace agents without touching the WhatsApp API integration.
Supports multi-tenancy robustly: Supabase’s architecture handles data isolation and authentication, allowing multiple organizations or users to share a single deployment securely.
Offers real-time agent access via MCP over SSE: This streaming protocol for agent communication is a practical choice for live, event-driven interactions with WhatsApp.
Supports media processing: Handling audio, images, video, PDFs, and text documents in messages is critical for business use cases and is baked into the platform.
The tradeoff is a dependency on Supabase’s platform and GitHub integration, which may limit deployment flexibility for teams wanting on-premises or non-Supabase solutions. Also, while the platform enforces WhatsApp’s 24-hour messaging window, this constraint limits how agents can engage with users over time.
From a code quality perspective, the repo is written in TypeScript with modern Deno practices. The codebase is well-organized around the separation of concerns, with clear boundaries between messaging, agent logic, and protocol handling. This makes it easier to maintain or extend.
The inclusion of a Claude Code plugin for bridging WhatsApp conversations in real time adds practical value for teams exploring advanced AI agent workflows.
Quick start with openbsp api
The README provides a straightforward self-host deployment method designed to get you live in under 15 minutes without a local environment.
Steps are as follows:
## Self-host deployment
> [!NOTE]
> **Deploy your own instance in under 15 minutes** โ no local environment required.
1. Fork this repo (1 min)
2. Create a Supabase project (5 min)
3. Connect the project to your fork via the Supabase GitHub Integration (5 min)
You are live! ๐ Pushes to your default branch will automatically deploy database migrations and Edge Functions.
#### Connect via Supabase GitHub Integration
In the Supabase Dashboard:
1. Go to **Project Settings** > **Integrations**
2. Under **GitHub Integration**, click **Authorize GitHub**
3. On the GitHub authorization page, click **Authorize Supabase**
4. Back on the Integrations page, choose your forked **open-bsp-api** repository
5. Set the **Working directory** to `.` (the `supabase/` folder lives at the repo root)
6. Set the **Production branch** to `main`
7. Configure the remaining options as needed
8. Click **Enable integration**
Alternative: deploy via GitHub Actions (optional)
The repository also ships with a `Release` GitHub Actions workflow that performs the same deployment from inside CI. The workflow is set to `workflow_dispatch:` only โ it does **not** run on push. This path is **optional** and useful if you mirror this repo to another host (e.g. GitLab) or prefer keeping deployments self-contained in GitHub Actions instead of relying on Supabase's integration.
##### Secrets
> [!TIP]
> Create the secrets at GitHub > Repository > Settings โ๏ธ > Secrets and variables *๏ธโฃ > Actions > Secrets
- **SUPABASE_ACCESS_TOKEN**: A
personal access token
- **SUPABASE_DB_PASSWORD**
- **SUPABASE_SERVICE_ROLE_KEY**: you can use a secret key instead of the legacy service role key
##### Variables
> [!TIP]
> Create the variables at GitHub > Repository > Settings โ๏ธ > Secrets and variables *๏ธโฃ > Actions > Variables
- **SUPABASE_PROJECT_ID**
- **SUPABASE_SESSION_POOLER_HOST**: it is like `aws-0-us-east-1.pooler.supabase.com`
##### Release
> [!TIP]
> Go to GitHub > Repository > Actions โถ๏ธ >
This procedure aligns with modern serverless deployment patterns and leverages Supabase’s GitHub integration, which simplifies CI/CD for database migrations and edge functions.
Verdict: who should consider openbsp api
OpenBSP API is well suited for teams and developers looking to build scalable WhatsApp Business solutions with AI agent integration. Its clean separation of concerns and support for multiple agent frameworks make it a practical choice for projects that expect to evolve or switch AI providers over time.
The reliance on Supabase and GitHub Actions simplifies deployment but may constrain teams with strict on-prem or alternative infrastructure requirements. Also, the platform respects WhatsApp’s 24-hour messaging window, which is a hard limit imposed externally.
For anyone needing a multi-tenant, serverless-ready WhatsApp Business API platform that can integrate with agent frameworks like OpenAI or Claude, OpenBSP API provides a solid foundation with a clear architectural pattern worth adopting or adapting.
Related Articles
- Supabase: composable open-source backend-as-a-service built around Postgres โ Supabase combines specialized open-source tools around Postgres to offer a Firebase-like backend platform. Its modular a
- Exploring the Model Context Protocol with awesome-mcp-servers: a curated directory of MCP server implementations โ awesome-mcp-servers is a curated list of Model Context Protocol (MCP) servers enabling AI models to interact securely wi
- OpenBB’s Open Data Platform: Unified financial data integration for diverse analytics and AI โ OpenBB’s Open Data Platform offers a unified “connect once, consume everywhere” layer bridging financial data sources wi
- Jan: a local-first desktop app for large language models with Tauri and Rust โ Jan is an open-source desktop app that runs large language models locally using Tauri, Node.js, and Rust. It offers priv
- LobeHub: An extensible AI agent playground with MCP plugin architecture โ LobeHub offers a TypeScript-based AI agent platform with a unique MCP plugin system for integrating 10,000+ skills and c
โ GitHub Repo: matiasbattocchia/open-bsp-api โญ 243 ยท TypeScript