Hey,
I’m the builder behind Autonomous Circularity Labs. Today we published our research on Bartholomew (BTP v5.4.22) on Zenodo, and I wanted to share the architecture and open-source tooling with the community.
The Problem with Current AI Guardrails:
Almost every AI safety tool right now (Llama Guard, NeMo, etc.) uses "LLM-as-a-judge." An autonomous agent proposes a tool call, and the framework routes it to a secondary LLM to ask "Is this safe?"
In production, this is painful:
- It adds 500ms to 2,000ms of latency per tool call.
- It burns 8GB–16GB of GPU VRAM or expensive API tokens.
- It’s probabilistic: it hallucinates and can still be bypassed with prompt injection or token tricks.
- If it fails and drops your database, you get an "as-is software" disclaimer.
What We Built Instead:
Bartholomew treats agent actions like a compiler treats code. Instead of asking an LLM, we compile incoming tool calls into a formal Context-Free Grammar (CFG) Abstract Syntax Tree (AST):
- Sub-35µs Polyglot AST Validation: We inspect syntax trees across Python, POSIX Shell, SQL, Go, Rust, and TypeScript in <35 microseconds on pure CPU (0 MB GPU VRAM). Catastrophic patterns like stacked SQL drops, fork bombs, recursive deletes, and credential leaks (AWS, OpenAI, GitHub PATs) are caught deterministically as syntax invariants.
- Keystone Capability Passkeys: Agents are issued cryptographically signed (Ed25519/HMAC-SHA256) capability tokens bounding filesystem paths, allowed binaries, and hard USD spend caps.
- Merkle Audit Ledger: Cleared actions are hashed (RFC 8785 canonical JSON + SHA-256) and appended to a cryptographic Merkle tree (RFC 6962) for non-repudiation.
- $100k Bonded Execution Warranty Fund: Because our AST engine stops 100% of catastrophic shell/SQL escapes, we back it with a $100,000 reserve pool that issues bonded warranties (up to $50k indemnity payout if a verified failure occurs).
- MCP Clearinghouse: Built-in 2.5% micro-escrow settlement for autonomous M2M tool calls across Anthropic's Model Context Protocol.
We recently validated this against 7 real-world attack vectors (indirect prompt injection, nested credential exfiltration, stacked SQL drops, live HTTP sidecar proxy interception).
How to try it:
- PyPI:
pip install btp-guard - Use the 1-line decorator:
@secure_tool - Or run the local sidecar daemon if your agent is in Node, Go, or Rust:
btp-guard proxy --port 8080
GitHub: https://github.com/ivegotahunnitonit/bartholomew
Zenodo: [Insert your Zenodo DOI link here]
Would love HN's candid feedback, teardowns, and edge-case attacks to test against our AST parser.
Top comments (0)