End-to-end demos that show what becomes possible when an autonomous agent has access to a real identity, a real inbox, a real vault, and a real signing key — all through the Mailgent MCP.
| # | Use case |
|---|---|
| 1 | Autonomous Shopper — an agent completes a real e-commerce purchase using credentials it pulls from its own Mailgent vault, then signs and emails the receipt back to itself |
| 2 | Autonomous Heroku Login — an agent logs into the Heroku dashboard end-to-end, including the TOTP step, using vault.totp to generate the live 6-digit code |
An agent receives a single instruction ("buy this") and uses Mailgent to fetch its own email, billing address, and payment card from the vault, drives a real WooCommerce checkout in a real browser, places the order, signs the receipt with its identity key, and mails the signed confirmation back to itself.
No selectors. No fabricated data. No human in the loop.
- Identity — the agent discovers its own email and DID via
identity.whoami. Nothing is hardcoded. - Vault — payment card and shipping address are retrieved from
vault.getat runtime. Sensitive data never appears in source. - Mail — the receipt confirmation lands back in the same inbox the agent operates from.
- Signing — the order payload is signed with the agent's Ed25519 key (
identity.sign). Anyone can verify it viaidentity.verifyagainst the agent's published DID.
┌──────────────────────┐ ┌──────────────────────────┐
│ Agent runtime │ HTTPS │ Storefront │
│ │ ──────▶ │ │
│ • browser-use │ │ • WordPress + WC │
│ • Mailgent MCP client │ │ • Stripe (test mode) │
│ • Chromium │ │ • Caddy + Let's Encrypt │
└────────┬─────────────┘ └────────┬─────────────────┘
│ │
│ MCP (stdio) │ SMTP
▼ ▼
┌──────────────────────┐ ┌──────────────────────────┐
│ Mailgent │ │ Outbound mail provider │
│ identity / vault / │ │ (delivers to the │
│ mail / signing │ │ agent's Mailgent inbox) │
└──────────────────────┘ └──────────────────────────┘
| Mailgent account + API key | Source of identity, vault, and inbox |
Two Mailgent vault entries: checkout-card, shipping-address |
What the agent fills the checkout with |
| OpenAI or Anthropic API key | Powers the agent's reasoning |
| A reachable storefront (this repo provides one) | What the agent shops on |
| Python 3.11+ and Node.js 20+ | Agent runtime + MCP transport |
The store is a self-contained Docker stack: WordPress + WooCommerce + Storefront theme + Stripe (test mode) + outbound mail + Caddy with auto Let's Encrypt.
git clone https://github.com/mailgent-dev/mailgent-demos.git
cd mailgent-demos/store
cp .env.example .env
# Edit .env:
# DOMAIN=your-store.example.com
# STRIPE_TEST_PUBLISHABLE_KEY / STRIPE_TEST_SECRET_KEY
# SES_* (or any SMTP provider Caddy can route through)
docker compose up -d --build
./seed/seed.shPoint the DOMAIN A record at the host's public IP, allow ports 80 + 443,
and Caddy fetches a Let's Encrypt certificate on first start.
When the seed completes, browse https://<DOMAIN>/shop — the catalog
shows five products. See store/README.md for full
details.
The agent reads two entries from the Mailgent vault. Store them once via any Mailgent MCP client:
The card above is Stripe's 3DS test card — it triggers an OTP-at-checkout challenge that ordinary scripted agents cannot complete. This demo handles it end-to-end.
cd mailgent-demos/shopper
uv venv .venv --python=3.11
source .venv/bin/activate
uv pip install "browser-use>=0.3.0" python-dotenv
npx playwright install chromium
cp .env.example .envFill in .env:
# LLM
MODEL_PROVIDER=openai # "openai" or "anthropic"
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=
# Mailgent — issued from the Mailgent dashboard
MAILGENT_API_KEY=loid-...
# The storefront URL from Step 1
STORE_URL=https://your-store.example.com
# What to buy (must match a product title)
TARGET_PRODUCT=Mailgent Hoodiepython run.pyThe agent will:
- Fetch its own identity and vault credentials from Mailgent.
- Open the storefront in a Chromium window.
- Add the target product to the cart and proceed to checkout.
- Fill every required field with values pulled from Mailgent — never inventing data.
- Place the order and resolve any 3DS challenge.
- Sign the order receipt with
identity.sign. - Send the signed receipt to its own Mailgent inbox via
mail.send.
Verification: the most recent message in the agent's Mailgent inbox is the signed receipt, complete with the order ID, total, and signature.
| Conventional agents | An agent on Mailgent |
|---|---|
| Credentials live in code or environment variables | Credentials live in an encrypted vault, fetched at runtime |
| Forms get filled with fabricated or shared placeholder data | Every value typed comes from a real, owned source |
| Email confirmations land in a developer's inbox | They land in the agent's own inbox, separate from any human's |
| Receipts are unsigned plaintext | Every action is cryptographically signed and externally verifiable |
| Brittle on real checkout flows (iframes, 3DS) | Vision-based browser control handles modern checkout natively |
mailgent-demos/
├── store/ WooCommerce stack the agent shops on
│ ├── docker-compose.yml
│ ├── Dockerfile custom WP image — plugins + theme baked in
│ ├── Caddyfile reverse proxy + auto Let's Encrypt
│ ├── mu-plugins/ force-HTTPS plugin for proxied setups
│ └── seed/ one-shot installer + product catalog
└── shopper/ the autonomous shopper
├── run.py the agent in under 150 lines
└── .env.example
| Symptom | Likely cause |
|---|---|
Missing API key error |
The .env does not contain the key for the chosen MODEL_PROVIDER |
Invalid MAILGENT_API_KEY |
Re-issue the API key from the Mailgent dashboard |
Agent fabricates data instead of calling vault.get |
Smaller models occasionally skip tool calls; switch MODEL_PROVIDER to anthropic for higher reliability |
| Chromium fails to launch | Run npx playwright install chromium once |
vault.get returns empty |
Verify both entries exist via vault.list |
| Storefront unreachable | Confirm STORE_URL resolves and serves the shop page over HTTPS |