Open Source Update: Raucle Goes Apache-2.0 and Ships the Trust Layer
Six weeks ago I published a post about moving from statistical detection to cryptographic proof for AI agent accountability. The project was called raucle-detect, it was licensed under AGPL-3.0, and it shipped the core capability receipt primitive: a signed, content-addressed record of every policy-gated action an AI agent takes.
It’s been a busy six weeks, and I’ve enjoyed seeing the project develop beyond its original scope. The library is now called raucle, licensed under Apache-2.0, and includes four new modules designed to help organisations verify one another’s receipts. Microsoft has also accepted my contribution to its Agent Governance Toolkit.
Much of my time has been spent reviewing and improving the security of the implementation. Nine rounds of adversarial review identified several issues, including three particularly useful integration findings. I’d like to share what changed and some of the lessons I’ve taken from that work.
Why Apache-2.0
The AGPL decision was deliberate. I wanted a copyleft licence that would encourage transparency by requiring corresponding source to be made available in the circumstances covered by the AGPL. That’s a reasonable instinct for a security project where transparency matters.
Conversations with potential adopters gave me a different perspective. Security teams inside banks, cloud providers, and enterprise platforms told me the same thing: AGPL creates legal review overhead that kills adoption before anyone tries the technical integration. Several organisations have policies that restrict the use of AGPL software. I began to appreciate how much those arrangements could affect whether the library was even evaluated.
Apache-2.0 offers a more permissive approach, with an explicit patent grant. My hope is that the change will make it easier for engineering teams to experiment with the library, contribute to its development and consider it within their own architectures.
The trademark is held separately. Apache-2.0 section 6 doesn’t grant rights to the “Raucle” name, so the project controls that independently. Forks should respect the project’s separate trademark policy.
I’ve also removed the dual-licensing arrangements. Contributions are now accepted under Apache-2.0 with a Developer Certificate of Origin (DCO) sign-off, rather than a separate contributor licence agreement.
The rename: raucle-detect is now raucle
When I started working on the project, my focus was prompt-injection detection. As the research developed, I introduced provenance receipts, capability tokens, an SMT-backed policy prover and an enforcement gate. The more recent work on trust registries, cross-organisation handshakes, agent passports and compliance evidence packs has taken the project considerably beyond its original purpose. The shorter name reflects that change.
pip install raucle-detect is now pip install raucle. The old import path keeps working through a deprecation shim for one transition cycle. The CLI is raucle instead of raucle-detect. Environment variables are RAUCLE_* instead of RAUCLE_DETECT_*. The wire formats are unchanged. Existing receipts retain their wire format and are intended to remain verifiable. The iss identifier on the provenance receipt stays frozen as "raucle-detect/provenance" because that’s committed to the spec, the cross-language test vectors, and all five reference ports.
The Go module path is a breaking change, unfortunately. Go modules can’t alias a renamed declared path, so Go consumers need to update their import from github.com/craigamcw/raucle-detect/reference/provenance-go to github.com/craigamcw/raucle/reference/provenance-go. Everything else is wire-compatible.
The platform trust layer
A capability receipt provides verifiable evidence of a gated decision. An architectural question I’ve been exploring since the original release is how one organisation might establish confidence in the authority of an agent operated by another.
That’s a cross-organisation trust problem. Today, most answers involve some kind of federation, a shared identity provider, or bilateral key exchange. Those approaches may be appropriate for established relationships, but I’m interested in reducing the need for bilateral arrangements when agents interact across organisational boundaries.
Raucle v0.21.0 ships four modules that address this directly:
Agent Trust Registry. An append-only, hash-chained, operator-signed directory of issuer keys. Organisation B can verify Organisation A’s capability tokens by resolving the shared registry. Revocation is fail-closed. Rollback is detected via a signed freshness anchor, so a verifier can reject a stale signed snapshot that omits a later revocation. The CLI is raucle registry init|publish|list|resolve|revoke|verify.
Cross-organisation handshake. A signed request/accept/ack exchange between two organisations’ agents, with trust resolved from the registry. No prior bilateral key exchange is needed, provided both parties have established trust in the relevant registry. Signed acknowledgement receipts, responder-side replay rejection, and the verification function requires a real anti-replay binding by default.
Agent passport. An issuer-countersigned, registry-anchored identity document that wraps an agent’s capability statement. One portable artifact that any framework, LangChain, CrewAI, MCP, A2A, Agent Framework, can verify offline before enforcing scope. Fail-closed on malformed input, including hostile-but-signed bodies.
Compliance evidence packs. Maps a signed receipt chain to EU AI Act, ISO/IEC 42001, and SOC 2 controls. I want to be honest about what this is: it’s an evidence map, not a conformance attestation. Controls report SATISFIED, PARTIAL, or OUT_OF_SCOPE. SATISFIED requires cryptographic verification of the underlying chain. If the chain doesn’t verify, the control doesn’t pass.
These four modules went through nine rounds of iterative adversarial security review before merging. An independent auditor undertook repeated review, remediation and verification cycles. By the end of that review, there were no outstanding HIGH or MEDIUM findings within its scope. Every fix landed with a regression test.
Three findings from the integration review
During the post-relicense security sweep, three fail-open issues surfaced. Each one was found by actually exercising the shipped integration paths, not by reading code. I found these particularly useful because they highlighted the importance of testing the behaviour of the surrounding framework, rather than just the library in isolation.
The LangChain integration was fail-open on DENY. LangChain’s callback manager swallows handler exceptions unless the handler sets raise_error. The Raucle callback handler didn’t. So when the gate raised CapabilityDenied on a blocked tool call, LangChain logged it as a warning and the tool executed anyway. The gate was advisory. The fix is raise_error=True and run_inline=True, both load-bearing and commented. End-to-end tests now run the real tool.run() dispatch path, and the langchain extra is part of the dev dependencies so CI exercises it.
The MCP server accepted missing required arguments as a clean verdict. A tools/call omitting a schema-required argument silently scanned the empty string and returned CLEAN/ALLOW. The server now enforces each tool’s declared inputSchema.required and returns isError when a required argument is missing.
The gate leaked internal exception text in DENY reasons. The caller-visible denial reason included the raw exception text. Now it’s generic, with the full traceback logged server-side only.
I’ve addressed all three findings and added regression tests. I wanted to include them here because understanding where an implementation has fallen short, and what has been done to improve it, is an important part of evaluating a security project.
Microsoft Agent Governance Toolkit: merged upstream
On 27 May 2026, my contribution to Microsoft’s Agent Governance Toolkit was merged. PR #2610 adds proof_artefact and verification_pointers to AGT’s BackendDecision, carrying raucle’s proof metadata through AGT’s audit chain.
I’m particularly interested in how the two projects can complement one another. AGT is MIT-licensed and provides useful in-process policy controls. My research focuses on mechanised soundness, offline verification and SMT-backed policy completeness within a supported formal model. Its ExternalPolicyBackend protocol provides an integration point for those capabilities.
Raucle also ships a drop-in FunctionMiddleware for the Microsoft Agent Framework directly. 9/9 tests passing against agent-framework 1.6. If you’re already on the Microsoft stack, the integration is about ten lines of glue.
Five reference implementations, byte-for-byte
The provenance receipt specification now has five reference implementations: Python, TypeScript, Go, Rust, and C#. All five ship the same JSON test-vector file in CI. Every implementation must reproduce every published vector byte-for-byte, both the JWS string and the SHA-256 of that string. Every implementation must successfully verify every published signature.
During the hardening pass, a cross-language signing bug was found by cross-model review. Python and Go sorted object keys by Unicode code point. TypeScript and C# sorted by UTF-16 code unit. Identical for BMP/ASCII, so every shipped test vector passed. But divergent for non-BMP, any signed object with an emoji or astral-plane key would hash to different bytes across languages. All five are now unified on UTF-16 code-unit ordering per RFC 8785 / JCS section 3.2.3. Byte-neutral for all existing BMP material, so no signature or ID churn.
I’ve enjoyed working through this aspect of the implementation because interoperability is particularly important if other teams are to develop their own verifiers. The shared test vectors give them a practical reference against which to assess compatibility.
The security hardening, in brief
Between v0.15.0 and v0.20.0, the project went through six security-focused passes. Two independent adversarial audits, a SonarQube static analysis pass, a cross-model Codex review, and the nine-round trust-layer review. No receipt wire-format changes. Five-language byte-identity preserved throughout.
Some of the fixes that matter:
- Agent-id privilege escalation: agent matching required a bare prefix, so a token for
agent:billingauthorisedagent:billing-evil. Now requires exact match or a dot-delimited descendant. - Constraint bypass by omission: value constraints were skipped when the named field was absent. Alias or omit an argument and you bypass the policy. Now positive constraints are enforced on present-and-required fields.
- ReDoS: an 82-second pathological scan is now 0.01 seconds through per-pattern length caps, bounded wildcard spans, and a per-scan wall-clock budget.
- Feed fetching is HTTPS-only, blocks private/loopback/metadata IPs, pins the validated IP against DNS-rebind, rejects redirects, and caps body size.
- The prover no longer returns PROVEN for queries reading forbidden tables via
EXCEPT/INTERSECT/MINUS. Unknown SQL grammar or policy keys now force UNDECIDED instead of PROVEN.
The fail-closed redesign in v0.17.0 flipped the entire prover/gate/verifier from “enumerate bad” to “fail-closed by construction.” Anything the system does not explicitly model now hits a conservative verdict: gate denies, prover returns UNDECIDED, mint/verify rejects. A single executable Modelled Language Registry drives the runtime allowlists, and a CI drift guard fails if any consumer’s modelled set diverges.
Where the project is now
On PyPI, pip install raucle gets you v0.22.0 with optional extras for rules, server, ML, compliance, proof, and the Microsoft Agent Framework adapter. The core package is Apache-2.0. The five reference implementations are MIT. The provenance receipt specification is CC-BY-4.0.
The paper draft, the Lean 4 mechanisation, and the benchmark harness are all in the repository under paper/.
The project evaluation results remain unchanged (see the historical evaluation artefacts): 100% block rate on attacker-controlled tool calls across 720 LLM-driven attempts on the AgentDojo banking suite. +27 to +58 percentage-point advantage in benign task completion versus the text-side comparator in my evaluation under the evaluated attack and defence configurations. 69 microseconds median gate latency without an attenuation chain on commodity x86_64 hardware (the three-token chain configuration recorded 268 microseconds).
Integrations cover the Microsoft Agent Framework (drop-in FunctionMiddleware), the Agent Governance Toolkit (ExternalPolicyBackend), LangChain (CallbackHandler), AutoGen, and an MCP gateway pattern. There’s also an Azure AI Foundry sidecar deployment under Bicep and APIM policy for anyone on that stack.
The detection layer ships 180+ compiled signatures across 10 categories: prompt injection, jailbreaks, data exfiltration, data loss, MCP tool poisoning, RAG poisoning, agent attacks, evasion, output leakage, and tool abuse.
What I’m asking for
I’d be particularly grateful for help in three areas as the project develops.
Break the proofs. The three Lean 4 theorems are in paper/lean/. The project records a successful build with zero sorrys, subject to the trust assumptions described in the mechanisation. If you work with Lean, I’d welcome an independent examination of the theorems, their assumptions and the mechanisation.
Write real-world policies. The evaluation runs against AgentDojo’s pre-registered policy files. The hardest problem in production is authoring policies for real tools: banking APIs, healthcare records systems, payments networks. Contributing policy templates for tools you have integrated, with explanations of the threat model behind each, is a particularly useful contribution at this stage of the project.
Try it against a real agent. If you’re working with an LLM gateway, I’d welcome feedback from evaluating raucle in an appropriate test environment before considering a production deployment. I am especially interested in cases where the schema fragment your tool uses falls outside the supported decidable subset, or where the gate’s eight checks are the wrong eight for your deployment, or where your auditor has a specific evidence requirement the receipt format does not cover.
The repository is at github.com/craigamcw/raucle. Whether you’d like to contribute code, raise an issue or simply discuss the architectural problems you’re encountering, I’d be glad to hear from you. Feedback from someone integrating the library into an environment I haven’t considered is especially valuable to me.
Raucle is open source under Apache-2.0. The IEEE Security & Privacy 2027 paper draft, the Lean 4 mechanisation, the AgentDojo / InjecAgent benchmark harness, and the five reference implementations all ship in the same repository. The project was previously released as raucle-detect under AGPL-3.0; it was relicensed to Apache-2.0 in v0.19.0 and renamed to raucle in v0.22.0.
