Skip to main content

DBL Gateway

Project description

dbl-gateway

Records what was allowed before anything runs.

dbl-gateway puts a deterministic decision layer in front of non-deterministic execution. Every request is recorded as:

INTENT → DECISION → PROOF → EXECUTION

DECISION happens first. Execution stays non-normative. The full chain is replayable.

1.0.0 marks the core boundary-to-decision contract as stable.

For the architecture entry point, see deterministic-boundary-layer.

pytest PyPI Python >=3.11

Run it in 1 minute with Docker, or install the package and connect your own provider.

No API keys required:

docker compose --profile demo up demo

Open http://localhost:8010/ui and click Start Demo.

The demo runs scripted scenarios through the full governance pipeline. Use Manual Intent in the observer to submit your own requests — the gateway is a working runtime, not just a demo harness.

Observer UI

How it works

Every request passes through the same deterministic chain:

INTENT  →  DECISION  →  PROOF  →  EXECUTION

INTENT records what was asked. DECISION records what policy allowed — the only normative event. PROOF records what will be sent to the provider. EXECUTION records what happened.

Execution output never feeds back into policy.

Part of the Deterministic Boundary Layer architecture.

Use your own provider

cp .env.example .env        # add one API key (OpenAI, Anthropic, or Ollama)
docker compose up

One active provider is enough. See .env.example for all options.

The default runtime boundary profile is operator:

  • /ingress/intent, /capabilities, /snapshot, /tail, /status, /surfaces, and /intent-template stay available
  • /ui/* is not exposed

For the boundary contract in detail, see env_contract.md, wire_contract.md, and CAPABILITIES.md.

Install

pip install dbl-gateway

Or from source:

pip install -e .

For a minimal Python helper over the raw HTTP surfaces, use dbl_gateway.client.GatewayClient.

Reference implementation

dbl-gateway implements the Deterministic Boundary Layer (DBL) as a runtime system.

It realizes the event chain INTENT → DECISION → PROOF → EXECUTION, where DECISION events are recorded before any execution and remain the only normative layer. Execution outputs are treated as non-normative observations.

The gateway enforces the core invariants of the model:

  • append-only event stream
  • strict ordering of DECISION before EXECUTION
  • governance input purity (authoritative inputs only)
  • deterministic replay under fixed inputs and policy configuration

As such, it serves both as a usable governed gateway and as a reference implementation of the DBL model.

For the stable-core versus evolving-surface split, see CONTRACT_BOUNDARY.md.

For the shortest practical start path, see FIRST_INTEGRATION.md.

For the raw 5-minute send → decision → replay path, see INTEGRATION_SLICE.md.

For token-based identity docking, including a concrete Entra example, see OIDC_INTEGRATION.md.

For empirical validation, including replay equivalence and policy variation benchmarks, see EMPIRICAL_VALIDATION.md.

Observer UI

Open /ui only when the active boundary profile is demo.

The built-in observer includes the event stream, decision replay, chain verification, a policy inspector for DECISION events, manual intent submission, and the integrated demo controller.

Documentation

Project details


Download files

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

Source Distribution

dbl_gateway-1.0.0.tar.gz (141.6 kB view details)

Uploaded Source

Built Distribution

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

dbl_gateway-1.0.0-py3-none-any.whl (113.5 kB view details)

Uploaded Python 3

File details

Details for the file dbl_gateway-1.0.0.tar.gz.

File metadata

  • Download URL: dbl_gateway-1.0.0.tar.gz
  • Upload date:
  • Size: 141.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for dbl_gateway-1.0.0.tar.gz
Algorithm Hash digest
SHA256 851701aff502687cfc982af6dd86d99fa1ac9c7b6bb591502bec02e253a45531
MD5 81a089fb7e6ea21526cb97156603dfba
BLAKE2b-256 95b1d09017fc86ef54128edbe761e6d6c8dc2b9ba1c6031e39dab44c6659898c

See more details on using hashes here.

File details

Details for the file dbl_gateway-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dbl_gateway-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 113.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for dbl_gateway-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2a7c243479e14d74dfdb8dd297dd62d680403c98ea60620c3b3a9766e359fd8
MD5 b308618e0f02ce399b5757d8c7af92f4
BLAKE2b-256 d89a1ed71cdb97c82f5156678b8278c66ce53217e9282fa2f4b7ac2eeaad64d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page