{"slug": "show-hn-aaf-gate-policy-gate-and-kill-switch-for-existing-agent-runtimes", "title": "Show HN: Aaf-gate – policy gate and kill switch for existing agent runtimes", "summary": "A developer released aaf-gate 1.0.0rc1, a policy gate and kill switch that sits in front of tool calls for existing AI agent runtimes, with its primary target being Hermes Agent pinned at v0.23.1 for a Mac mini appliance track. The tool applies deterministic per-tool-class decisions (read, draft, internal_write), adds a gate-stop/gate-resume/gate-status kill switch, per-window call limits (3600 s; read 160, draft 40, internal_write 80), and an append-only hash-chained SQLite audit log, using only the Python standard library in core/ with 719 local unit tests passing. The author states aaf-gate is not production-ready, not yet device-accepted, makes no compliance claims, and has not been granted Google Gmail Developer Preview access; Pilot 1 scope is reading Gmail, categorizing, and drafting a reply, with no send capability.", "body_md": "Deterministic policy gate, kill switch, call limits and tamper-evident audit for existing AI agent runtimes. **Not an agent of its own.** Models, providers and the agent loop are not reimplemented. The primary runtime is [Hermes Agent](https://github.com/NousResearch/hermes-agent) (pinned at v0.23.1 for the Mac mini appliance track). Adapters can target other runtimes later.\n\nCore version **1.0.0rc1** (v1 candidate). See [CHANGELOG.md](https://github.com/buberlo/aaf-gate/blob/main/CHANGELOG.md), [docs/v1/STATUS.md](https://github.com/buberlo/aaf-gate/blob/main/docs/v1/STATUS.md) and [docs/v1/INSTALLATION-AND-OPERATIONS.md](https://github.com/buberlo/aaf-gate/blob/main/docs/v1/INSTALLATION-AND-OPERATIONS.md).\n\naaf-gate sits in front of tool calls and applies a deterministic policy per tool class:\n\n- **read** — allow or deny reads (for example Gmail search)\n- **draft** — allow or deny drafts (for example a reply draft; sending is out of scope)\n- **internal_write** — allow or deny internal writes (for example labels); unattended internal writes stay blocked\n\nIt also provides:\n\n- a **kill switch** (`gate-stop` /`gate-resume` /`gate-status` ) that stops further work for a principal\n- **call limits** per time window and tool class (tool-call counts, not model-token cost)\n- an append-only, hash-chained **audit log** in SQLite\n- **backup and restore** with a chain anchor (`gate-backup` /`gate-restore` )\n- versioned, locked **industry templates** and example customer profiles\n- a **device acceptance pack** for a Mac mini appliance (track A)\n\nPilot 1 scope: read Gmail, categorize, and draft a reply. No send.\n\n```\ntool call\n  → gate            (class decision)\n  → GateKeeper      (policy, limits, kill switch, audit)\n  → hermes_adapter  (Hermes hook mapping)\n  → gatesocket      (Unix socket)\n  → Hermes plugin aaf-gate 0.5.0 (pre_tool_call / post_tool_call)\n```\n\nPython standard library only in `core/`. No third-party Python dependencies.\n\nThis is a **v1 candidate (1.0.0rc1)**. It is implemented and unit-tested locally. It is **not production-ready**, **not yet device-accepted**, and it makes **no compliance claims**.\n\n| Implemented and unit-tested locally | yes ( `Ran 719 tests` ,`OK` , Python stdlib) | \n| Tested on the target Mac mini | no | \n| Google Gmail Developer Preview access | not granted yet | \n| Production | no | \n| Send mail, computer use, own agent loop | not included | \n\nStart values for the call-limit window are assumptions in the Pilot 1 policy (3600 s; read 160, draft 40, internal_write 80) and will be reset after a pilot week from recorded `gate_calls`.\n\n```\ncd core\npython3 -m unittest discover -s tests -q\npython3 -m framework.cli version\n```\n\n`version` prints `core_version`, `schema_version` and `ok` as JSON. Further commands (`python3 -m framework.cli <command>`):\n\n| Command | Arguments | \n|---|---|\n| `verify-install` | `package`` target` [`--package-hash` ] | \n| `verify-plugin` | `installed` (`--digest` \\|`--package` ) | \n| `plugin-digest` | `dir` | \n| `gate-serve` | `--db``--socket``--principal` [`--server` gmail] [`--mode` 0600] [`--group` ] [`--unattended` ] | \n| `gate-plist` | `--label``--python``--workdir``--db``--socket``--principal``--user` [`--group` ] [`--server` gmail] [`--mode` 0600] [`--unattended` ] [`--log` ] | \n| `verify-launchd` | `installed``--package` | \n| `verify-hooks` | `home` | \n| `verify-relay` | [ `--home` ] [`--system-root` /] | \n| `pin-audit` | `source`` config` | \n| `verify-hermes-dump` | `dump_file``--package` | \n| `verify-hermes-probe` | `probe_file``--package` | \n| `verify-device` | `--package``--installed``--package-hash` [`--managed-dir` /etc/hermes]`--hermes-home``--plugin``--launchd``--dump` [`--home` ] [`--system-root` /] [`--profile` ] [`--allowed-profile` ] [`--audit-anchor` ] | \n| `gate-init` | `--db``--principal``--tenant` [`--package` ] [`--kind` agent] | \n| `gate-audit` | `--db``--tenant` [`--limit` 50] [`--summary` ] [`--since` ] [`--until` ] [`--anchor` ] | \n| `gate-principal-add` | `--db``--principal``--tenant``--role` | \n| `gate-stop` | `--db``--principal` | \n| `gate-resume` | `--db``--principal` | \n| `gate-status` | `--db``--tenant` | \n| `gate-backup` | `--db``--out` | \n| `gate-restore` | `--backup``--db` [`--expect-anchor` ] | \n| `pilot-baseline` | `--summary``--timesheet` [`--min-samples` 5] [`--require-clean` ] | \n| `version` | — | \n\nDevice installation, operation, backup and the acceptance probes are described in [docs/v1/INSTALLATION-AND-OPERATIONS.md](https://github.com/buberlo/aaf-gate/blob/main/docs/v1/INSTALLATION-AND-OPERATIONS.md). That guide has not been executed on a device yet.\n\n```\ncore/          Python core (stdlib), CLI, tests\nadapters/      Runtime adapters (Hermes plugin: adapters/hermes/aaf-gate/)\ntemplates/     Versioned industry templates\nprofiles/      Synthetic example profiles\ndocs/v0.4/     Product direction\ndocs/v0.5/     Notes on implemented increments\ndocs/v1/       Honest status and install/operations guide\ndocs/adr/      Architecture decisions\nCHANGELOG.md\nLICENSE        Apache-2.0\n```\n\nCopyright 2026 Konrad Kern. Licensed under the Apache License, Version 2.0. See [LICENSE](https://github.com/buberlo/aaf-gate/blob/main/LICENSE).\n\nHermes Agent is a separate project by Nous Research, licensed under MIT. This repository contains adapter and plugin code that talks to Hermes hooks; it does not vendor the Hermes source tree.", "url": "https://wpnews.pro/news/show-hn-aaf-gate-policy-gate-and-kill-switch-for-existing-agent-runtimes", "canonical_source": "https://github.com/buberlo/aaf-gate", "published_at": "2026-11-22 22:17:07+00:00", "updated_at": "2026-11-22 22:45:52.863309+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "ai-tools", "developer-tools"], "entities": ["aaf-gate", "Hermes Agent", "NousResearch", "Google Gmail", "Mac mini", "SQLite", "Python"], "also_reported_by": [], "takeaway": "aaf-gate 1.0.0rc1 gates agent tool calls by class (read, draft, internal_write) with a kill switch, per-window call limits and a hash-chained SQLite audit log, installable with no third-party Python dependencies.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-aaf-gate-policy-gate-and-kill-switch-for-existing-agent-runtimes", "markdown": "https://wpnews.pro/news/show-hn-aaf-gate-policy-gate-and-kill-switch-for-existing-agent-runtimes.md", "text": "https://wpnews.pro/news/show-hn-aaf-gate-policy-gate-and-kill-switch-for-existing-agent-runtimes.txt", "jsonld": "https://wpnews.pro/news/show-hn-aaf-gate-policy-gate-and-kill-switch-for-existing-agent-runtimes.jsonld"}}