What it is

Gate Console: Policy Engine is a working front-end prototype of a trust review dashboard for AI agents. Every pending agent tool call sits in an approval queue, and a real, deterministic policy engine scores each call on screen and produces the verdicts, reasons, and audit trail you see.

What inspired me

This builds on my earlier project gate-console (Hyperbloom October UI/UX hackathon). That version was a UI/UX design prototype with a hand-written demo script. This edition turns the gate itself into real, running software.

How I built it

Plain JavaScript, no build step, no dependencies, no API keys. engine.js is a pure, deterministic policy engine that scores every pending agent call against configurable policy: prompt-injection heuristics over retrieved evidence, a wire-transfer auto-approve ceiling, a payee cooling period, an egress allow-list, and approved-template matching for customer-facing replies. Verdicts are derived, not hardcoded: the most severe reason wins (block > review > pass), and every reason carries a stable code (INJ_IGNORE, AMOUNT_CEILING, EGRESS_MISS) so the audit log stays explainable.

I also built the what-if policy re-run: change the wire ceiling, cooling period, or any toggle, press Apply, and the whole pending queue re-evaluates live, reporting exactly how many verdicts changed and the before/after tally. Approving or blocking a call writes the decision to the audit log with the engine's reason codes attached. tests.html is the engine's own browser test suite: 16 assertions covering injection blocking, ceiling and cooling review holds, egress enforcement, template matching, severity ordering, determinism, and batch re-runs.

Challenges I ran into

Keeping every verdict derived rather than hardcoded so the audit log always explains itself, and making the what-if re-run deterministic enough to report exactly how many verdicts changed.

What I learned

How much structure a small policy engine needs so its decisions stay explainable and testable, and how a written honest-scope statement keeps a prototype trustworthy.

What's next

Backing the engine with a small backend so decisions persist, then running it against live agent tool calls instead of the synthetic demo queue.

Honest scope

This is a front-end prototype with demo data: no backend, no real payments, inboxes, hosts, or agents are involved, and all demo data is synthetic. The injection detection is deterministic keyword/regex heuristics, not a machine-learning model: it catches clear instruction-injection patterns and misses paraphrased ones.

Built With

Share this project:

Updates

Submission history