Skip to main content

DBL Gateway

Project description

dbl-gateway

pytest PyPI Python >=3.11

When organizations deploy LLM systems, they quickly need to answer three questions: Who asked what, what was permitted, and what actually happened.

dbl-gateway is the execution boundary for the Deterministic Boundary Layer. It accepts declared intents, enforces policy decisions, and records everything as an append-only, digest-pinned event stream.

Part of the Deterministic Boundary Layer architecture.

Model

Every request passes through the same deterministic chain:

INTENT  ->  DECISION  ->  PROOF  ->  EXECUTION

INTENT records what was asked.
DECISION records what policy allowed.
PROOF records what will be sent.
EXECUTION records what happened.

Only DECISION events are normative. Execution output never feeds back into policy.

Example

Send an intent through POST /ingress/intent and read events through GET /tail?stream_id=default&since=0.

See docs/QUICKSTART.md for the full envelope example.

Zero-Config Demo

No API keys, no .env editing. See the full governance pipeline in 60 seconds:

docker compose --profile demo up --build

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

Or locally:

GATEWAY_DEMO_MODE=1 dbl-gateway serve

The stub provider generates synthetic responses through the full INTENT, DECISION, PROOF, EXECUTION chain.

One-Command Start

Configure .env once from ​.env.example, set one provider key or local Ollama, then start the gateway with:

docker compose up --build

Open http://localhost:8010/ui/ to watch the event chain in real time.

On Windows, use:

.\run_demo.ps1

Observer UI

Install

pip install dbl-gateway

Or from source:

pip install -e .

Run With Docker

cp .env.example .env
# add one provider key or configure local Ollama in .env
docker compose up --build

Supports OpenAI, Anthropic, or local Ollama. One active provider is enough to run the gateway.

.env stays local and should not be committed. Only .env.example belongs in the repository.

Run Locally

export DBL_GATEWAY_DB=./data/trail.sqlite
export DBL_GATEWAY_POLICY_MODULE=dbl_policy.allow_all
export DBL_GATEWAY_POLICY_OBJECT=policy
export OPENAI_API_KEY=sk-...

dbl-gateway serve --host 127.0.0.1 --port 8010

Observer

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

The built-in observer includes the event stream, decision replay, chain verification, manual intent submission, and the integrated demo controller.

Discovery

The runtime exposes three machine-readable discovery surfaces:

  • GET /capabilities
  • GET /surfaces
  • GET /intent-template

Together they describe what the gateway can do, which surfaces exist, and how to speak valid ingress envelopes.

Documentation

See:

Status

v0.9.6. Zero-config stub demo, observer runtime with discovery surfaces, integrated demo control, manual intent, and a one-command Docker start.

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.6.tar.gz (108.5 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.6-py3-none-any.whl (91.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbl_gateway-0.9.6.tar.gz
  • Upload date:
  • Size: 108.5 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.6.tar.gz
Algorithm Hash digest
SHA256 6e034b1b7d55008c1c88f24e79debbf0e8a6c9c7b8b1caf1c936a4414c98dadc
MD5 b1e82392ad671359874556dd3b828c6d
BLAKE2b-256 110b386b4b100bdc162173d74862c5a932a29a3643d0a8f7e1a6ca5b0bd105cb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbl_gateway-0.9.6-py3-none-any.whl
  • Upload date:
  • Size: 91.9 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 effc607a3e917cd3c4c8bc2e1b6e839e9de5b0ba16a077e99c34eb90d5003f1d
MD5 06dfab051febcd49d53b6515ef1fc020
BLAKE2b-256 57f6b634e673d155a1791cd0eec42adfb8953c62a595c19d74e1ceda8b182353

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