ivegotahunnitonit/bartholomew

security

0

stars

1

commits

Python

primary language

Aug 28, 2026

updated

README

Bartholomew AI • BTP v2.2 Standards Track

Cryptographic Trust Protocol & Autonomous Pre-Flight Execution Gate for AI Agents

OpenSSF Best Practices DOI Protocol Status CI Security Gate License MCP Server


[EXECUTIVE_SUMMARY] What is Bartholomew & BTP?

Bartholomew is the open cryptographic trust and verification gateway for autonomous AI agents.
Built on the Bartholomew Trust Protocol (BTP v2.2 Standards Track), it replaces probabilistic prompt filters with deterministic, hermetic pre-flight sandboxing and signed RFC 8785 Ed25519 attestations. Downstream execution environments (LangGraph, AutoGen, CrewAI, MCP, Kubernetes clusters) verify agent tool calls 100% offline in sub-50 microseconds with zero cloud dependencies.


⚡ 3-Second Live Terminal Showcase

Test the in-process AST scanner, hermetic path sandbox, LDMU loop governor, and Ed25519 notary on your machine:

# Clone and run the live 5-scenario attack simulation
git clone https://github.com/ivegotahunnitonit/bartholomew.git
cd bartholomew
python cli.py demo

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 @bartholomew/btp-guard)

import { BTPGuard } from '@bartholomew/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

FrameworkIntegration File1-Line GuardDescription
LangGraph / LangChainframework_adapters/langgraph/@guard.wrap_toolProtects database & tool calls with offline Ed25519 receipts
Microsoft AutoGenframework_adapters/autogen/guard.intercept_message()Blocks confused-deputy tool exploits in multi-agent chat
CrewAIframework_adapters/crewai/guard.wrap_task()Enforces pre-flight capability containment (NO_NET_EGRESS)
Anthropic MCPmcp_server/mcp-server-bartholomewNative 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

MetricEmpirical ResultArchitecture / Substrate
Total Attestation Cycles9,999,996 Cycles (~10M)Executed across 12 parallel CPU cores
Pass Reliability100.0000%Zero regressions ($0\text{ failures}$, $0.00000%$)
Throughput22,921.37 ops/secVerified RFC 8785 Ed25519 signatures
Kernel Intercept Latency1.14 μsCompiled Go Trajectory Daemon (11.98M ops/sec)
Average Surgical Delta3 LinesMinimal AST transformation (zero drift)

[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

InterfaceDirect Production URLDescription
Web Platformwww.bartholomew.infoPrimary landing page & feature overview
Command Centerapp.bartholomew.info/dashboardReal-time agent monitoring & telemetry
Operations Hubapp.bartholomew.info/operationsLive trajectory logs & verifier console
Auto-Fix Simulatorapp.bartholomew.info/simulatorInteractive multi-turn attack & repair harness
Investor Deckpitch.bartholomew.info/PITCH_DECK.html10-Slide technical and market overview
Executive Proposalwww.bartholomew.info/BARTHOLOMEW_EXECUTIVE_PROPOSAL.pdfOfficial 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.

Contributors

ivegotahunnitonit/bartholomew

security

0

stars

1

commits

Python

primary language

Aug 28, 2026

updated

README

Bartholomew AI • BTP v2.2 Standards Track

Cryptographic Trust Protocol & Autonomous Pre-Flight Execution Gate for AI Agents

OpenSSF Best Practices DOI Protocol Status CI Security Gate License MCP Server


[EXECUTIVE_SUMMARY] What is Bartholomew & BTP?

Bartholomew is the open cryptographic trust and verification gateway for autonomous AI agents.
Built on the Bartholomew Trust Protocol (BTP v2.2 Standards Track), it replaces probabilistic prompt filters with deterministic, hermetic pre-flight sandboxing and signed RFC 8785 Ed25519 attestations. Downstream execution environments (LangGraph, AutoGen, CrewAI, MCP, Kubernetes clusters) verify agent tool calls 100% offline in sub-50 microseconds with zero cloud dependencies.


⚡ 3-Second Live Terminal Showcase

Test the in-process AST scanner, hermetic path sandbox, LDMU loop governor, and Ed25519 notary on your machine:

# Clone and run the live 5-scenario attack simulation
git clone https://github.com/ivegotahunnitonit/bartholomew.git
cd bartholomew
python cli.py demo

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 @bartholomew/btp-guard)

import { BTPGuard } from '@bartholomew/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

FrameworkIntegration File1-Line GuardDescription
LangGraph / LangChainframework_adapters/langgraph/@guard.wrap_toolProtects database & tool calls with offline Ed25519 receipts
Microsoft AutoGenframework_adapters/autogen/guard.intercept_message()Blocks confused-deputy tool exploits in multi-agent chat
CrewAIframework_adapters/crewai/guard.wrap_task()Enforces pre-flight capability containment (NO_NET_EGRESS)
Anthropic MCPmcp_server/mcp-server-bartholomewNative 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

MetricEmpirical ResultArchitecture / Substrate
Total Attestation Cycles9,999,996 Cycles (~10M)Executed across 12 parallel CPU cores
Pass Reliability100.0000%Zero regressions ($0\text{ failures}$, $0.00000%$)
Throughput22,921.37 ops/secVerified RFC 8785 Ed25519 signatures
Kernel Intercept Latency1.14 μsCompiled Go Trajectory Daemon (11.98M ops/sec)
Average Surgical Delta3 LinesMinimal AST transformation (zero drift)

[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

InterfaceDirect Production URLDescription
Web Platformwww.bartholomew.infoPrimary landing page & feature overview
Command Centerapp.bartholomew.info/dashboardReal-time agent monitoring & telemetry
Operations Hubapp.bartholomew.info/operationsLive trajectory logs & verifier console
Auto-Fix Simulatorapp.bartholomew.info/simulatorInteractive multi-turn attack & repair harness
Investor Deckpitch.bartholomew.info/PITCH_DECK.html10-Slide technical and market overview
Executive Proposalwww.bartholomew.info/BARTHOLOMEW_EXECUTIVE_PROPOSAL.pdfOfficial 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.

Contributors

Languages

Python

41.5%

TypeScript

29.0%

HTML

17.0%

JavaScript

6.8%

CSS

3.1%