
Agent Gate
io.github.Jott2121Published by GitHub account Jott2121v0.1.1Updated Oct 27, 2026
Fail-closed quality gate and hash-chained receipt ledger for AI agent workflows.
Overview
A local MCP server that gives an AI agent a fail-closed "done" checklist and a tamper-evident, hash-chained receipt ledger for its own work.
- What you can do
- Retrieve the checklist an agent must satisfy before claiming work is finished
- Evaluate supplied evidence against the checklist fail-closed and get back pass status plus the blocking checks
- Append honest receipts of decisions, metrics, values and verdicts to a hash-chained ledger
- Read back all receipts and see whether the chain is still intact
- When to use it
- Useful when you want an agent to prove its work before declaring it done, and to leave an auditable trail of what it decided. Suited to agent workflows where silent failures, unverified claims or edited logs are a concern.
- Requirements
- Runs locally over stdio as a Python package (mcp-agent-gate), installed with pip and launched as a Python module. No accounts, API keys or headers are declared. Receipts are written to a ledger file under the user's home directory, overridable with the AGENT_GATE_LEDGER environment variable.
Installation
In SourceWeft
- Open Agent Gate in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
agent-gate
[ci] [CodeQL] [Coverage] [License: MIT] [Python] [MCP]
An MCP server that lets an AI agent gate its own work before it claims "done": deterministic checks, then an independent refute-first review, then a tamper-evident honest receipt.
Agents that grade their own homework ship low-quality output. agent-gate turns that discipline into tools an agent must actually pass: a fail-closed checklist and an append-only, hash-chained receipts ledger. It is Fleet Mode, an agent-orchestration doctrine, made into a runnable tool. Receipts over hype, enforced by the data structures.
🧩 One layer of a five-repo cost-governance stack for operating AI agents cost-efficiently; bow is the flagship that runs every layer in production.
Why
The expensive failures in agent systems are the silent ones: a model update degrades output, a change quietly breaks a workflow, an agent declares success while the work is wrong. The fix is not a smarter model. It is a gate the agent cannot talk its way past:
- Fail-closed. A check counts as satisfied only if it is explicitly true. Missing proof is not proof. (Mirrors a promotion gate, not an informal check.)
- Tamper-evident receipts. Every decision is recorded as
(decision, metric, value, verdict)linked into a sha256 chain. Edit or delete any past receipt andverify_chain()returns false. The honest log is enforced by the structure, not by good intentions. - Human-gated by default. "Any irreversible/outward act got human approval" is a required check. Agents draft, humans approve.
Tools (over MCP)
The default ship gate encodes Fleet Mode: deterministic_checks_pass, independent_refute_review, no_secrets, human_gated_if_irreversible, honest_receipt_logged.
Install & wire into an MCP client
Add it to your MCP client (Claude Desktop / Claude Code) config:
Now your agent can call verify_gate(...) before it tells you it is finished, and you get a tamper-evident trail of what it decided. Receipts persist to ~/.agent-gate/receipts.jsonl (override with AGENT_GATE_LEDGER).
Use it directly (no MCP client needed)
Design
- Tested, stdlib-only core.
agent_gate/gate.py(fail-closed checklist) andagent_gate/ledger.py(hash-chained receipts) are pure stdlib: fast to read, fast to trust.agent_gate/server.pyis a thin MCP adapter over them (the one runtime dependency:mcp). - Tests pass on Python 3.11-3.13 (see CI). The MCP tools are tested by calling them, not just importing.
Tests
Demo
Run it yourself: PYTHONPATH=. python3 examples/demo.py
This repo gates itself
agent-gate is about not shipping unverified work, so the repository holds itself to the same bar:
- Coverage-gated test matrix —
ci.ymlruns pytest on Python 3.11–3.13 and fails the build if line coverage drops below the threshold (currently 97% covered). - CodeQL — static analysis (
security-extended) runs on every push, PR, and weekly; findings surface in the Security tab. - Pinned supply chain — every GitHub Action is pinned to a full commit SHA; Dependabot keeps those pins and the Python deps current.
- Branch protection —
mainrequires the CI and CodeQL checks to pass before a merge. - Disclosure policy — see SECURITY.md.
Contributing
See CONTRIBUTING.md.
About
Built by Jeff Otterson (Jott2121). agent-gate operationalizes the gating discipline from bow (an autonomous all-Claude chief-of-staff agent) and the Fleet Mode doctrine. Siblings in the same line: rag-guard and agent-cost-attribution. MIT licensed.
Companion instrument
sabot is the measurement side of this idea. agent-gate adds a fail-closed gate to an agent workflow; sabot plants controlled faults inside running LangGraph, CrewAI and AutoGen pipelines and measures whether gates and reviewer stages like these actually fire. Median own-check detection across three production frameworks: 16.7%, with a pre-registered spec, an Apache-2.0 harness, and every raw trace published.
Source: README.md at commit ef91c37
Tools
0Version history
1- v0.1.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts