Skip to main content

BoundGraph

The zero-trust, cost-bounded runtime engine for multi-agent AI systems.

BoundGraph governs the exact execution span between when a reasoning engine proposes an action and when a state change commits to the system. It transforms volatile, expensive prompt loops into bounded, auditable, enterprise-grade software execution.


Why BoundGraph

Standard agent frameworks accumulate full conversation transcripts across steps, causing token cost to grow quadratically with the number of steps:

Standard Agent Cost:  Σ P_i ≈ n·S + (n²/2)·(ō + r̄)   →  O(n²)

BoundGraph enforces strict context admission per step, forcing cost to scale linearly instead:

BoundGraph Harness Cost:    Σ P_i ≤ n · (s_max + k·ō + k·c)  →  O(n)

Beyond cost, BoundGraph treats every model output as an untrusted proposal rather than a command — no state change reaches your systems without a deterministic, signed evidence check.


The Three Foundation Laws

Every agent, tool, and execution step in a BoundGraph runtime strictly adheres to three mathematical bounds:

Law I — Authority (Security)

Permissions can only shrink along an execution path: G₁ ⊑ G₂. Grants may be attenuated, never widened, and never inherited from ambient surroundings. Permission expansion happens only through explicit, human-gated or policy-checked escalation hooks.

Law II — Context (Cost Complexity)

A step receives only the exact context tokens (Γ) it declares as necessary. Tool execution results are returned as high-density, AST/log-sliced summaries called Condensates (κ). Input context is truncated once verified Evidence is reached.

Law III — Evidence (Trust & Verifiability)

Model output is treated strictly as a Proposal (ω) — never as ground truth. No state change commits based on probabilistic output. A step commits only upon receiving signed Evidence (ε) from a deterministic checker or statistical quorum.


Architecture

A BoundGraph Step is the tuple S = (Γ, ω, G, κ, ε, λ), executed through a closed-loop, zero-trust pipeline:

┌─────────────────────────────────────────────────────┐
│ LAYER 1: UNIFIED INFERENCE ROUTER                    │
│ (Model speculation / provider failover)              │
└───────────────────────┬───────────────────────────────┘
                         │ Proposes Work Order (ω)
                         ▼
┌─────────────────────────────────────────────────────┐
│ LAYER 2: GRANT COMPILER & GATE                       │
│ (Statically infers & clamps Grant G)                 │
└───────────────────────┬───────────────────────────────┘
                         │ Approved Grant G
                         ▼
┌─────────────────────────────────────────────────────┐
│ LAYER 3: ZERO-TRUST SANDBOX RUNTIME                  │
│ (Firecracker MicroVM / Wasm sandbox)                 │
└───────────────────────┬───────────────────────────────┘
                         │ Raw Output Stream
                         ▼
┌─────────────────────────────────────────────────────┐
│ LAYER 4: SEMANTIC CONTEXT SLICER                     │
│ (Produces size-capped Condensate κ)                  │
└───────────────────────┬───────────────────────────────┘
                         ▼
┌─────────────────────────────────────────────────────┐
│ LAYER 5: DETERMINISTIC CHECKER ENGINE                │
│ (Emits signed Evidence ε → Append-only Ledger λ)     │
└─────────────────────────────────────────────────────┘

Core Primitives

Primitive Symbol Role Mutability
Work Order ω Typed declaration of intended effect, tool calls, and requested permissions Immutable
Grant G Finite set of scoped permission atoms (e.g. fs:read:src/*, net:egress:api.com) Immutable
Context Γ The exact admitted token window provided to a reasoner call Immutable
Condensate κ AST-preserved, size-capped (c ≪ r̄) high-density summary of execution results Immutable
Evidence ε Signed verification verdict produced by a model-free deterministic checker Immutable
Ledger Entry λ Audit log record capturing token cost, grant attenuation, evidence, and timing Append-only

Multi-Agent Combinators

Complex multi-agent topologies are composed using law-preserving algebraic combinators:

  • seq(a, b) — Sequential. Step b executes after step a. Context passes strictly as a Condensate (κ_a). Grants are evaluated independently against the root authority.

  • par(a, b) — Parallel. Steps execute concurrently if and only if their permission sets are proven statically disjoint:

    W(G_a) ∩ R(G_b) = ∅  ∧  R(G_a) ∩ W(G_b) = ∅  ∧  W(G_a) ∩ W(G_b) = ∅
    
  • route(r, [a₁..aₙ]) — Dynamic route. Router model r selects an execution branch within a pre-computed static authority envelope E = G_a₁ ∪ ... ∪ G_aₙ.

  • repair(a, v, k) — Bounded repair. Caps retry loops at k attempts. Prevents quadratic context buildup by resetting input context to base Γ plus the latest Condensate κ on each attempt.


Conformance Profiles

BoundGraph defines three independently adoptable conformance profiles, letting adopters ramp up incrementally:

Profile Name Guarantees
A Accounted Emits append-only Ledger Entries (λ) for token cost, latency, and reasoning-step telemetry
B Attenuated Requires explicit Grants (G) on every edge; commits strictly require deterministic Evidence (ε)
C Isolated Enforces hardware virtualization (Firecracker MicroVM / Wasm) and journal replayability

Recommended for production: Profiles A + B + C together deliver the full guarantee set of all three Foundation Laws.


Install

Python

$ pip install boundgraph

Wheels need no Rust toolchain. One abi3 wheel per platform covers CPython 3.11 and everything after it, for Linux (x86_64, aarch64), macOS (Apple silicon and Intel) and Windows (x86_64); free-threaded wheels are built separately for 3.14t, because a free-threaded interpreter has no stable ABI to target. Anywhere else, pip builds from the source distribution and does need a toolchain.

import boundgraph as bg

Rust

$ cargo add boundgraph

boundgraph is a facade over the layers, and contains no logic of its own — the types are the same types, so depending on it and on a layer directly is not a conflict. The default is compile plus runtime; every other layer is a feature:

boundgraph = { version = "0.1", features = ["full"] }
Feature Crate Layer
(always) boundgraph-core The primitives: ω, Γ, κ, ε, λ
(always) boundgraph-grant The permission lattice behind Law I
(always) boundgraph-ir The Flow IR and the .bg file format
compile boundgraph-compile Layer 2: Flow → Plan
runtime (default) boundgraph-runtime The step lifecycle, budgets, recovery
router boundgraph-router Layer 1: the inference router
sandbox boundgraph-sandbox Layer 3: grants as capabilities
slice boundgraph-slice Layer 4: the semantic context slicer
check boundgraph-check Layer 5: checkers and evidence signing
ledger boundgraph-ledger λ: the hash chain, its sinks, and replay
cli boundgraph-cli The bg commands, as a library

full turns on every layer at its own defaults. The three heaviest options stay outside it: ledger-sqlite, ledger-otel, and sandbox-wasm.

The bg command line

$ cargo install boundgraph-cli

Status

v0.1.0. All 17 features and 101 user stories are implemented — docs/TRACKER.md is the per-story record, and docs/ARCHITECTURE.md is the specification they were written against (v1.0). The Flow IR is at v1.4.

Pre-1.0, so the API may still change. What will not change quietly is the IR: a .bg file names the IR version it was written against, and a build that cannot read it says so rather than guessing.

Metadata

Release files for boundgraph 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for boundgraph 0.1.0
File Size Uploaded Provenance Actions
boundgraph-0.1.0.tar.gz 870.1 kB With provenance Details for boundgraph-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for boundgraph 0.1.0
File Actions
boundgraph-0.1.0-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details for boundgraph-0.1.0-cp314-cp314t-win_amd64.whl
boundgraph-0.1.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 Details for boundgraph-0.1.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
boundgraph-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details for boundgraph-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl
boundgraph-0.1.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for boundgraph-0.1.0-cp311-abi3-win_amd64.whl
boundgraph-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for boundgraph-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
boundgraph-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for boundgraph-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
boundgraph-0.1.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for boundgraph-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
boundgraph-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for boundgraph-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 14.7 MB

Release files / boundgraph-0.1.0.tar.gz

Download URL boundgraph-0.1.0.tar.gz
Size 870.1 kB
Tags Source
SHA-256 checksum
How to use checksums
dfb0db757cfc0b555e82604c94cb36f9a9ef33ab759ba19e5e722e873bb0e623
BLAKE2b-256 checksum
How to use checksums
de656c5fafa111516b0ec2bafd2b61cdc5cb67f892563c12ffc7e5b2b9f69d57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / boundgraph-0.1.0-cp314-cp314t-win_amd64.whl

Download URL boundgraph-0.1.0-cp314-cp314t-win_amd64.whl
Size 1.6 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
bfe8d338bbb4608a9c1961a71bb3e80421d00b8e1c0e5dfb0470cd3d512057ce
BLAKE2b-256 checksum
How to use checksums
082497b3e06babafd382d4d272e6b8ef7214f23cfaf91a6fae826113f7e482ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / boundgraph-0.1.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL boundgraph-0.1.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.9 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
0e5c16b0c91ca12643e3eb0669b80917376d54e3d09ce437360f67dea45f3fb3
BLAKE2b-256 checksum
How to use checksums
195e7963f5a5f4c1788c1c6c0eeb6bd6f369401b18badddd6b74d0675bf20902
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / boundgraph-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl

Download URL boundgraph-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl
Size 1.6 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
287d26d62f3fa078d0a0970760e44677c7899266e3b74128e6577bdbe61696ab
BLAKE2b-256 checksum
How to use checksums
4ace2b66b0a198a4869a96f6515756bf7521f05101df286345bbf86e929b5c90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / boundgraph-0.1.0-cp311-abi3-win_amd64.whl

Download URL boundgraph-0.1.0-cp311-abi3-win_amd64.whl
Size 1.6 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
84f393fb776616abdbac2476bde4c3dbfa54615ec36feff7d8208b741892cb7e
BLAKE2b-256 checksum
How to use checksums
e0785ffc34ca84b2edec5c045944486ba5bd3f26a212bc8d6af11641837a3188
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / boundgraph-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL boundgraph-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.9 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
09584f1b26f26c7a34e65a6341c65fd3216941b00b84255d8805f09d23dd86b0
BLAKE2b-256 checksum
How to use checksums
dac36dc39dbc66abb4e2efba7687529a12397fed7f2f1505d2942364cbcbcc5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / boundgraph-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL boundgraph-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.8 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
9b16165314e6aad9db507e580df7d507eaf2bbe8cfa2e3c4ad2d2c84d0db6eef
BLAKE2b-256 checksum
How to use checksums
91281c6b65b5dc3062a868b6190db2d4712ca23cbddb5af2a8cea39f38fc9403
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / boundgraph-0.1.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL boundgraph-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
Size 1.6 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
02dac0a4f7985dc197eef8d265d89bcbb5327671b4bde14503fef02838b8a298
BLAKE2b-256 checksum
How to use checksums
d7050d12e6c2f5d9a7474216508c26cd2b74cc3a30fdd392d4de91444450247e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / boundgraph-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL boundgraph-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 1.7 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2f3b70da02518593e0f2018d58ccec852f3cee169d8370d8016692270017f0be
BLAKE2b-256 checksum
How to use checksums
26e3271101ef38d9a740a980e7678b4eca240c3bb55f842bc36eb7173f6817ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Security for boundgraph 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for boundgraph-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

9 release files Full provenance

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