Fredrik Brattén
Private runtime · public-safe synthetic explainer

Gate Monitor makes long-running AI-agent decisions explicit.

A deterministic runtime governor that folds cost, time, progress, errors, quality and memory signals into bounded decision states with inspectable reasons and reports.

Python 3.11+ Pydantic Typer CLI MCP stdio JSONL evidence 279 source-reported tests 3 dogfood flows

The engineering problem

An agent can keep spending time, tokens and money while making little progress. It can repeat the same retrievals, approach context saturation or continue despite failing tests. A useful runtime needs more than a final success/failure flag.

Observe

Record structured run events, progress signals, costs, quality results and memory-hygiene measurements.

Decide

Compare evidence with a policy and select a stable state through an explicit priority order.

Explain

Return thresholds, findings and reasons through CLI, MCP, JSON and Markdown reports.

Implemented decision path

Structured eventsStart, progress, error and other events carry cost, token, progress, quality and memory metadata.
Deterministic foldsTotal cost, elapsed time, time since progress, consecutive errors, quality counts and memory peaks are calculated.
Policy comparisonRuntime, quality and memory results are checked against configured thresholds and actions.
Priority selectionThe most severe applicable state wins while lower-priority findings remain attached to the decision.
Evidence surfacesCLI, MCP, JSONL session views and Markdown reports expose the result and supporting reasons.
terminate>escalate_to_human>pause>needs_quality_review>warn>continue

Synthetic decision demonstrator

Select a preset or change the values. The browser reproduces the documented decision ordering for fictional data only. It does not import or execute the private Gate Monitor package.

Fictional run evidence

Demo policy: cost 5 USD, runtime 120 min, no progress 20 min, repeated errors 3, context usage 0.80, repeated retrievals 4, test failures 2, lint failures 3.

CLI and MCP

The private implementation packages the same run, policy, decision and report logic behind a Typer CLI and a local stdio MCP server.

  • 6 MCP tools
  • 6 MCP resources and templates
  • strict and resilient session reads
  • structured operator-error payloads

Filesystem safety

MCP-supplied report paths are confined to the configured Gate Monitor root.

  • traversal rejected
  • absolute outside-root paths rejected
  • symlink escapes rejected
  • rejection happens before file write

Evidence record

Private source repositoryfbratten/gate-monitor
Current documentation pin90f9845d6fde1b1ba902473afea2bb79dfab9877
Inspected runtime pin193821edcacca87d286292e5f568c6aad9c808df
Output-confinement implementationf3c30f4ce7e512cdd92615bd8fa82892843c9455
Source-reported verification279 passing tests, one environment-dependent skip and three green dogfood scripts.
Verified2026-08-02
Public demo executionBrowser-only synthetic calculation. No filesystem, MCP, model or network operation.

Explicit limitations

This page explains a deterministic runtime-governance design. It is not the private Python runtime, not a hosted multi-tenant service and not a live view of any real AI session.

Supported

  • policy-driven decision states
  • quality and memory findings
  • CLI and local MCP surfaces
  • source-reported tests and dogfood
  • bounded report-path handling

Not claimed

  • remote authenticated control plane
  • container or kernel isolation
  • autonomous LLM quality judgement
  • distributed concurrent event log
  • new verification run by this showcase