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.

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.5. 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.5.tar.gz (105.2 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.5-py3-none-any.whl (89.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbl_gateway-0.9.5.tar.gz
  • Upload date:
  • Size: 105.2 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.5.tar.gz
Algorithm Hash digest
SHA256 ed9bc2e4f5c195167ee6e9102f76c5eea523cd1465983f056d66acc4cfd613f8
MD5 e3b7d305c1777af30682fd1e4bcf1669
BLAKE2b-256 9bf1e420d87822c728bb6567e3bbf23a50c988dcf76101f0b8777224ffc88ee1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbl_gateway-0.9.5-py3-none-any.whl
  • Upload date:
  • Size: 89.8 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 97a189d2e9637ad4b797d7cd680e079536fe746cd28c8d229deb0f102347909e
MD5 ba559af647102fec3c0f5ee71908f2d4
BLAKE2b-256 4b6c4640c7bdb5215e8a934ca6649cc5618f3d39ce7c8e027449d42d64a9269c

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