All thoughts

Building Under Zero Data Retention

How we ship agentic apps with ZDR constraints using an MCP gateway, RBAC, and data classification.

How it works

Every request goes through the gatewayFive blocks joined by arrows. Only the gateway is gold.1. Agent: sends a request. 2. Gateway: ZDR, RBAC, audit (highlighted). 3. Router: picks a provider. 4. Model: no-retention mode. 5. Tools: gated by role. 01Agentsends a request02GatewayZDR, RBAC, audit03Routerpicks a provider04Modelno-retentionmode05Toolsgated by role
Select a step to see what it does.
Nothing talks to a model or a tool directly. The gateway is the gold step: it enforces retention, roles and the audit log on every request.

Zero Data Retention (ZDR) is the constraint that shapes how we build agentic apps at our healthcare marketing agency.

No training on customer data. No retention by the model provider. No leakage outside the secure gateway.

The constraint

Healthcare marketing operates under strict data privacy and compliance rules. Client data cannot train external models. Prompts cannot be retained by OpenAI, Anthropic, or anyone else.

This is not optional. It's the floor.

The architecture

We built a secure AI gateway that enforces ZDR at the infrastructure level:

The MCP gateway

Our AI gateway sits on an MCP gateway platform. Every request flows through the gateway. The gateway enforces:

  • Zero Data Retention: API calls configured for no-retention mode
  • RBAC: Role-based access control at the tool level
  • Audit: Every request logged, traceable, reviewable
  • Data Classification: Sensitive data tagged and restricted

Model routing

A multi-model router for access to several providers. Claude, GPT, Llama, all behind the ZDR gateway. No direct API calls from agents. Everything proxied, everything audited.

Tool access

MCP (Model Context Protocol) into our data platforms and internal systems. Tools are permission-gated. If your role doesn't allow database writes, the agent can't write to the database.

RBAC at the tool level, not the prompt level.

My take

Under ZDR, we ship production systems and design new ones on the same floor:

  • Dera Intelligence (production): Social listening with RAG on agency taxonomy, no client data leakage
  • SKYbuddy (production): Self-hosted assistant for 250 employees, zero external data flow
  • A brand-content app (in build): Agentic AI for pharma marketing under compliance constraints, designed for the same ZDR gateway, not yet shipping alongside the production systems above

Dera and SKYbuddy already route through the gateway. The brand-content app is being built to the same standard.

Building under ZDR requires discipline:

  • No shortcuts around the gateway
  • No "just this once" direct API calls
  • No storing prompts or outputs in unaudited locations
  • No tool access without RBAC

The constraint is the architecture. The architecture is the product.

We ship agentic apps under Zero Data Retention. Clients trust us because the constraint is baked in, not bolted on.

That's how you build in healthcare. That's how you build under ZDR.

Try this

  1. List every place an agent calls a model or a tool directly, outside your gateway. Each one is a "just this once" waiting to happen.
  2. Write tool permissions per role, at the tool level instead of in the prompt.