← Work

Agent Governor

An autonomous agent proposes real actions; a deterministic governor decides which can run without a human. The LLM handles perception - reading risk from meaning - while fixed rules make the decision, so it stays predictable and auditable. One engine serves multiple domains, and it is measured against human judgment rather than assumed correct.

How it works

Hover, tap, or tab through any component to see what it does and the tech behind it.

This diagrams the n8n build (code in the repo's /n8n folder, with its own numbers). The from-scratch Python implementation lives in the repo root and is evaluated separately.

External sourceSystem componentGovernor - deterministic core
Adaptive governance - real-time, one engine for any domainEvaluation - measured against human judgment (offline)logtoolsRequestchat or APIIntake Agentclassify domain · source · draftextract risk signalsconversation memoryGovernorrisk score → decisionDETERMINISTIC · NO LLMAUTOruns automaticallyESCALATEhuman reviewHOLDdeferred · load-shedGovernance logevery decisionPERSISTENT STATEGitHub searchreal profilesWeb searchliveContact historydedup · reads stateHuman-labeled set40 realistic + 12 adversarialGovernor (same)decision per case~85% agreementwith human judgmentAdversarial split exposed keyword brittleness -which motivated the LLM signal-reading in the live agent.An LLM-as-judge separately grades draft quality.

Hover, tap, or tab through any component for what it does and the tech behind it.

What sits under the diagram

The diagram is the framework. These are the ideas it encodes.

Perception vs. judgment

The LLM reads risk from meaning (competitor, seniority, sensitive content, manipulative tone); the deterministic rules score and decide. Flexible where it helps, provable where it must be.

Domain-agnostic

One governance engine, two domains - recruiting outreach and refund approvals. Only the signal set changes; the thresholds, load-shedding, and routing are identical.

Bounded self-improvement

A separate, manually-run pass mines new risk terms from misses and adopts a change only if it validates on held-out data without breaking the zero-dangerous invariant - human-approved.

Scope & production path

A prototype: the agent drafts and the governor decides - it does not send. The same governance engine also exists as a Python reference. For production - real auth, higher volume, the approved action wired behind the ESCALATE gate - the deterministic core moves into a queue-backed service; n8n Cloud runs the demo, self-hosted queue-mode workers are the horizontal-scale route.

Built from scratch as a deterministic Python governance engine, and as a live n8n workflow- agent, tools, governor, and persistent state in one runnable flow - on OpenAI gpt-5-mini, GitHub Search, live web search, and n8n Data Tables. The LLM handles perception; deterministic rules make the decision. At production scale, the deterministic core moves out of the workflow into a dedicated queue-backed service.