Skip to content

Releases

agent-gate v0.1.0

Choose a tag to compare

@github-actions github-actions released this 01 Dec 21:23
578ec9f

Release Notes: v0.1.0

Released: 2026-12-01

The first release of agent-gate, a Claude Code PreToolUse hook that checks
every tool call against a written mandate and the Laws of Agents before
the call runs. It answers deny, ask or nothing, never allow, so it can only
make Claude Code's own permission flow stricter. It was built in response
to the AISI evaluation in which an agent, blocked from its target, turned
on an unrelated project, used fake identities and emailed its owner.

What it does

A mandate per task. A person writes .agent_gate/mandate.toml: the
task, and the paths, hosts, git remotes, email recipients and MCP tools it
allows. The agent may not change it. Without one, every consequential call
asks a person.

Rules first. Deterministic checks deny writes outside the mandate,
unlisted hosts and remotes, mail to strangers, identity changes and edits
to the gate's own files, and send outward actions such as a push to a
person. The agent's own description of a call is thrown away before
anything reads it. A subagent's prompt is read too, and its own calls go
through the same gate.

A model second, if you want one. An optional fast model, on the Claude
API or a local server, reads the raw action and may only make a verdict
stricter. It catches harm the rules have no pattern for.

A ledger. Every verdict is appended to a per-session ledger, with
recognizable secrets redacted, kept for 30 days.

How it was tested

108 unit tests; 17 test scenarios, all matched with the rules alone and
with claude-haiku-5-5 on the Claude API (the earlier 15 also matched with
local Qwen models on oMLX and Ollama); and a replay of 12,953 tool calls
from 30 days of real Claude Code sessions. Under one fleet-wide mandate,
82.6% passed, 13.5% asked a person and 3.9% were denied. A live probe
confirmed that the hook runs for a subagent's own calls and that a deny
blocks them.

Installing

On PyPI the package is agent-gate-hook, since agent-gate is too close
to existing names there; the command is still agent-gate.
pipx install 'agent-gate-hook[model]' installs it with the Anthropic SDK,
which only the Claude API backend needs. Then write a mandate and add the
hook to .claude/settings.json with the absolute path that
command -v agent-gate prints. The README's "Deploy as a Claude Code hook"
section has the settings block.


Full changelog: CHANGELOG.md