Skip to content

How It Works Open-Core

Intutic is a transparent governance layer that sits between your AI agents and the LLM providers they call. It enforces policies, detects anomalies, tracks costs, and records every decision — without adding meaningful latency.

Architecture Overview

┌──────────────┐     ┌──────────────────────────────────────────┐
│  Claude Code │     │            Intutic Control Plane         │
│  Cursor      │────▶│                                          │
│  Aider       │     │  ┌──────────┐  ┌──────┐  ┌───────────┐  │
│  Windsurf    │     │  │  Proxy   │──│ PCAS │──│  Circuit  │  │
│  Antigravity │     │  │ Gateway  │  │      │  │  Breaker  │  │
│  Codex       │     │  └────┬─────┘  └──────┘  └─────┬─────┘  │
│  OpenHands   │     │       │                        │        │
│  n8n         │     │  ┌────▼─────┐  ┌──────┐  ┌─────▼─────┐  │
└──────────────┘     │  │  FinOps  │  │  ARE │  │   SOP     │  │
                     │  │  Ledger  │  │      │  │  Registry │  │
                     │  └──────────┘  └──────┘  └───────────┘  │
                     └──────────────────────────────────────────┘

                              ┌───────▼───────┐
                              │  LLM Provider │
                              │  (Anthropic,  │
                              │   OpenAI, …)  │
                              └───────────────┘

The Proxy Gateway

Every LLM request from your agents flows through the Intutic proxy. The proxy is transparent — agents don't need to change their code. The CLI's init command configures each harness to route through the proxy by setting the appropriate base URL or config variable.

How routing works per harness:

HarnessConfig FileMechanism
Cursor.cursorrulesMarkdown rules + project hooks.json
Claude CodeCLAUDE.mdMarkdown rules + PreToolUse hooks.json
Windsurf.windsurfrulesMarkdown rules + Cascade settings.json HTTP proxy
Aider.aider.conf.ymlextra-instructions YAML field
Antigravity.gemini/settings.jsoncustomInstructions JSON field
Codex.env.intuticANTHROPIC_BASE_URL / OPENAI_BASE_URL env vars
OpenHandsconfig.toml[intutic] TOML section with proxy_url
n8n.intutic/n8n/governance-workflow.jsonWorkflow parameters via n8n REST API
Cline.cline/hooks/hooks.jsonPreToolUse hooks + apiBase injection
Roo Code.roorulesMarkdown rules + cancel hooks
Continue.continue/config.jsonJSONC config file manipulation
Claude Desktopclaude_desktop_config.jsonDev override + MCP wrapping
Goose.agents/plugins/intutic-governance/hooks/hooks.jsonJSON plugin hook structure
Open WebUI.open-webui/intutic-governance-filter.pyPython inlet() filter hook
OpenClaw.openclaw/openclaw.jsonOpenClaw configuration file
Hermes.hermes/config.yamlYAML configuration file
Pi.pi/hooks.jsonPi agent hooks config

Proxy Response Post-Processor

The proxy gateway contains a dedicated Rust post-processing engine (response_postprocessor.rs / notification_client.rs). It acts as a consumer for workspace-level Valkey notification queues (gov:notify:workspace:{workspaceId}) and session-specific queues (gov:notify:{sessionId}).

When the proxy intercepts a streaming or block response from an LLM provider:

  1. It queries Valkey to drain any pending policy or budget notifications queued for that session.
  2. It formats notifications using markdown or plaintext formatters.
  3. It appends the compiled notifications block directly into the response stream inside a <!-- intutic-governance --> tag.
  4. The agent harness displays the injected feedback inline, warning developers immediately of budget overruns, compliance score drops, or recommended fixes.

Enforcement Actions (PCAS)

The Policy Compliance and Action System evaluates every request against your SOPs and applies one of four enforcement actions:

ActionWhat happensWhen it's used
BYPASSRequest passes through unmodifiedCompliant with all SOPs
ENHANCERequest is modified (prompt enrichment, model upgrade)SOP suggests improvements
HIJACKRequest is rerouted to a different model or modified substantiallyCost optimization, capability routing
KILLRequest is blocked entirelyPolicy violation, budget breach, anomaly detected

The Circuit Breaker

The circuit breaker is the runtime enforcement mechanism. It evaluates each request against:

  1. SOP rules — Does this request comply with active SOPs?
  2. Budget limits — Is the user/workspace within budget tier limits?
  3. Anomaly scores — Has the ARE flagged this session?
  4. Trust scores — What's the trust level of this agent session?

If any check fails, the circuit breaker applies the appropriate enforcement action.

SOP Lifecycle

SOPs (Standard Operating Procedures) are the policy documents that define governance rules. They follow a 7-state lifecycle:

DRAFT → PENDING_REVIEW → GENERATED → HYPOTHESIZED → REFINED → VALIDATED

                                                              INVALIDATED
StateMeaning
DRAFTInitial authoring, not yet active
PENDING_REVIEWSubmitted for team review
GENERATEDAuto-generated from observed patterns
HYPOTHESIZEDProposed rule being tested
REFINEDIteratively improved based on feedback
VALIDATEDActive and enforced
INVALIDATEDRetired or superseded

SOPs include:

  • Risk tierLOW, MEDIUM, HIGH, CRITICAL
  • Complexity tier — task complexity classification
  • Dependencies — other SOPs this one depends on
  • Markdown content — the actual policy rules

Changes to SOPs are classified as STRENGTHEN, CLARIFY, NARROW, or WEAKEN for audit trail.

Anomaly Detection (ARE)

The Autonomous Reasoning Engine detects 12 categories of runtime anomalies:

Anomaly TypeDescription
TOOL_ABUSEExcessive or inappropriate tool calls
TOKEN_WASTEInefficient token usage patterns
LOOP_DETECTEDAgent stuck in a retry/repeat loop
UNAUTHORIZED_TOOLCalling tools outside allowed set
DATA_EXFILTRATIONAttempting to leak sensitive data
PROMPT_INJECTIONMalicious prompt manipulation detected
HALLUCINATIONModel generating fabricated information
SCOPE_VIOLATIONOperating outside defined task scope
BUDGET_BREACHExceeding allocated budget
SPAWN_BUDGET_BREACHSub-agent spawning over limits
WORKFLOW_BUDGET_BREACHMulti-step workflow over budget
WORKFLOW_GOAL_DRIFTWorkflow deviating from stated objective

FinOps Ledger

Every execution trace records:

  • Input/output token counts
  • Model used and actual cost in USD
  • Enforcement action applied
  • Token utility classification (USEFUL or WASTED)

Budget tiers control spending limits per developer level:

TierRole
JUNIORJunior developers — lowest budget ceiling
SENIORSenior developers
STAFFStaff engineers
PRINCIPALPrincipal engineers — highest budget ceiling

Sync Daemon

The intutic connect command starts a long-lived sync daemon that:

  1. Polls the control plane for SOP updates (default: every 30 seconds)
  2. Detects which harnesses are present in the workspace
  3. Writes updated governance config to each harness's config file
  4. Reports sync state back to the control plane
  5. Uses atomic writes (tmp file + rename) to prevent file corruption

The daemon supports all 18 harness adapters and handles each one's config format natively.


Dual-Path Telemetry Fallback

To prevent data loss and bypasses during command executions, Intutic hooks implement a dual-path telemetry reporting mechanism:

  1. Path A (Real-Time API): When a command executes, the hook makes an asynchronous, non-blocking HTTP POST request directly to the control plane /api/v1/hook-events endpoint using the workspace API key.
  2. Path B (Local Log Fallback): Simultaneously, the event is appended to .intutic/events/hook-events.jsonl in the workspace root.

The sync-daemon monitors this log file in real time using FSEvents/inotify (chokidar). As soon as a modification is detected, the daemon drains the log file and sends the events to the control plane, ensuring that even if Path A fails due to network isolation, all governance audits are preserved.


Active Network Probes

To detect if a developer has bypassed the proxy gateway or disabled system-level firewall redirection:

  1. The sync-daemon periodically fires background HTTP requests directly to standard provider endpoints (e.g. https://api.anthropic.com/v1/messages) bypassing localhost routing.
  2. If this direct connection succeeds, it indicates that the network is uncontained.
  3. The daemon instantly raises a network_bypass incident of CRITICAL severity to alert administrators via the performance dashboard.

The active firewall for AI agents