Concepts

Concepts

FORG is built around a small set of primitives that compose into a complete observability and policy system. Understanding these building blocks makes it much easier to configure rules, interpret dashboard data, and build on the API.

Architecture overview

Every FORG deployment has three layers:

  1. Adapters — thin hooks in your AI tools (Claude Code, Cursor, etc.) that emit structured signals to the local agent over HTTP.
  2. Local agent — the forgbinary running on the developer's machine. It authenticates signals with HMAC-SHA256, buffers them, and forwards batches to the Rule Engine at forg.pro/engine/v1/.
  3. Rule Engine + Dashboard — a Cloudflare Worker that classifies signals, evaluates rules in real time, stores behavioral data in Supabase + pgvector, and surfaces insights via the dashboard and API.

No prompt or completion text is ever transmitted. Every signal is metadata-only: model, token counts, latency, cost, and error code.

Core concepts

Key terms

TermDefinition
SignalA single structured event emitted by an adapter after an AI tool call. Contains model, tokens, cost, and context IDs.
SessionA contiguous sequence of signals from one developer with less than 30 min of inactivity between them.
RuleA policy evaluated against each incoming signal. Rules have conditions (e.g., cost > $0.50/day), actions (block, warn, notify), and a scope (user, team, org).
BudgetA special rule type that enforces a cumulative cost or token limit over a rolling window (daily or monthly).
AdapterAny component that emits signals to the local FORG agent. First-party adapters exist for major AI tools; third-party and custom adapters use the open protocol.
ProjectA grouping of signals by repository or codebase, identified by a project_id. Used for per-project cost attribution.
AnomalyA statistical deviation from a baseline, detected by the intelligence layer. Examples: sudden spike in tokens, unexpected model usage.
© 2026 UpgradIQ, Inc.Edit this page on GitHub