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.
Metadata
Release files for agent-gatekeep 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| agent_gatekeep-0.1.0.tar.gz | 6.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_gatekeep-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.7 kB
Release files / agent_gatekeep-0.1.0.tar.gz
| Download URL | agent_gatekeep-0.1.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d215104e3a4d6306cf046d8983d109cf2b65c098d76d0795e1965720cca01b1
|
|
BLAKE2b-256 checksum How to use checksums |
fdb522120a68c050358b2cd343290cbe162560b2f037a0a55a4a051c9d028f26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Release files / agent_gatekeep-0.1.0-py3-none-any.whl
| Download URL | agent_gatekeep-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b79444617dae6abaa1d49cc6a44ca9bf71666b3f8991c04c1bf334595122147c
|
|
BLAKE2b-256 checksum How to use checksums |
5386565999ce7348bb20a99b236fc4a99b59d5db02c9e2cfa9e1bf181cbe6644
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Security for agent-gatekeep 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.