# Tenet Labs > Tenet Labs documentation — Tenet Guardrails (hosted guardrails for agent tool calls, served by the Judge API) and PII Engine (Enterprise), de-identification that runs in your own AWS account. - [Tenet Guardrails](https://docs.tenetlabs.com/index.md): Tenet Guardrails for agent harnesses — every tool call judged by the Judge API for compliance risk before it runs, and after it returns. - [What is Tenet](https://docs.tenetlabs.com/what-is-tenet.md): The compliance runtime for AI in regulated industries — pre-action enforcement at the tool boundary, with the audit trail to prove it. - [Quickstart](https://docs.tenetlabs.com/quickstart.md): Gate your first tool call with the Tenet judge — install, authenticate, evaluate. Under five minutes. - [Authentication](https://docs.tenetlabs.com/authentication.md): Authenticate Judge API calls with an API key from platform.tenetlabs.com, or with M2M credentials issued by Tenet. - [Agent integration](https://docs.tenetlabs.com/agent-integration.md): A self-contained spec for AI agents adding Tenet Guardrails to a harness — detection, integration, verification, in one page. - [Multi-verdict responses](https://docs.tenetlabs.com/concepts/multi-verdict.md): One /decide endpoint, per-domain findings under a single merged top-level verdict. A client reading only the top-level verdict is safe by construction. - [Read-intent & wire contract](https://docs.tenetlabs.com/concepts/read-intent.md): The top-level intent field, the tool_post-only read-intent safety contract, and the X-Tenet-Api-Version header the SDK sends to /decide. - [Surfaces](https://docs.tenetlabs.com/concepts/surfaces.md): The surface field tells the judge which recruiting action it's judging — five canonical values, chosen per request. The judge reads it with the request, so a wrong surface misframes the ask. - [Tool context](https://docs.tenetlabs.com/concepts/tool-context.md): How to pass tool data on a judge call — context.tool_input, tool_description, tool-role messages — and why the facts of a call move a verdict where the tool's name does not. - [How the Judge decides](https://docs.tenetlabs.com/concepts/decisions.md): Phases, verdicts, severity, how a decision is reached, and the rule chain — the vocabulary every Tenet integration shares. - [Verdict Traces](https://docs.tenetlabs.com/concepts/traces.md): Every decision returns a verdict and a decision_id correlation key, with a matching record on Tenet's side. Log both — your log is the audit trail. - [LangChain middleware](https://docs.tenetlabs.com/guides/langchain.md): TenetJudgeMiddleware gates every tool call in a create_agent loop — one constructor argument, fail-closed defaults. - [Policies](https://docs.tenetlabs.com/guides/policies.md): JudgePolicy maps verdicts to actions — you own what happens on allow, review, block, and failure. Defaults are fail-closed. - [Human-in-the-loop review](https://docs.tenetlabs.com/guides/hitl.md): Turn review verdicts into a real pause — interrupt the graph, render the review over SSE, resume on approval without re-judging. - [Severity and review rates](https://docs.tenetlabs.com/guides/tuning.md): What to do with severity, which thresholds you own, and how to tune your review rate without weakening the gate. - [Verdict-first streaming](https://docs.tenetlabs.com/guides/streaming.md): POST /decide/stream sends the verdict as its first content event, ahead of PII and safety findings — block at verdict, allow side effects only at done. - [Voice guardrails](https://docs.tenetlabs.com/guides/voice.md): Judge a voice-agent turn in real time — transcript rails plus transcript-independent acoustic detectors, streamed over SSE with the verdict ahead of the audio layer. - [Framework-free integration](https://docs.tenetlabs.com/guides/framework-free.md): Gate any Python function with @judged, or call the judge directly when you own the tool loop. No LangChain required. - [tenet-client](https://docs.tenetlabs.com/sdk/tenet-client.md): Python SDK reference — TenetCloudJudgeClient, response models, policies, and the @judged decorator. - [tenet-langchain](https://docs.tenetlabs.com/sdk/tenet-langchain.md): LangChain integration reference — TenetJudgeMiddleware, read intent, HITL display helpers, and adjacent classes. - [API overview](https://docs.tenetlabs.com/api-reference/introduction.md): The Judge API wire protocol at judge.tenetlabs.com — REST + SSE, bearer auth, snake_case throughout. - [Decide](https://docs.tenetlabs.com/api-reference/decide/decide.md): Synchronous evaluation. Blocks until the verdict is ready. A deterministic guard hit or an operational ask returns with no model call; everything else waits on one judge model call. `latency_ms` on the response is the end-to-end server time. To act on the verdict before the merged response is comple… - [Decide (streaming)](https://docs.tenetlabs.com/api-reference/decide/decide-streaming.md): Verdict-first Server-Sent Events. Events arrive in a locked order: `request_accepted` → `verdict` → optional `pii_findings` → optional `verdict_revised` → `explanation_chunk`* → `rewrite_chunk`* → optional `safety_findings` → `done` (the current judge emits no `explanation_chunk` / `rewrite_chunk`;… - [Voice decide (streaming)](https://docs.tenetlabs.com/api-reference/voice/voice-decide-streaming.md): **Preview.** Judge one voice-agent turn as Server-Sent Events. The transcript is scanned by the same injection + PII rails that judge text; the audio is judged directly by transcript-independent acoustic detectors, and the two fuse most-restrictive-wins. Events arrive in a locked order: `request_acc… - [Liveness](https://docs.tenetlabs.com/api-reference/health/liveness.md): Process is alive. No bearer token required. - [Readiness](https://docs.tenetlabs.com/api-reference/health/readiness.md): Config is loaded and the service can decide. 503 until then. Requires a bearer token — without one it returns `401`. Some `401` responses carry no error envelope, so branch on the status code. - [Warmup](https://docs.tenetlabs.com/api-reference/health/warmup.md): Reports whether the config is loaded. Not called by the SDK's `warmup()`, which only pre-mints the access token. Requires a bearer token — without one it returns `401`. Some `401` responses carry no error envelope, so branch on the status code. - [Config introspection](https://docs.tenetlabs.com/api-reference/health/config-introspection.md): Non-secret runtime config — which surfaces are live, the config version, and the PII detection tier serving your requests. Use it to debug 'which policy bundle am I actually hitting?' and 'is PII detection degraded?'. Requires a bearer token. - [Changelog](https://docs.tenetlabs.com/changelog.md): New releases and improvements across Tenet Guardrails — the Judge API and the Python SDKs. - [PII Engine (Enterprise)](https://docs.tenetlabs.com/pii-engine/overview.md): De-identification that runs in your AWS account: text in, typed placeholders out, originals sealed so only a separate, IAM-gated and audited rehydrate service can open them. Callers sign with their own IAM role through VPC Lattice. - [Quickstart](https://docs.tenetlabs.com/pii-engine/quickstart.md): Subscribe, deploy with CloudFormation, then prove it works from inside your VPC: a signed de-identify → re-identify round trip through VPC Lattice and the audit record that names your IAM role. - [Using these docs with an AI agent](https://docs.tenetlabs.com/pii-engine/agents.md): How Claude Code, Cursor and other agents read these docs — llms.txt, Markdown page variants, the docs MCP server — plus one master prompt that takes an agent from zero to a verified PII Engine deployment. - [Subscribe and get the image](https://docs.tenetlabs.com/pii-engine/get-started/marketplace.md): Subscribe through AWS Marketplace, download the release artifacts (template, Terraform module, client, signed release record), and verify the image against the record. Every Region pulls the image from the Marketplace registry — no copy. - [Prerequisites](https://docs.tenetlabs.com/pii-engine/deploy/prerequisites.md): What the account needs before any deploy path: a VPC with no NAT in VPC Lattice–supported AZs, the exact VPC endpoint list, a customer-managed KMS key and its encryption-context rules, Aurora PostgreSQL, an S3 Object Lock audit bucket, and the IAM roles. - [Deploy on EKS with Helm](https://docs.tenetlabs.com/pii-engine/deploy/eks-helm.md): Install the tenet-pii-enterprise Helm chart on Amazon EKS: detect and rehydrate as separate Deployments with separate IRSA roles, each behind its own VPC Lattice service with a per-route IAM auth policy. - [Deploy on ECS with CloudFormation](https://docs.tenetlabs.com/pii-engine/deploy/ecs-cloudformation.md): One CloudFormation template deploys the image into an existing no-NAT VPC: KMS key, Aurora vault, Object Lock audit bucket, VPC endpoints, VPC Lattice services with per-route IAM auth policies, and detect and rehydrate on ECS (Graviton). - [Deploy on ECS with Terraform](https://docs.tenetlabs.com/pii-engine/deploy/terraform.md): The Terraform module deploys the same ECS-on-EC2 stack as the CloudFormation template — KMS, Aurora vault, Object Lock audit bucket, endpoints, VPC Lattice services with IAM auth policies, detect and rehydrate — with no shared secrets. - [Placeholders and sessions](https://docs.tenetlabs.com/pii-engine/concepts/placeholders-and-sessions.md): What /deidentify writes into your text ([LABEL_N] placeholders), how sessions scope, expire and erase the placeholder map, and the rules a downstream consumer or prompt must follow. - [Rehydration and audit](https://docs.tenetlabs.com/pii-engine/concepts/rehydration-and-audit.md): Who can re-identify and how it's enforced: per-caller IAM through VPC Lattice, per-route auth policies, the approval tag, KMS isolation, and audit before plaintext — plus the reidentify v3 and erasure v1 record schemas. - [Subscription and metering](https://docs.tenetlabs.com/pii-engine/concepts/billing.md): How PII Engine (Enterprise) is billed through AWS Marketplace metering: the detect service's startup entitlement check and hourly usage reports, what never affects a request, the IAM and endpoint it needs, and the unreported-usage alarm. - [Architecture](https://docs.tenetlabs.com/pii-engine/concepts/architecture.md): The in-VPC reference architecture: component diagram, every network edge and what crosses it, VPC Lattice caller auth, the KMS key-pair design that keeps detect out of the vault, and the IAM role-by-permission matrix. - [Sizing](https://docs.tenetlabs.com/pii-engine/operate/sizing.md): Measured /deidentify throughput and latency per document size on c9g.xlarge, how many detect replicas to run for your peak, the conditions behind the numbers, and how to scale with CPU target tracking or an HPA. - [Upgrades](https://docs.tenetlabs.com/pii-engine/operate/upgrades.md): Roll out a new release: read its release notes, verify the release record, update one value per deploy path, what happens to capacity, and how to roll back. - [Key rotation](https://docs.tenetlabs.com/pii-engine/operate/key-rotation.md): Rotate the vault key pair with tenet-pii-enterprise rotate-key, then roll the services so new writes use it. Old sessions keep restoring; old key pairs are never deleted. Plus how this differs from KMS key rotation. - [Backup and restore](https://docs.tenetlabs.com/pii-engine/operate/backup-restore.md): What to back up and why: the Aurora vault (short-lived sessions plus the wrapped key-pair keyring), the Object Lock audit bucket (the durable record of rehydrations and erasures), and the KMS key both depend on. Restore steps and DR choices. - [Monitoring](https://docs.tenetlabs.com/pii-engine/operate/monitoring.md): What the services and VPC Lattice log, how to read readiness when the probes aren't routed through Lattice, the CloudWatch metric filters and alarms to create (audit and erasure failures, 403 spikes, metering, readiness, vault), and the counts-only usage records you can hand an auditor. - [Break-glass access](https://docs.tenetlabs.com/pii-engine/operate/break-glass.md): The MFA-gated break-glass role for emergency re-identification: who can assume it, what it may call (POST /reidentify without the approval tag), the runbook, and how its use shows up in CloudTrail and the audit trail. - [Troubleshooting](https://docs.tenetlabs.com/pii-engine/troubleshooting.md): Symptom → cause → fix for PII Engine (Enterprise) failures: 403 and 404 from VPC Lattice or the service, caller timeouts, Marketplace entitlement refusals, KMS AccessDenied, Object Lock and audit 503s, Lattice service lookup on EKS, ECS in a no-NAT VPC, CloudFormation and Aurora errors, Pending pods… - [Shared responsibility](https://docs.tenetlabs.com/pii-engine/security/shared-responsibility.md): What Tenet owns and what you own when PII Engine (Enterprise) runs in your AWS account: image, patching, keys, data, IAM and callers, network, audit, backups, billing, telemetry, support and compliance. - [Data flow](https://docs.tenetlabs.com/pii-engine/security/data-flow.md): Where PHI and PII go in a PII Engine (Enterprise) deployment, what is stored where and for how long, who can read it, and what leaves the account — laid out for a HIPAA risk analysis. - [Attestation](https://docs.tenetlabs.com/pii-engine/security/attestation.md): What the engine's Safe Harbor–aligned attestation records and what it does not: output_is_phi is three-state (never False under Safe Harbor), requires_review is always true, and residue_detected is the field to route review on. - [API overview](https://docs.tenetlabs.com/pii-engine/api-reference/introduction.md): The PII Engine (Enterprise) wire protocol: detect (/detect, /redact, /deidentify, DELETE /sessions) and rehydrate (/reidentify) behind VPC Lattice, IAM SigV4 per caller, JSON in and out, snake_case throughout. - [Liveness](https://docs.tenetlabs.com/pii-engine/api-reference/health/liveness.md): Liveness: `{"status": "ok", "version": ""}`. Never needs the model. Not routed through VPC Lattice. - [Readiness](https://docs.tenetlabs.com/pii-engine/api-reference/health/readiness.md) - [Detect PII](https://docs.tenetlabs.com/pii-engine/api-reference/detect-service/detect-pii.md): Detect PII spans in `text`. Returns typed findings with character offsets. Nothing is stored. - [Redact text](https://docs.tenetlabs.com/pii-engine/api-reference/detect-service/redact-text.md): Detect, then rewrite the text with each span replaced by `strategy` (`mask`, `last_four`, `hash_prefix`, `drop`). Nothing is stored; the mapping is not recoverable. - [De-identify text](https://docs.tenetlabs.com/pii-engine/api-reference/detect-service/de-identify-text.md): Replace every detected span with a typed placeholder (`[EMAIL_1]`, `[FIRST_NAME_1]`) and store the originals in the vault under a session, each sealed to the current vault key pair's public key. The detect service can't decrypt them. Omit `session_id` to start a new session; pass a server-issued one… - [Erase a session](https://docs.tenetlabs.com/pii-engine/api-reference/detect-service/erase-a-session.md): Erase a session and its stored values. Allowed only to roles in the erasure invoker list. Each erasure writes a `tenet.erasure-audit.v1` record before anything is deleted. Always 204, including for unknown or already-deleted ids. - [Re-identify text](https://docs.tenetlabs.com/pii-engine/api-reference/rehydrate-service/re-identify-text.md): Restore the placeholders in `text` from the session's vault entries. Substitution is single-pass and allowlist-only: a placeholder this session never issued is left as-is and listed in `unresolved`. Every call that passes auth writes one `tenet.reidentify-audit.v3` record, naming the caller's role s… ## OpenAPI Specs - [openapi](/api-reference/openapi.json) - [openapi](/pii-engine/api-reference/openapi.json) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.