Skip to main content
Concepts

Concepts

FORG is built around a small set of primitives that compose into a complete observability and cost-control system. Understanding these building blocks makes it much easier to configure budgets, 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 FORG ingestion at forg.pro/engine/v1/.
  3. Ingestion + Dashboard — a Cloudflare Worker that classifies signals, checks budgets, stores behavioral data in Supabase Postgres, 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.
BudgetA daily or monthly cost/token limit with alert thresholds and optional gateway hard-blocks.
AlertA notification triggered by a budget threshold or detected anomaly.
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 heuristic flag raised when usage deviates from recent patterns. Examples: sudden spike in tokens, unexpected model usage. Statistical/baseline detection is on the roadmap.
© 2026 FORG by UpgradIQ, Inc. All rights reserved.Edit this page on GitHub