Reference integration

Claude Agent SDK

A scheduling agent built on the Claude Agent SDK and mailbuttons. Five end-to-end scenarios; same harness in TypeScript and Python.

A 60-second walkthrough GIF will live here. Until then:

  1. Clone (one repo per language, both linked below).
  2. Set two environment variables: MAILBUTTONS_API_KEY, ANTHROPIC_API_KEY.
  3. Run one command.
  4. Send the agent an email and watch the reply.

TypeScript

git clone https://github.com/mailbuttons/claude-scheduling-agent-ts
cd claude-scheduling-agent-ts && npm install
MAILBUTTONS_API_KEY=sk_... ANTHROPIC_API_KEY=sk-ant_... npm start
github.com/mailbuttons/claude-scheduling-agent-ts →

Python

git clone https://github.com/mailbuttons/claude-scheduling-agent-py
cd claude-scheduling-agent-py && uv sync
MAILBUTTONS_API_KEY=sk_... ANTHROPIC_API_KEY=sk-ant_... uv run python -m claude_scheduling_agent
github.com/mailbuttons/claude-scheduling-agent-py →

What you'll see

On startup the agent registers a webhook with mailbuttons and starts listening on localhost. Send an email to your mailbox; the policy gate evaluates, the agent runs, and a reply lands in the original sender's inbox.

The repo includes five scripted scenarios that you can run with npm test / pytest — boss-books, unknown-sender bounce, DKIM-required, calendar-bot read-only, prompt-injection rejection.