Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

0017 What v1.0 adds, defers and refuses to match AgentMail

StatusProposed
Date2026-10-17
DecidersThe owner (TREFT LTD)
RelatedAgentMail comparison and gap register, PRD § 4 and § 5, ADR 0015, ADR 0016

Context

Pylota is moving its mail off AgentMail, so Pylota Identity must cover everything Pylota uses there. The owner asked on 2026-10-17 for AgentMail to be analysed as a product, for Pylota Identity to be compared with it, and for every gap that Pylota Identity needs closed to be closed. The bar was to exceed production standards end to end, handle every edge case, and work with Pylota’s agentic OS.

The analysis read AgentMail’s public OpenAPI document (180 operations), its AsyncAPI document, 143 documentation pages, its pricing, and two REA runtime captures of its site. All of it was read on 2026-10-17. The gap register lists 32 gaps. Before this record, the PRD made drafts and scheduled send a v1.0 non-goal (“planned for v1.1”). It also listed WebSocket push as P2. A coding agent reading the PRD would therefore build neither, and Pylota’s approval gate and its webhook reconciliation would have nothing to stand on.

Decision

  1. v1.0 adds the following. Each is specified on its own design page, with requirements, edge cases, tests and a milestone:

    FeaturePageRequirementsEdge rowsMilestone
    Drafts, approval before send, scheduled sendDraftsFR-DRFQM29
    Event feed, durable consumers, live streamEvent feedFR-EVTRM30
    Screening hold for mail that steers agentsScreeningFR-SCRTM31
    Calendar invitations (iMIP in and out, no calendar store)Calendar invitationsFR-CALVM32
    Uploads for attachmentsUploadsFR-UPLQ (Q65–Q108)M33
    Agent self-sign-up, behind PM_AGENT_SIGNUP (off by default)Agent self-sign-upFR-ASUXM34
    Deliverability metricsMetricsFR-METYM35
    TypeScript SDK (built in its own repository, ADR 0018), skills, MCP and CLI tooling for agentsSDKs and skillsFR-SDK-2 onwardYM36
    Batch operations, mailbox-scope lists, label events, authentication domains, trusted ARC sealers, per-mailbox retention, webhook headers, zone-file export, error documentation linksParity additionsexisting familiesZM37

    The PRD non-goal “Scheduled send and server-side drafts (planned for v1.1)” is removed, and so is the P2 entry “WebSocket push”.

  2. One send path. A draft, a scheduled send and a calendar reply each become an outbound message through the existing send pipeline. That pipeline covers policy, holds, the thread lock, idempotency and uncertain. No feature adds a second way to send.

  3. One event log. Webhooks, the pull feed, durable consumers and the stream all read the same per-tenant log, and every channel uses the same evt_ ID as its deduplication key.

  4. Deferred to v1.1 or later. Each item has a reason:

    • MCP OAuth 2.1 stays deferred as ADR 0016 decided.
    • Public-key API credentials are deferred. Pylota’s agents never hold a bearer secret, because Pylota’s servers hold its keys. A design must name its signature scheme and replay window, which AgentMail does not document.
    • An OIDC-compatible “sign in as this agent” relying-party flow is deferred. v1.0 has signed assertions, a published JWKS and the service sign-up ledger.
    • A second Cloud jurisdiction is deferred; it is an owner decision with its own cost.
    • Pay-per-call through x402 or MPP is deferred. Plans are in GBP through Stripe; revisit when MPP is generally available to UK merchants.
    • Mailbox avatars (BIMI) are deferred to a guide.
    • Arabic reply attribution waits for a conformance sample from real clients; a pattern is never guessed (GAP-21).

    Each deferral is a P2 entry in PRD § 5.

  5. Refused. The reasons are in the gap register § 5:

    • an IMAP or SMTP server;
    • open tracking;
    • a calendar store with an agenda and a recurrence engine;
    • general file storage;
    • fetching attachments from a URL.
  6. The competitive table is corrected. PRD § 4 gets the rows below, researched on 2026-10-17, in place of the AgentMail cells researched on 2026-10-09:

    CapabilityAgentMail (hosted)Pylota Identity
    Authentication verdicts and quarantine before an agent readsauthentication_results; unauthenticated and spam mail hidden by label; DMARC-failing mail dropped under an enforcing policyPer-message verdicts. Mail that Cloudflare Email Routing rejects for failing authentication never reaches the Worker; failing mail the Worker receives is quarantined with a reason. Nothing is accepted and then dropped silently (U5)
    Prompt-injection screeningAgent Armor (Labs, US only): advisory verdict; Hold mode withholds a notification but still lists the mailOpt-in screening hold (screening.mode: hold; the default monitor only records verdicts) that hides mail until a verdict; once held, it fails closed by default; release by a person (Screening)
    Drafts and scheduled sendYes; approval works only by withholding send permissionsYes, with approval bound to the content; on Cloud only a person approves, unless the partner opts its tenants in to key approval (drafts.key_approval) (Drafts)
    Event deliveryWebhooks (8 attempts in ~27.5 h, auto-disabled after 5 days without notice), polling queue, WebSocket (key in the URL)Webhooks (72 h, dead letters, replay; an endpoint is disabled after 100 consecutive failures over at least 24 h, and webhook.disabled reaches platform and partner endpoints, never the tenant’s own), ordered pull feed, durable consumers, resumable stream (Event feed)
    CalendarPer-inbox calendar store (Labs, US only)Verified iMIP in and out; the consumer’s calendar keeps state (Calendar invitations)
    Team seats2 / 2 / 10 by planEnforced, with roles (U7)
    Erasure with receiptsDelete per message, thread and inbox; optional 24 h expiryMessage, thread, counterparty, identity, tenant, with receipts (U6); per-mailbox retention (FR-PRV-7, P1)
    Runs in your own cloud“BYO cloud deployment” on EnterpriseRuns in your own Cloudflare account (U6)
    SDKsPython, TypeScriptRust, TypeScript (SDKs and skills)
    Agent self-sign-upYes; the human is optionalYes, behind a flag; the accountable human is required (FR-IDN-2)

Integration

The nine pages were written as new files while PR #5 was still editing the shared pages, then folded into those pages on 2026-10-18, on top of PR #5’s final head (97ba036):

  1. SUMMARY.md lists the nine design pages, the gap register and this record.
  2. prd.md:
    • § 4 drops the two superseded non-goals, adds the refusals as non-goals with their reasons, and carries the competitive rows of Decision 6.
    • § 5’s scope table gains the new features, and its P2 column the deferrals of Decision 4.
    • § 6 gains § 6.16–§ 6.22 (FR-DRF, FR-EVT, FR-SCR, FR-CAL, FR-UPL, FR-MET, FR-ASU). FR-SDK-2 onward join § 6.11, and the parity additions’ requirements join their existing sections.
  3. The reference pages carry the routes, schemas, errors, events, limits, policy fields, MCP tools and CLI commands: api.md, openapi.yaml, errors.md, events.md, limits.md, configuration.md, mcp.md and cli.md. errors.md, the ErrorCode enum and the routes’ x-error-codes list the same 161 codes.
  4. The design pages each feature extends carry its storage, rules and operations.
  5. architecture.md has the seventh Durable Object class (TenantEvents) and the pm-screen queue.
  6. edge-cases.md has sections Q (drafts and uploads), R, T, V (calendar), X, Y and Z.
    • Calendar rows use V and uploads rows join Q as Q65–Q108. U would collide with the PRD’s selling points U1–U10, and every other free letter already names something: M milestones, P priorities and S spikes.
  7. build-plan.md has M29–M37 in its dependency graph, before M20.
  8. design/testing.md has the new test modules and prefixes.

Still open: the Arabic attribution pattern for reply extraction waits for a conformance sample (GAP-21). The phase timeline in the build plan has not been re-estimated for the nine milestones.

Consequences

  • v1.0 grows by nine milestones. The owner builds alone (ADR 0015), so these milestones follow the core tracks rather than run in parallel with them. Their dependencies are in each milestone’s text.
  • Pylota’s integration spec gains a list of additions; each design page names them under “Pylota agentic OS”. The largest are:
    • drafts for every untrusted sender path;
    • screening hold on operator identities;
    • feed-based reconciliation;
    • Kairos invitations through Pylota Identity;
    • the TypeScript SDK in place of a hand-written client.
  • New public claims are allowed only once their tests pass, as § U1–U10 require.
  • AgentMail ships often. The gap register must be re-read against AgentMail’s changelog before v1.0 ships.

Alternatives considered

  • Keep drafts and the stream in v1.1. This is cheaper for v1.0. But Pylota’s approval gate needs server-side drafts to hold an agent’s mail for an operator, and its webhook monitoring needs a feed to reconcile from. Without them, Pylota would keep AgentMail for those paths, which defeats the move.
  • Copy AgentMail’s surface one for one. This would give AgentMail users the most familiar API. But it would import the weaknesses the gap register records: notification-only holds, silent drops, a key in the WebSocket URL, auto-disabled webhooks without notice, a second calendar store and URL fetching.
  • Build a calendar like AgentMail’s. Agents would get one product for mail and calendar. But Pylota already has Kairos, whose database constraint prevents double booking, and two calendars would disagree.