A denied action never runs.
An AI register only says what an agent should do; it cannot stop an agent from doing something else. With Castle, the agent asks before acting, and a deny stops the action before it happens. For a carrier, the decision log becomes signed evidence it checks offline.
Current status, stated plainly
These enforcement surfaces are built, tested and in early access, not yet live-proven in a customer runtime. Castle holds no certifications. Ask which surfaces are live for your deployment.
Castle decides, a hook enforces
Castle holds the registries, rules and decision log, and answers one question: authorize(agent, tool, data, action) returns allow or deny. A thin hook where the agent acts (in its process, in front of a tool server, or around its tool registry) asks, and refuses to proceed on a deny.
Deterministic, and computed outside the prompt
Decisions follow fixed rules over declared facts: the agent's registered tools, data and actions, the data classes involved, the vendor's review status and policy gates. No model output sets a binding decision.
Because the decision is made outside the prompt, prompt injection cannot move it. An attacker can make an agent ask for the wrong thing but cannot make Castle say yes. Same inputs, same decision, and you can read the rule.
Five ways to install the boundary, plus one for everything else
SDK guard
A guard in your agent code wraps tool calls and raises an exception on a deny. The call never leaves the process.
Drop-in MCP gateway
Sits in front of any MCP tool server, with no changes to the agent or the server. Every tool call is authorized before it is forwarded, over local stdio or HTTP (JSON only, no SSE streaming), failing closed on both.
ARI runtime adapter
Wraps the tool registry of an ARI-compatible runtime, so every registered tool is governed and agents inherit enforcement.
OpenAI Agents SDK adapter
Hooks the tool layer of OpenAI Agents SDK agents, so every tool call is authorized before it runs. Keep your framework; add the boundary.
LangChain / LangGraph adapter
The same check for LangChain and LangGraph agents, with no rework of your chains or graphs.
REST policy-decision endpoint
Any runtime that can make an HTTP call can ask; your code enforces the answer. It also answers in the OPA Data API shape, for engines such as Microsoft's Agent Governance Toolkit; unknown agents or errors get a deny. Castle cannot see whether a deny was honored here, so it claims no prevention.
All surfaces share one decision point and one log, so you can mix them. A model a hook names is recorded, not used in the decision, and castle monitor flags unregistered ones.
Blocked means blocked, and the gateway fails closed
- Behind a hook, a denied action never runs. The SDK guard, MCP gateway and the three adapters block before execution: prevention, not detection. The REST and OPA endpoints only return a decision.
- The gateway fails closed. If the decision service is unreachable, the gateway refuses the call rather than waving it through.
- Reaching past the register is recorded. A request outside the agent's declared allowlist is denied and logged as an
access_violation. Anything the agent never declared is open by default and denied in strict mode. - Without a hook, Castle says so. An out-of-scope action reported after it ran is logged as an alert marked not prevented. Only the SDK guard and the gateway in local decision mode mark blocks as prevented; the adapters block but do not yet mark it.
Every decision lands on the tamper-evident chain
Each allow, deny and violation joins the same tamper-evident log as your obligations and evidence (castle timeline --verify). It exports in signed packets anyone can check with castle-verify; once handed over, a later rewrite no longer matches. The full trust model.
Re-checked on a schedule, not asserted once
castle monitor runs on your schedule and re-runs twelve deterministic checks, such as record integrity, key age, agent tool use and overdue remediation. Results go on the audit chain, so the checking is itself evidence. No LLM is involved.
Time-boxed access for examiners and oversight reviewers
A regulator or a carrier audit team gets a read-only portal link for one engagement. It is shown once, the grant expires, and revocation ends live sessions. Every grant and access is logged on the same record they came to inspect.
From register to enforcement
No form, no email gate. Why registers alone fail for agents, and the fix:
Why a register is not enough
AI inventories were built for models whose output a human acted on. Agents break that three ways: they act directly, their real reach drifts from what was declared, and they can be steered by what they read. A policy PDF cannot stop a tool call.
Logging only tells you afterward. What matters is the call about to run.
The sequence
- Register with intent to enforce. Declare each agent's tools, data and actions as machine-checkable facts, not prose.
- Write rules you can read. Risk tiers, approval gates and data rules as fixed logic. If two reviewers could disagree on a rule, a hook cannot apply it.
- Install the boundary where it costs least. Start with the gateway in front of an existing MCP tool server: no agent changes. Add the SDK guard, adapters or REST as needed.
- Turn on declared-versus-actual. Early violations are mostly stale registrations, not attacks. When a use case changes,
castle monitorsends its assessment back to review. - Make the log the proof. Decisions, violations and approvals on one tamper-evident record, exported as verifiable evidence.
Where another tool enforces, Castle records its signal
Identity and behavior tools, anomaly engines and credential brokers make calls Castle does not. Castle records their decisions as evidence mapped to the obligation each answers. It runs no detector of its own and gives no verdict on a signal's content.
It then flags signals for agents you never declared (drift) and declared agents no tool reports on (gaps). The tool enforces; Castle proves.
How complete is the inventory?
Auditors ask how you know your inventory is complete. Castle does not hunt for agents; it reconciles against the identity and access tools you already run.
Feed it an export from a credential broker, agent directory, IdP, endpoint tool or cloud inventory. It signs a coverage statement: identities seen, registered, under policy, and fully evidenced. Each gap becomes a tracked exception with an owner and cure date.
The statement says what was compared, when, and against which source. It does not claim the sources saw everything, and that caveat travels with the number. It is signed with the same key as an evidence packet.
No setup: one export, one command, about two seconds on a laptop from an empty install. The first number is usually low; it sizes the work.
Watch a live allow, deny, and block
The demo shows the real product allow an in-policy action, deny regulated data to an unapproved vendor, and block a tool outside the agent's declared reach, in under ninety seconds.