Deploying with an AI Agent
Pywa Cloud is built so a coding agent (Claude Code, Codex, Cursor and the like) can take a WhatsApp bot from “build me a bot” to a live deployment. This page is for both of you: it says what the agent can do on its own and where it has to stop and ask you.
What a WhatsApp bot needs to be live
Section titled “What a WhatsApp bot needs to be live”A bot on the WhatsApp Cloud API needs a public HTTPS webhook URL that Meta can reach, a verify-token handshake, and a connected phone number. Pywa Cloud supplies the URL and the handshake, runs the bot in its own container, and walks you through connecting the number.
The steps
Section titled “The steps”| Step | Who | Command |
|---|---|---|
| Install | agent | pip install pywa-cloud-cli (or uv tool install pywa-cloud-cli) |
| Sign up, verify the email | you | dashboard.pywa.cloud, then click the link in the email |
| Log in | agent starts it, you approve | pywa login prints a URL and a short code; open it and confirm the code |
| Scaffold (if no project yet) | agent | pywa new --cloud -o my-bot |
| Try it locally against real webhooks | agent | pywa dev --tunnel (Local Development) |
| Deploy | agent | pywa deploy |
| Connect a WhatsApp number | you | pywa cloud connect opens Meta’s Embedded Signup in your browser |
| Redeploy to pick up the number | agent | pywa deploy |
| Logs and status | agent | pywa cloud logs, pywa cloud status |
An agent cannot sign up, verify your email or complete Meta’s signup for you. Those steps need your accounts, so it should stop and ask you to do them.
Unattended and CI use
Section titled “Unattended and CI use”After the first login, create a deploy token and the agent or CI can deploy without a browser:
pywa cloud deploy-tokens create agent --expires-in-days 30export PYWA_CLOUD_TOKEN=<the token>export PYWA_CLOUD_BOT_ID=<bot id>pywa deploySee Deploy tokens for scope and expiry.
Tell your agent about it
Section titled “Tell your agent about it”Add this to your project’s AGENTS.md or CLAUDE.md so every session knows how to ship the bot:
## Deploying
This is a pywa WhatsApp bot hosted on Pywa Cloud (docs: https://docs.pywa.cloud/llms.txt).- Deploy: `pywa deploy` from the project root. Logs: `pywa cloud logs`. Status: `pywa cloud status`.- Secrets: `pywa cloud env set KEY --secret`. Never commit WhatsApp tokens.- Connecting or reconnecting a number (`pywa cloud connect`) and logging in need the user; ask them.Machine-readable docs
Section titled “Machine-readable docs”Every page here is also available as plain markdown (append .md to the URL), the whole site is at
/llms.txt (index) and
/llms-full.txt (everything in one file).