DBL Gateway
Project description
dbl-gateway
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
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 is local and must not be committed. Copy .env.example and configure it
for your environment.
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 /capabilitiesGET /surfacesGET /intent-template
Together they describe what the gateway can do, which surfaces exist, and how to speak valid ingress envelopes.
Documentation
See:
- docs/ARCHITECTURE.md
- docs/QUICKSTART.md
- docs/observer.md
- docs/demo.md
- docs/discovery.md
- docs/CAPABILITIES.md
- docs/wire_contract.md
- docs/env_contract.md
- CHANGELOG.md
Status
v0.9.7. Zero-config stub demo plus policy-boundary alignment for
dbl-policy 0.3.x, including contract-safe evaluation and structured
authoritative inputs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dbl_gateway-0.9.7.tar.gz.
File metadata
- Download URL: dbl_gateway-0.9.7.tar.gz
- Upload date:
- Size: 108.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1251f5a08ccfd31844251c59c43e2dac58c9f6dd50a8309b047b6a6df97474b2
|
|
| MD5 |
66e5ce83bc33d0098c27740855bd1f97
|
|
| BLAKE2b-256 |
b8f8d4abcf92d70a9530af8940480f4ca513bb748c0a15f536fb9eaffac066e8
|
File details
Details for the file dbl_gateway-0.9.7-py3-none-any.whl.
File metadata
- Download URL: dbl_gateway-0.9.7-py3-none-any.whl
- Upload date:
- Size: 92.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3013f378e14fe6175d453ddad0f46ca6c3abc537d647e457047d0e7aa4c1439
|
|
| MD5 |
dc68d513f2c708ea7508d131257a97af
|
|
| BLAKE2b-256 |
152fc75e05a7454392ed6edc53e26f9dc216d34cbaf51c3f4981e26b59819fab
|