How It Works
AI security architecture: how DeepintShield checks every prompt, tool call and response
DeepintShield’s AI security architecture places one inline control point between your applications, models and tools. Every request can be checked at five stages, before and after the model call, and each decision is recorded. This page covers the request path, decisions, latency design, deployment, policy, authorization and evidence for architecture reviews.
The request path: five enforcement stages
Guardrails can run at five checkpoints. The gateway checks input and output on every call; the MCP gateway and the Python SDK add the MCP, RAG and action checks where your application routes them.
1. Input
Prompts are checked for injection, jailbreaks, secrets and personal data before the model call.
2. RAG
Each retrieved chunk is allowed, redacted, rejected, quarantined or passed with a warning.
3. Action
Every agent tool call needs an exact Allow before it runs, on Business and above.
4. MCP
MCP tools are filtered per virtual key, authenticated and pinned to approved definitions.
5. Output
Responses, including streamed output, are checked and redacted before users see them.
Decisions: what each check can return
Agent actions get one of three outcomes: Allow, Deny or Require approval. Content findings are passed, redacted, blocked or flagged, and safety providers can also sandbox.
The action runs
The request or tool call proceeds, and an agent decision is recorded before the call runs.
It stops and is logged
The action does not run. A blocked guardrail request returns HTTP 403 with the code guardrail_blocked.
Sensitive values are removed
Matched values are rewritten, then the content continues. A rewrite that cannot be mapped becomes a block.
A person decides
The action waits for a designated approver. The requester and the agent’s owner cannot approve it.
How much latency does AI security add?
DeepintShield does not publish an end-to-end latency figure, because the overhead depends on your policies, detectors, models and deployment. These documented mechanisms keep it low.
| Mechanism | What it does | When it applies | Documented figure |
|---|---|---|---|
| Speculative dispatch | The provider call starts while input guards run. The response is released only after the verdict and is discarded on a deny. | On by default for eligible non-streaming requests; off for streaming | Allow-path latency is max(guards, model) instead of guards + model |
| Async post-guards | Output checks run after the response is released. Findings still land in the audit store. | On automatically for a tenant when every output policy is shadow or async | No figure published |
| Per-category timeouts | Each detector category gets its own time budget, with per-policy settings taking precedence. | Opt-in; fail-open by default, or fail closed with HTTP 503 | No figure published |
| Guard decision reuse | Eligible deterministic guard decisions are reused instead of being evaluated again. | Eligible deterministic guards | About 1.42 µs (local microbenchmark, no I/O) |
Results depend on workload; measure your own.
Where it runs: managed, hybrid or self-hosted
The same gateway, guardrails and policy engine run in three deployment modes. In hybrid and self-hosted modes, no data leaves your environment.
Fully managed cloud
DeepintShield runs the control and data planes in a region chosen to meet your requirements; zero retention is available.
Fully Managed Cloud
Hybrid cloud
The data plane runs in your GKE, AKS or EKS cluster and reaches the managed control plane over outbound-only mutual TLS.
Hybrid Cloud
Self-hosted
Control plane and data plane both run in your environment, with an air-gapped delivery option.
Self-Hosted
What runs where
| Component | Fully managed cloud | Hybrid cloud | Self-hosted |
|---|---|---|---|
| Control plane | DeepintShield | DeepintShield | Your environment |
| Data plane: gateway, guardrails, policy decisions | DeepintShield | Your VPC | Your environment |
| Prompts, responses and keys | DeepintShield Cloud; zero retention available | Stay in your VPC | Stay in your environment |
| Connection between planes | Inside DeepintShield Cloud | Outbound-only mutual TLS: signed config down, aggregate counts up | Inside your environment |
| Plans | Developer, Cloud Team, Cloud Business | Enterprise VPC | Enterprise Self-Hosted |
Policy engine: your rules as code
Guardrail policies are versioned, bound to a virtual key and run in sync, async or shadow mode, with sampling set as a percentage. Agent tool calls go through one decision point that combines the registry, OpenFGA relationships and an optional OPA (Rego) or Cedar context policy. Every check must allow, and errors fail closed.
- An agent never classifies its own tools
- Unclassified actions count as write and high risk
- Auto-execute lists and OAuth grants cannot turn a Deny into execution
@shield.agentic.tool(
"ledger.post",
action="create_entry",
action_class="write",
recovery_cost="high",
)
def post_entry(row: dict) -> dict:
return ledger.insert(row)Client Config ∩ Current VK Binding ∩ Agentic Authorization Allow = Executable ToolAuthorization down to the single record
On the Business plan and above, relationship-based access control with OpenFGA decides which agent may use which tool and run which action on which object. The decision combines the agent’s permission on the object, can_use on the tool and can_execute on the action; on-behalf-of calls add delegation checks. Every leg must pass, and errors fail closed.
Agents prove a provider-issued identity from Microsoft Entra Agent ID or an OIDC issuer such as Okta, Auth0 or Keycloak, instead of a self-chosen name. See how Agentic Security uses these decisions.
Evidence your auditor can check
Hash-chained ledger
Each agent decision is appended to a workspace-scoped, append-only, hash-chained ledger before the call proceeds.
Verify chain
Check the chain with Verify chain in the console or through an API. Production deployments need an HMAC key.
Exports to your tools
Export audit records as JSON or CSV, send logs to S3 or BigQuery, and send metrics to OpenTelemetry.
Evidence is kept for 730 days by default. Audit logging supports SOC 2, GDPR, HIPAA and ISO 27001 evidence.
Integrate with one line
Change the base URL of your existing client, or install the Python SDK 3.2.3 for explicit guardrail, RAG, MCP and Agentic APIs. MCP clients connect to the gateway’s /mcp endpoint with a virtual key, and each key sees its own filtered tool catalogue through the MCP Gateway.
import openai
client = openai.OpenAI(
base_url="https://app.deepintshield.com/openai",
api_key="sk-ds-your-virtual-key"
)python -m pip install --upgrade "deepintshield==3.2.3"from deepintshield import DeepintShield
with DeepintShield.from_env() as shield:
llm = shield.bind("langchain").model("anthropic/claude-sonnet-4-5")
response = llm.invoke("Explain retrieval-augmented generation in one sentence.")
print(response.content)AI security architecture questions
Does DeepintShield see my prompts?
Only if you choose fully managed cloud, where DeepintShield hosts the data plane and zero retention is available. In hybrid and self-hosted modes, no data leaves your environment; the Enterprise VPC data plane sends only aggregate counts to the control plane. Compare deployment options.
What happens if a check times out?
By default a guardrail fails open and the request continues. Set fail_open: false and the gateway returns 503 guardrail_runtime_unavailable instead; per-category timeouts give each detector type its own budget. Agentic authorization is different: its errors fail closed. Read the timeout docs.
Can policies run in monitor-only mode first?
Yes. Guardrail policies can run in shadow or async mode, or use the Monitor only action, so findings are logged without changing traffic. Agentic Security has an Advisory (shadow) mode for migration, which never bypasses Require approval.
Which identity providers are supported?
Console SSO works over OIDC with Microsoft Entra ID, Okta, Google Workspace, Auth0 or any OIDC provider, with JIT provisioning and SCIM sync for Entra ID. Agents prove identity with Microsoft Entra Agent ID or a generic OIDC issuer. See Governance.
Does enforcement stop if the control plane is unreachable?
No, not in Enterprise VPC. The data plane keeps enforcing on its last-known-good signed configuration while disconnected, and it connects out over a single outbound-only mutual TLS link on port 443.
Review this with your architects
Book a session to walk through the request path, deployment model and evidence with your team.