CCode Story: Insights from Startup Tech Leaders
← All frameworks
Strategy

Runtime Intent Control Loop

Continuously compare agent behavior with business intent and enforce policy

Difficulty
Advanced
Time to result
~months to results
Steps
5
Confidence
95%

Traditional controls decide who gets through the gate, but legitimate credentials cannot reveal whether an AI agent later drifts from its intended purpose. The Runtime Intent Control Loop moves control into production: establish each agent's approved scope, observe its actions and intermediate behavior, compare them with business intent, and enforce policy before harmful actions accumulate. The same telemetry creates a continuous record of which tools, data, and destinations each session touched. This turns governance from a periodic design review into an operational capability. The mechanism also changes the security-versus-utility trade-off: when teams can detect and contain deviations quickly, they can permit useful access without relying exclusively on extreme restriction.

Origin

Extracted from Code Story: Insights from Startup Tech Leaders

Core principles

  • 01Access approval does not prove safe behavior after entry
  • 02Agent actions must remain consistent with business intent
  • 03Continuous evidence is stronger than periodic attestation
  • 04Runtime controls should enable broader safe adoption

How to run it

  1. 1

    Define intended behavior

    Document the agent's approved goal, data access, tools, destinations, and permitted actions. Make the boundary specific enough to distinguish normal behavior from semantic drift.

    Pro tip Tie the scope to the business task rather than only to an identity or credential.

    Watch out Legitimate access does not guarantee legitimate behavior after entry.

  2. 2

    Instrument runtime activity

    Capture session identities, tool calls, data access, outputs, and lower-level process behavior where necessary. Preserve enough context to see harmful patterns that individual calls may hide.

    Pro tip Aggregate behavior across the whole execution instead of inspecting only the API boundary.

    Watch out Network and identity layers reveal who and where, but not the complete what.

  3. 3

    Detect drift

    Continuously compare observed behavior with the stated goal and approved scope. Flag unexpected destinations, changed goals, excessive queries, cross-agent access, and unauthorized writes.

    Pro tip Evaluate harmful behavior in aggregate as well as one action at a time.

    Watch out AI incidents can resemble normal API traffic until the actions are considered together.

  4. 4

    Enforce immediately

    Stop the out-of-policy execution at runtime rather than waiting for a later incident-response cycle. Apply the narrowest effective control to limit harm without disabling unaffected work.

    Pro tip Measure and reduce detection latency because it bounds the blast radius.

    Watch out Post-event pod restarts and credential rotation cannot undo completed actions.

  5. 5

    Prove and improve

    Retain the timeline of actions and enforcement decisions as continuous evidence. Feed the findings back to developers and refine policy as legitimate behavior evolves.

    Pro tip Give developers the reason for every block so security signals accelerate remediation.

    Watch out A policy document without enforcement evidence is attestation, not proof.

In the wild

Agent sends data to an unexpected endpoint

A production agent has valid credentials and normally sends approved records to an internal service. Runtime monitoring detects it beginning to transmit customer data to an unexpected external destination. The control loop compares that destination with the agent's approved scope, stops the execution, and preserves the session timeline for investigation.

→ The organization limits exfiltration before a slower alert-and-ticket cycle can respond.

Tool use drifts beyond scope

An agent approved to read from a system begins making write and delete calls. Although each request uses legitimate access, the observed behavior violates its business intent. Runtime policy blocks the new actions and records which calls were attempted.

→ Useful read access remains available while unauthorized changes are prevented.

Common mistakes

Stopping at the access gate

Identity and network checks finish before the agent's consequential behavior begins. Treating successful authentication as sufficient leaves semantic drift invisible.

Watching only inputs and outputs

The application boundary can miss tool calls, memory access, file activity, and process behavior occurring during execution.

Using policy without evidence

Periodic approval and a policy document do not prove that production actions complied with policy.

Is it for you?

Best for

It is best for enterprises running AI agents that can access sensitive data, tools, external services, or production workflows.

Not ideal for

It is not ideal for isolated experiments that have no meaningful data, tool, network, or production access.

From the transcript

“Does it behave consistently with business intent that you desire?”

Craig Thomas · 05:38

“Governance becomes evidence-based rather than attestation-based.”

Craig Thomas · 16:39

“And I can show you exactly where policy was enforced and where it wasn't.”

Craig Thomas · 18:34

From the episode

The AI Control Loop: What's Missing in AI Security Today - with Craig Thomas of Wallarm

→