agent-gate introduces a structured, fail-closed quality gate for AI agent workflows. By implementing deterministic checks and an independent review process, it guarantees accountability and quality. With tamper-evident receipts documenting decisions, agent-gate transforms how AI agents work, preventing costly silent failures.
agent-gate is a server designed to enhance the quality control of AI agent workflows by implementing a fail-closed quality gate combined with a hash-chained receipt ledger. This approach ensures that AI agents can only claim their tasks as "done" after passing mandatory deterministic checks and an independent review process, leaving behind a transparent, tamper-evident audit trail.
To verify an agent’s work and track decisions, use the following code snippet:
agent: "done!" -> verify_gate(evidence) -> { passed: false, blocking: ["independent_refute_review", "no_secrets"] }
The repository includes several tools that facilitate interaction with the gate mechanism:
| Tool | Description |
|---|---|
gate_checklist(name="ship") | Retrieves the checklist the agent must complete before declaring completion. |
verify_gate(evidence, name="ship") | Evaluates the evidence provided by the agent in a fail-closed manner, returning the outcome and any blocking issues. |
record_receipt(decision, metric, value, verdict) | Logs a receipt that is hash-chained, ensuring audit trails remain intact. |
read_receipts() | Retrieves all records from the ledger and checks the integrity of the chain. |
The default checklist for the ship gate includes the following checks: deterministic_checks_pass, independent_refute_review, no_secrets, human_gated_if_irreversible, and honest_receipt_logged.
agent-gate has been rigorously developed using Python's standard library, ensuring reliability and performance. The most recent tests confirm compatibility with Python versions 3.11 through 3.13, reinforcing the framework's stability and efficiency. To maintain code quality, developers can run the provided test suite with:
pip install -e ".[dev]" && python -m pytest -q
For those interested in contributing to agent-gate, please refer to the CONTRIBUTING.md file for guidelines and best practices.
No comments yet.
Sign in to be the first to comment.