Skip to main content

DBL Gateway

Project description

dbl-gateway

pytest PyPI Python >=3.11

Inspect and replay LLM governance decisions.

Every request produces a decision chain: what was requested, what was decided, what was executed.

  • Inspect any decision: see what was requested, allowed, and executed
  • Replay a decision to reconstruct why it was allowed or denied
  • Swap the policy, re-evaluate the same input, compare outcomes

No API keys required:

docker compose --profile demo up

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.

Install

pip install dbl-gateway

Or from source:

pip install -e .

Reference implementation

dbl-gateway instantiates 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 instantiation of the DBL model.

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

Observer UI

Open /ui to watch the event chain in real time.

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-0.9.11.tar.gz (112.0 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-0.9.11-py3-none-any.whl (94.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dbl_gateway-0.9.11.tar.gz
Algorithm Hash digest
SHA256 92762764399e25c9528bcd346498afd850daa24e6255143935d5559568691603
MD5 eec03bc1a435d4e886eef8e61e08e4df
BLAKE2b-256 ebeca96abd6d2d43f2e4b985f0bb9188160a1413a7184e81c17ba43bcc4f5678

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbl_gateway-0.9.11-py3-none-any.whl
  • Upload date:
  • Size: 94.6 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-0.9.11-py3-none-any.whl
Algorithm Hash digest
SHA256 4790de02b50b22c43b37e8cb21281ba9404e0c38310067278829d3997367703e
MD5 9af62bf1ef7f3a11f12294296c59a35e
BLAKE2b-256 dbe0425f96d35744827c77adea102a464f6446c267443a5616cb60cc46a53383

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