Skip to main content

Guardian Layer in your stack

Guardian Layer sits between sensitive data and anything that shouldn't see it. You can use it in two ways.

On its own, in front of anything​

Your backend sends data to Guardian Layer and passes on only the safe version: to an LLM, a database, an analytics tool or a third party.

Your system
Your appChats, forms, uploads, tickets.Jane Smith, 415-555-0123
Your backendHolds the API key and calls Guardian Layer.
Guardian LayerFinds personal data and transforms, masks or labels it.[NAME], [PHONE]
Any LLMOpenAI, Claude, Gemini or your own
StorageDatabases, logs, data lakes
Other servicesAnalytics, vendors, support tools
Call Guardian Layer from your backend, before data reaches anything you don't fully control.

Call it from your backend, not the browser. The API key is a secret, and your server should own logging, retries and usage limits.

Inside a Custodian Agent​

Set privacy_enabled on an agent and the same masking runs on every message. Details are sanitized on the way in, and the reply is rehydrated on the way out. You don't make any extra calls.

UserSends a message.Hi, I'm Dana Reyes
1. SanitizeReplaces personal details before the model.Hi, I'm [PII_1]
ModelWrites the reply. Only ever sees the stand-ins.Thanks [PII_1]…
2. RehydratePuts the real details back in the reply.Thanks Dana Reyes…
UserGets a complete answer.
No extra code: set privacy_enabled and this runs on every message.

See the private agent template and Privacy masking.

Pick a call​

You haveYou wantCall
TextTo see what's sensitive firstanalyze_proprietary()
TextReadable de-identified textdeidentify_text_outputs() with transform
TextValues visibly goneThe same, with redact
TextValues replaced by labels like [NAME]The same, with placeholder
A fileA de-identified file backdeidentify_file()
An agentPII sanitized before the model, reply rehydrated afterprivacy_enabled on the agent

See also​

Guardian Layer overview · Mask PII before any LLM · Guardian Layer API