Skip to main content

gatekeep — the agent control surface

A pre-execution gate that sits between an AI agent's proposed command and its execution. Solves the 2026 agent-production gap: agents are hard to supervise, hard to roll back, and hard to correct mid-run — because the control surface is missing.

Why

  • Rollback checkpoints the agent cannot delete: every destructive action (rm/mv/cp --hard reset, forced push) snapshots its targets into a vault that lives outside the agent's directory envelope. If the backup fails, the action is blocked. The agent has no path to the vault.
  • Pre-execution rules with block authority: denylist patterns, allowlist overrides, envelope enforcement (targets outside the envelope are denied).
  • Executable lifecycle hooks: any script in ~/.gatekeep/hooks/ receives the proposed command and answers {"action": "allow"|"deny"|"modify"}.
  • Circuit breaker (CLOSED/OPEN/HALF_OPEN): after N consecutive command failures the agent is restricted to read-only commands — loop containment.
  • Append-only, human-readable audit log: every proposal, denial, snapshot, failure and rollback, timestamped.

Usage

./gatekeep init --envelope ~/workspace        # one-time setup
./gatekeep run -- rm -rf ./cache              # snapshot + execute
./gatekeep run -- git push --force origin main  # denied by default rules
./gatekeep snapshots                          # list vault snapshots
./gatekeep rollback 20260815T100000           # restore from snapshot
./gatekeep breaker status                     # CLOSED/OPEN/HALF_OPEN
./gatekeep audit -- 50                        # human-readable log tail

Hooks

cp example_hook.py ~/.gatekeep/hooks/protect-secrets
chmod +x ~/.gatekeep/hooks/protect-secrets

Hooks receive {"command": "..."} on stdin and return a typed JSON decision.

Design notes

  • Vault defaults to ~/.gatekeep/vault, mode 0700, outside any envelope.
  • Deny decisions are also written to the audit log, so a human operator can review every intervention the agent did and did not make.
  • The breaker's HALF_OPEN state auto-closes after 60s, letting a recovered agent resume — but only after it has cleared read-only mode.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_gatekeep-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

agent_gatekeep-0.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agent_gatekeep-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for agent_gatekeep-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0d215104e3a4d6306cf046d8983d109cf2b65c098d76d0795e1965720cca01b1
MD5 7dc7ae2cf024bd03e401ebebe1cdb0dd
BLAKE2b-256 fdb522120a68c050358b2cd343290cbe162560b2f037a0a55a4a051c9d028f26

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agent_gatekeep-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for agent_gatekeep-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b79444617dae6abaa1d49cc6a44ca9bf71666b3f8991c04c1bf334595122147c
MD5 5988cf7d4bfb29a3ce125594f79106d8
BLAKE2b-256 5386565999ce7348bb20a99b236fc4a99b59d5db02c9e2cfa9e1bf181cbe6644

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 Sentry Error logging StatusPage Status page