Skip to main content

A human-approval gate for the dangerous things an AI agent does.

Project description

airlock (Python)

A human-approval gate for the dangerous things an AI agent does. This is the Python package; see the repository root for the full story, the quickstart, and the TypeScript package. It mirrors the TypeScript package one-to-one (same design, same names).

Install

pip install airlock-hitl      # or: uv add airlock-hitl

The distribution is named airlock-hitl; the import is airlock:

from airlock import Agent, RiskTier

Requires Python 3.13+.

What you get

  • An Agent that runs a tool-use loop and pauses before any tool you mark RiskTier.SENSITIVE, until a human approves, edits, or rejects it.
  • Model-agnostic providers (AnthropicProvider, OpenAiProvider) over an injected httpx client — no SDKs.
  • Redis store and Pub/Sub bus for pause/resume across processes, plus in-memory fakes for tests and demos.

See the root quickstart for a ~20-line example.

Layout (hexagonal — imports point inward)

  • src/airlock/domain — tools, risk tiers, messages, runs, events, errors. No I/O.
  • src/airlock/application — the agent loop, the gate policy, and the ports (Protocols).
  • src/airlock/infrastructure — adapters: providers, the Redis store and bus, audit sinks, clocks, id generators, and the in-memory fakes.
  • src/airlock/interface — driving adapters: the runner and the approver.
  • src/airlock/coreSettings (pydantic-settings).
  • examples/support_agent — a runnable demo (see its README).

Commands

Command What it does
uv run ruff check . && uv run ruff format --check . lint + format
uv run mypy mypy --strict
uv run lint-imports hexagonal import contracts
uv run pytest unit + eval tests with coverage (≥ 90%)
uv run pytest tests/integration --no-cov Redis integration tests

Built and tested to CODING_PRINCIPLES.md. From the repo root, make py-check runs the full gate.

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

airlock_hitl-0.1.0.tar.gz (58.3 kB view details)

Uploaded Source

Built Distribution

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

airlock_hitl-0.1.0-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file airlock_hitl-0.1.0.tar.gz.

File metadata

  • Download URL: airlock_hitl-0.1.0.tar.gz
  • Upload date:
  • Size: 58.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for airlock_hitl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 859ba37fea751a6f9343f6a46cb2e37731baf57867bc9458ae95d5e2f7395e9c
MD5 43a059b64f9f5d33c28b9dd9012e2e5c
BLAKE2b-256 268250640cb5e82663ccebbd707ac205adac58f366fc1b8ea21e08ff3ef00a3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for airlock_hitl-0.1.0.tar.gz:

Publisher: release.yml on fedorello/airlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file airlock_hitl-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: airlock_hitl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for airlock_hitl-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59d9818f7162d625e25e2fd82a0829d6a6a058cecbde3b0d35b6dd159fd76b20
MD5 9584baf0f183834b0a9784376d515e42
BLAKE2b-256 3e92090dd4a58e9fec5109551f8095df84ed59d64f369c79c0a41936907b6f33

See more details on using hashes here.

Provenance

The following attestation bundles were made for airlock_hitl-0.1.0-py3-none-any.whl:

Publisher: release.yml on fedorello/airlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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