Use case: AI email agents

Give your agent an inbox, not the send button.

Give your agent an API key with read and write but no send: it follows new mail and saves drafts, and every send is refused.

agent.tsagent.py
import { changes } from "@workwae/sdk";

// An API key with read and write, without send
const feed = changes(workwae.changes.list, {
  cursor: saved,
  types: ["message.created"],
});

for await (const event of feed) {
  if (event.type !== "message.created") continue;
  const { message } = event.data;
  if (message.direction !== "inbound") continue;
  if (!message.from) continue;

  const accountId = event.accountId;
  const full = await workwae.messages.get({
    accountId,
    messageId: message.id,
  });
  const text = await agent.answer(full); // your model

  // A draft in the user's mailbox, for a person to send
  await workwae.drafts.create({
    accountId,
    inReplyToMessageId: message.id,
    to: [{ address: message.from.address }],
    subject: `Re: ${message.subject}`,
    text,
  });
}
await save(feed.cursor);
from workwae import Workwae, changes

workwae = Workwae()

# An API key with read and write, without send
feed = changes(workwae.changes.list, cursor=saved, types=["message.created"])

for event in feed:
    if event.type != "message.created":
        continue
    message = event.data.message
    if message.direction != "inbound":
        continue
    if not message.from_:
        continue

    account_id = event.account_id
    full = workwae.messages.get(account_id=account_id, message_id=message.id)
    text = agent.answer(full)  # your model

    # A draft in the user's mailbox, for a person to send
    workwae.drafts.create(
        account_id=account_id,
        in_reply_to_message_id=message.id,
        to=[{"address": message.from_.address}],
        subject=f"Re: {message.subject}",
        text=text,
    )
save(feed.cursor)
Scoped keys

The agent drafts, a person or a send-scoped service sends.

Owners and admins set a key's scopes (read, write, send, admin) in the console; other calls fail with missing_scope.

read

Messages, threads, search, the change feed, calendars, contacts and outbox tracking.

write

Drafts, labels, events and contacts.

send

Sending, scheduling and cancelling mail, and mail merges; leave it off the agent's key.

What does write still reach?

Calendar events, and events with attendees make the provider send invitations. If the agent must reach no one, give it read only.

API keys or account tokens?

An account token (wat_...) carries every scope, send included, on its one account. Give agents an API key (wk_...) instead, limited to the accounts they need.

How should the agent treat inbound mail?

As untrusted data, never as instructions, since anyone can email your users. Keep sending behind a person or a send-scoped service.

Is there an MCP server?

Yes, live at https://api.workwae.com/mcp. Its tools search and read mail, calendars and contacts, save drafts, and send only with the send scope. Connect with an API key, whose scopes decide which tools the agent sees; your own team can also sign in with OAuth from Claude, ChatGPT, Cursor and other clients that support it, picking scopes and accounts. Your users have no console login, so give each one an MCP key bound to their own account. See the MCP guide.

Early access

Put your agent to work in real inboxes, safely.

We are onboarding a small number of teams. Tell us what you are building.