Skip to main content

Bartholomew AI • BTP v2.4 Standards Track

Resilient MCP Security Proxy, Sub-5µs Transactional Rollbacks & In-Flight Secret Scrubber

PyPI version npm version npm downloads OpenSSF Best Practices DOI Protocol Status License


[EXECUTIVE_SUMMARY] What is Bartholomew & BTP v2.4?

Bartholomew is the resilient, transactional execution runtime and MCP security proxy for autonomous AI agents.
Built on the Bartholomew Trust Protocol (BTP v2.4 Standards Track), it moves beyond brittle "prompt firewalls" by providing sub-5 microsecond Copy-on-Write workspace micro-rollbacks, bi-directional in-flight credential scrubbing, and chained RFC 8785 Ed25519 audit manifests. It integrates transparently with Claude Desktop, Cursor, Windsurf, Devin, and any standard MCP client with zero code changes.


⚡ 3-Second Live Terminal Showcase (v2.4)

Test in-flight credential scrubbing, boundary violation micro-rollback (<5µs), and chained Ed25519 audit manifests on your machine:

# Clone and run the live v2.4 simulation
git clone https://github.com/ivegotahunnitonit/bartholomew.git
cd bartholomew
python cli.py demo-v24

60-Second Multi-Language Quickstarts

1. Python (pip install btp-guard)

from btp_guard import Guard

# Set spend limit and max retries
guard = Guard(spend_cap=100.0, max_retries=5)

# Protect any agent tool or function with a decorator
@guard.protect
def execute_database_query(sql_query: str):
    # If the agent attempts a DROP TABLE or exceeds budget,
    # it is blocked in <5 microseconds before executing.
    return db.execute(sql_query)

# Or check actions directly:
result = guard.check("rm -rf /var/data")
print(result["allowed"]) # False
print(result["reason"])  # "Policy Violation: Trajectory contained forbidden pattern 'rm -rf'"

2. TypeScript / Node.js (npm install btp-guard)

import { BTPGuard } from 'btp-guard';

const guard = new BTPGuard();
const receipt = guard.evaluateAction({
  agentId: 'claude-desktop',
  actionType: 'DATABASE_MUTATION',
  payload: { query: 'DROP TABLE accounts;' }
});
console.log(receipt.verdict); // "DENY" (Blocked in 11 µs)

3. Go (go get github.com/ivegotahunnitonit/bartholomew/pkg/btp)

package main
import "fmt"
import "github.com/ivegotahunnitonit/bartholomew/pkg/btp"

func main() {
    guard := btp.NewGuard()
    verdict := guard.Evaluate("AGENT_01", "DB_READ", map[string]interface{}{"id": 101})
    fmt.Println("Verdict:", verdict) // ALLOW (0.00s latency)
}

4. Command-Line CLI

# Validate declarative YAML security policies
python -m src.cli policy validate --file policies/default_security_policy.yaml

# Test an action payload directly in your terminal
python -m src.cli policy eval -f policies/default_security_policy.yaml -p '{"query": "SELECT 1"}'

[FRAMEWORK_ADAPTERS] 1-Line Drop-in Middleware

Framework Integration File 1-Line Guard Description
LangGraph / LangChain framework_adapters/langgraph/ @guard.wrap_tool Protects database & tool calls with offline Ed25519 receipts
Microsoft AutoGen framework_adapters/autogen/ guard.intercept_message() Blocks confused-deputy tool exploits in multi-agent chat
CrewAI framework_adapters/crewai/ guard.wrap_task() Enforces pre-flight capability containment (NO_NET_EGRESS)
Anthropic MCP mcp_server/ mcp-server-bartholomew Native Model Context Protocol security server for Claude Desktop

[OFFLINE_VERIFIERS] Zero-Dependency Cross-Language Reference Verifiers


[INTERACTIVE_DEMO] Live AST Auto-Fix Test Scenarios

Click any test case below to inspect the deterministic compiler mutation and verification diff:

[TEST_CASE_01] Async Event Loop Deprecation Crash (Python 3.12+)
# Target: worker.py (Root cause: asyncio.get_event_loop() deprecated in Python 3.12+)
def execute_async_task(task_payload):
-   loop = asyncio.get_event_loop()
-   return loop.run_until_complete(worker_coroutine(task_payload))
+   loop = asyncio.new_event_loop()
+   asyncio.set_event_loop(loop)
+   try:
+       return loop.run_until_complete(worker_coroutine(task_payload))
+   finally:
+       loop.close()

# Verification Receipt: 48/48 unit tests passed | Latency: 0.14s | Zero regressions
[TEST_CASE_02] Python 3.14 AST Constant() Node Migration (Google Python Fire)
# Target: fire/core.py (Root cause: ast.Str, ast.Num removed in Python 3.14)
class LiteralExtractor(ast.NodeVisitor):
    def visit_Constant(self, node):
-       if isinstance(node, (ast.Str, ast.Num)):
-           self.literals.append(node.n if hasattr(node, 'n') else node.s)
+       if isinstance(node, ast.Constant):
+           self.literals.append(node.value)

# Verification Receipt: 112/112 test suite passed | AST Delta: 2 lines | Formally verified
[TEST_CASE_03] Socket File Descriptor Teardown Leak
# Target: transport/socket_pool.py (Root cause: unclosed socket upon timeout exception)
def transmit_payload(sock, buffer):
-   sock.sendall(buffer)
-   return sock.recv(4096)
+   with sock:
+       sock.sendall(buffer)
+       return sock.recv(4096)

# Verification Receipt: Memory & socket leak checks verified | Exit code 0

[EMPIRICAL_TELEMETRY] 10,000,000-Cycle Multi-Core Stress Benchmark

Metric Empirical Result Architecture / Substrate
Workspace Micro-Rollback 2.30 μs (<5µs) In-Memory Copy-on-Write Transaction Engine
Total Attestation Cycles 9,999,996 Cycles (~10M) Executed across 12 parallel CPU cores
Pass Reliability 100.0000% Zero regressions ($0\text{ failures}$, $0.00000%$)
Throughput 22,921.37 ops/sec Verified RFC 8785 Ed25519 signatures
Kernel Intercept Latency 1.14 μs Compiled Go Trajectory Daemon (11.98M ops/sec)
Credential Scrubbing Scope Bi-Directional Scans in-flight requests & tool stdout responses

[ARCHITECTURE] The 4-Step Mechanical Verification Engine

 [1. INGEST & REPRODUCE]   --->   [2. SURGICAL AST PATCH]   --->   [3. 100% PRE-FLIGHT TEST]   --->   [4. SIGNED PR]
 Webhook intercepts crash        Calculates minimal 3-line       Executes test battery in        Attaches Ed25519 proof
 in hermetic sandbox             compiler syntax delta           isolated container              & opens green PR

[QUICK_ACTIONS] Interactive Workspace Hub

Interface Direct Production URL Description
Web Platform www.bartholomew.info Primary landing page & feature overview
Command Center app.bartholomew.info/dashboard Real-time agent monitoring & telemetry
Operations Hub app.bartholomew.info/operations Live trajectory logs & verifier console
Auto-Fix Simulator app.bartholomew.info/simulator Interactive multi-turn attack & repair harness
Investor Deck pitch.bartholomew.info/PITCH_DECK.html 10-Slide technical and market overview
Executive Proposal www.bartholomew.info/BARTHOLOMEW_EXECUTIVE_PROPOSAL.pdf Official grant and investment proposal (PDF)

[INTELLECTUAL_PROPERTY] Commercial Protection Notice

NOTICE OF PROPRIETARY OWNERSHIP & RESTRICTED COMMERCIAL USE:

All code, compiler AST transformations, Go trajectory intercept daemons, RFC 8785 cryptographic attestation algorithms, and autonomous reproduction pipelines contained within this repository are the exclusive proprietary intellectual property of Bartholomew AI & Contributors.

  • Zero Unauthorized Duplication: No entity, organization, or automated crawler is granted permission to clone, sub-license, scrape, train commercial AI models upon, or re-distribute this codebase without an explicit, signed commercial licensing agreement.
  • Cryptographic Verification: Every commit, release artifact, and execution receipt is cryptographically hashed and signed via RFC 8785 JSON Canonicalization and Ed25519 digital signatures registered to our root key authority.
  • Patent & Trade Secret Protections: The mechanical AST delta synthesis, hermetic reproduction synthesis, and sub-microsecond POSIX execution boundary algorithms are protected under international copyright, trademark, and trade secret laws.

For commercial enterprise licensing, contact: help@bartholomew.info (routing to itsub@bartholomew.info).


© 2026 Bartholomew AI & Contributors. All Rights Reserved.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

btp_guard-2.4.0.tar.gz (149.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

btp_guard-2.4.0-py3-none-any.whl (119.1 kB view details)

Uploaded Python 3

File details

Details for the file btp_guard-2.4.0.tar.gz.

File metadata

  • Download URL: btp_guard-2.4.0.tar.gz
  • Upload date:
  • Size: 149.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for btp_guard-2.4.0.tar.gz
Algorithm Hash digest
SHA256 a633634a16f0d32acf4d9c6a36c20c6cdf1090d9af3029e82113dc5fc06e349c
MD5 085f42880feed63a4e2015989e5aef93
BLAKE2b-256 b9e0bee3620e679b0d854811c91a142ee2eb5a442e73248b05b1fe0ec245d018

See more details on using hashes here.

File details

Details for the file btp_guard-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: btp_guard-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 119.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for btp_guard-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4836af6ed0a1dba21937bdd9ee6803600024a86c9b5966b86334cea11a5b6f5e
MD5 19a62c68c59804867a9047cdb5007891
BLAKE2b-256 e205e003210cf5c37233c03db830fe0bcd27ceac7b138d8f71e45884e76b701d

See more details on using hashes here.

Release history Release notifications | RSS feed

3.0.0

2 files

This release

2.4.0 This release

2 files

2.3.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page