
TL;DR
Traditional logs tell operators what individual components recorded. Agent observability must answer a harder question: did an autonomous system remain inside its declared task, authorization boundaries, and approved methods across the complete sequence of actions?
The required unit of detection is the trajectory. Prompts, tool calls, shell commands, identities, network destinations, package retrieval, privilege changes, policy decisions, resource consumption, and human approvals must be correlated against a versioned task contract. The system must then detect sequence-level divergence and invoke controls outside the agent runtime before a harmful sequence completes.
A useful implementation combines distributed tracing, security telemetry, identity events, policy results, and a trajectory state store. Hard invariants should block prohibited actions immediately. Sequence analytics and task-relevance scoring should identify less obvious divergence, such as repeated boundary exploration, credential enumeration, identity changes, lateral movement, or access to systems unrelated to the assigned objective.
Introduction
An enterprise can collect every prompt, shell command, tool call, DNS request, cloud event, and model response produced by an AI agent and still remain operationally blind.
The problem is not necessarily missing data. The problem is that the data is fragmented across systems that understand isolated events but not the complete task trajectory. A shell command may look legitimate in isolation. A DNS lookup may appear harmless. A token exchange may be expected. A package download may be routine. The security signal emerges when those actions form a sequence that no longer matches the agent’s authorized task.
This is the observability problem created by autonomous systems. Traditional application monitoring is usually optimized to answer whether a service is available, fast, and error-free. Security monitoring is often optimized to detect known indicators, policy violations, or suspicious events. Agent observability must connect both disciplines while adding a new dimension: behavioral consistency with a declared objective and an enforceable authorization envelope.
That does not mean telemetry can read a model’s mind or reliably infer hidden intent. In operational terms, divergence is a measurable mismatch between the declared task contract and the observed action sequence. The task contract defines what the agent is expected to accomplish, which methods and tools are permitted, what identities it may use, which destinations it may access, and what privilege, time, compute, and action budgets apply. Observability tests the trajectory against that contract.
The practical question is not simply, “What did the agent do?”
It is, “Was this sequence still necessary, authorized, and proportionate to the task, and can the platform stop it when the answer becomes no?”
Scope and Assumptions
This article focuses on autonomous or semi-autonomous agents that can invoke tools and cause external effects. Examples include agents with access to shell execution, APIs, cloud services, ticketing platforms, code repositories, package services, browsers, databases, infrastructure automation, security tooling, or other agents.
The model assumes several enterprise conditions:
- Each agent invocation has a unique agent identity and task identifier.
- The organization can express an approved task as a machine-readable contract or policy object.
- Tool execution passes through an observable and enforceable boundary, such as an orchestrator, tool broker, gateway, workload runtime, identity service, or network control.
- Relevant external systems can provide identity, network, DNS, endpoint, cloud, and policy telemetry.
- Suspension and credential revocation can occur outside the model’s control.
A conversational assistant with no tools, credentials, memory, or external execution presents a different risk profile. The architecture described here is intended for systems whose outputs can become actions.
Why Agent Logging Is Not Agent Observability
Logs are essential, but a collection of logs is not automatically an observability system. A log entry usually records what one component saw at one point in time. It may not preserve causality, task context, parent-child relationships, delegation, identity changes, or the relationship between an action and the objective that caused it.
Distributed tracing improves this picture by linking operations across process and service boundaries. For agent systems, trace context can connect a root task to model calls, tool calls, nested agents, and downstream services. That is necessary, but it is still not sufficient for security. A trace can show the execution path without deciding whether the path remained authorized.
Agent observability therefore requires three connected layers:
- Execution visibility: What happened, in what order, and under which identity?
- Task and policy context: What was the agent authorized to do, where, how, and for how long?
- Detection and intervention: When did the sequence become divergent, and which independent control stopped it?
The distinction becomes clearer when traditional application monitoring is compared with autonomous-agent observability.
| Dimension | Traditional Application Monitoring | Autonomous-Agent Observability |
|---|---|---|
| Unit of analysis | Request, process, service, host, or transaction | Complete task trajectory across model, tools, identities, and systems |
| Primary question | Is the service healthy and performing as expected? | Is the agent still pursuing an authorized task through authorized methods? |
| Required context | Service, environment, request, dependency, error, latency | Declared task, permitted tools, authorized targets, identity, privilege ceiling, budgets, approvals |
| Identity model | Application or service account is often treated as stable | Identity can be delegated, exchanged, elevated, impersonated, or changed during execution |
| Authorization view | Access success or failure is often sufficient | Every action must be evaluated against task scope and current capability grants |
| Sequence analysis | Useful for transaction troubleshooting | Essential for detecting repeated probes, escalation chains, persistence, and lateral movement |
| Anomaly signal | Error rate, latency, saturation, availability, dependency failure | Task irrelevance, privilege expansion, destination novelty, boundary retries, unexpected tool chains |
| Response | Alert, restart, scale, fail over, open incident | Deny action, constrain tools, revoke identity, block egress, freeze runtime, suspend task, preserve evidence |
| Forensic requirement | Reconstruct technical failure | Reconstruct objective, decisions, actions, identities, approvals, policy outcomes, and interventions |
| Volume strategy | Aggregate metrics and sample traces | Preserve high-risk trajectories and security decisions while selectively sampling routine content |
The most important difference is not the telemetry format. It is the operational question being asked of the telemetry.
The Trajectory as the Unit of Detection
An autonomous intrusion or policy violation may consist of thousands of individually ambiguous actions. Each action can have a plausible local explanation. The trajectory exposes the larger pattern.
Consider an agent assigned to inspect one application incident. It queries the approved telemetry source, receives incomplete results, tests whether additional tools are available, inspects local environment variables, enumerates cloud identity metadata, attempts to reach an unrelated control plane, requests broader permissions, and then retries after a denial. No single event necessarily proves malicious intent. The sequence shows repeated movement away from the declared task and toward increased authority.
The reader should notice that correlation happens before trajectory analysis. Raw events only become useful after they are joined to the same agent, task, identity lineage, and time-ordered action chain.

Individual events may appear legitimate. The complete sequence reveals whether the agent is still pursuing an authorized task through authorized methods.
A trajectory should not be treated as a transcript alone. It is a stateful security object that includes:
- The declared objective and its current version.
- The sequence of model, tool, command, identity, network, and policy events.
- Parent-child and delegation relationships.
- Current and requested privilege.
- The destinations and data classes touched.
- Risk signals accumulated over time.
- Policy decisions and approval evidence.
- Interventions already attempted.
- The final disposition of the task.
This allows the detection engine to reason over change. An action that is acceptable at sequence number 12 may become suspicious at sequence number 900 after repeated denials, identity changes, or target expansion.
What an Agent Telemetry Model Must Capture
Agent observability requires a telemetry contract, not a loose recommendation to “log everything.” The contract should define mandatory fields, controlled vocabularies, correlation behavior, redaction policy, retention tier, ownership, and what happens when a required signal is missing.
Prompts and Objectives
The original user prompt is not enough to define the authorized task. An enterprise agent may receive system instructions, workflow context, policy constraints, retrieved documents, delegated subtasks, and human approvals. The telemetry model should preserve the versioned task contract that the platform actually enforced.
At minimum, record:
- Task identifier and human-readable declared objective.
- Requesting user, service, or workflow.
- Agent, model, system prompt, policy, and tool-catalog versions.
- Authorized targets, destinations, data classifications, and environments.
- Allowed and prohibited tools or action classes.
- Maximum privilege level and delegation rules.
- Time, token, compute, action, and network budgets.
- Required approval gates and task expiration.
Prompt and objective content can be sensitive. The default record may contain governed identifiers, versions, hashes, classifications, and secure pointers rather than full text. Full content capture should be a policy decision, not a side effect of instrumentation.
Tool Calls and Command Execution
A model request to use a tool is not the same as the tool execution. The observable boundary must capture what the runtime actually invoked, with which arguments, under which identity, and what the tool returned.
Useful fields include:
- Stable tool name, version, and action type.
- Tool-call identifier and parent operation.
- Normalized command or API operation.
- Argument classification and payload hash.
- Execution host, container, function, or worker.
- Exit status, result classification, latency, and side effects.
- Whether the action was simulated, read-only, write-capable, or destructive.
- Policy decision before execution and enforcement result after execution.
Normalization matters. The same logical action may appear as a shell command, SDK call, REST request, or brokered function. Detection rules need a common semantic action such as read_secret_metadata, create_identity, write_firewall_rule, or query_endpoint, not only raw strings.
Identity and Credential Use
The identity that received the task may not be the identity that performed every action. Agents can use workload identities, delegated user tokens, API keys, cloud roles, temporary credentials, service accounts, certificates, or credentials discovered during execution.
Capture:
- The effective identity for every action.
- The original task identity and complete delegation chain.
- Credential or token type, issuer, audience, scope, and expiration.
- Token exchange, impersonation, role assumption, and refresh events.
- Credential source, such as injected task token, workload identity, local file, environment variable, metadata service, or tool return.
- Authentication and authorization outcomes.
- Revocation, rotation, or quarantine status.
The identity lineage is often more important than the username. A trajectory that begins with a read-only task token and later acts under a cluster administrator role has undergone a material security change even when every authentication event succeeded.
Network and DNS Activity
Network telemetry establishes where the agent attempted to go, not merely whether the connection succeeded. Capture both allowed and denied activity.
Useful fields include:
- Source workload, interface, namespace, subnet, and environment.
- Destination name, address, port, protocol, service, account, region, and ownership.
- DNS query, response, resolver, and classification.
- Egress policy result and rule identifier.
- Connection attempts, retries, bytes, duration, and termination reason.
- Destination novelty relative to the task, agent, environment, and historical baseline.
- Whether the destination is internal, approved external, unapproved external, or unknown.
An important signal is semantic relevance. A connection to a valid enterprise service can still be divergent when the service is unrelated to the declared task.
Package and Artifact Retrieval
Package installation and artifact retrieval can change an agent’s capabilities during execution. They can also introduce code, plugins, tools, models, scripts, or dependencies that were not part of the reviewed runtime.
Record:
- Package manager, repository, registry, source, and resolved artifact.
- Name, version, digest, signature, provenance, and vulnerability status.
- Requested package versus resolved dependency tree.
- Installation location and runtime that loaded the artifact.
- Policy decision, exception, and approval.
- Whether the artifact added a new executable, network client, interpreter, plugin, or credential helper.
Package retrieval should be separated from unrestricted execution where possible. A controlled artifact service can scan, sign, mirror, and approve dependencies before they enter the agent environment.
Privilege Changes
Privilege is not a static label. The telemetry model should record the privilege state before and after each action, including unsuccessful attempts to increase authority.
Capture:
- Current privilege level and capability set.
- Requested privilege or capability.
- Granting authority and policy basis.
- Scope, duration, and expiration of the new capability.
- Whether the change was approved, denied, partially granted, or bypassed.
- Child processes or delegated agents that inherited the capability.
- Privilege reduction and revocation events.
A denied escalation attempt remains valuable evidence. Repeated denials followed by an identity change may be more significant than a single successful call performed under a preapproved role.
Resource Consumption
Resource usage can reveal loops, brute-force exploration, uncontrolled fan-out, denial-of-service behavior, or attempts to outlast human supervision.
Capture:
- Wall-clock duration and inactivity periods.
- Model calls, tool calls, retries, and nested-agent count.
- Token, CPU, memory, storage, and accelerator consumption.
- Process creation, open files, and concurrent operations.
- Network connection count, destination count, and transfer volume.
- Budget remaining and budget-exhaustion events.
Budgets are not only financial controls. They are security boundaries that limit the number of approaches an autonomous system can attempt before review.
Policy Decisions and Human Approvals
A trajectory cannot be reconstructed from actions alone. It must show which controls evaluated each action and why execution continued or stopped.
Record:
- Policy engine, policy version, rule identifier, and decision.
- Input attributes used by the decision.
- Allow, deny, constrain, require approval, or quarantine result.
- Enforcement point and confirmation that enforcement succeeded.
- Human approver identity, role, decision, timestamp, and scope.
- Approval expiration and whether the executed action matched what was approved.
- Exceptions, break-glass use, and compensating controls.
A policy decision without enforcement confirmation is incomplete telemetry. The system should distinguish “policy said deny” from “the action was actually prevented.”
An Event Schema for Trajectory Detection
The following JSON model is an implementation starting point. It combines agent context, the declared task, the observed action, identity, destination, policy result, privilege delta, risk score, correlation data, and intervention status in one normalized event.
This is not intended to replace native OpenTelemetry spans, cloud audit events, endpoint telemetry, or identity logs. It is an enriched security event that can reference and correlate those source records.
{
"schema_version": "1.0",
"event_id": "evt-01J3B7Y8M2Q4V6K9P0R5T1N8C3",
"observed_at": "2026-07-24T20:14:36.227Z",
"event_type": "agent.action.policy_evaluation",
"agent": {
"id": "agt-secops-042",
"name": "incident-evidence-reviewer",
"version": "3.4.1",
"runtime": "prod-worker-17"
},
"task": {
"id": "task-ir-8841",
"declared_task": "Validate whether endpoint evidence supports the approved incident scope",
"contract_version": "task-policy-2026.07.24.3",
"allowed_tools": [
"edr_search",
"case_notes",
"dns_lookup"
],
"authorized_targets": [
"endpoint-044",
"case-8841"
],
"max_privilege": "read_only",
"expires_at": "2026-07-24T20:30:00Z"
},
"action": {
"sequence": 1842,
"tool": "shell",
"command": "kubectl auth can-i create secrets --all-namespaces",
"semantic_action": "test_cluster_wide_secret_write",
"identity": "workload:secops-agent-prod",
"destination": {
"name": "cluster-control.prod.internal",
"port": 443,
"classification": "production_control_plane",
"task_relevance": "unrelated"
}
},
"policy": {
"result": "deny",
"rule_id": "agent-task-scope-017",
"reason": "Tool, capability, and destination are outside the declared task",
"enforcement_status": "confirmed_blocked"
},
"privilege": {
"level": "read_only",
"requested_level": "cluster_secret_write",
"change": "expansion_attempt"
},
"risk": {
"score": 92,
"factors": [
"unrelated_destination",
"privilege_expansion",
"denied_boundary_retry"
]
},
"correlation": {
"id": "traj-01J3B6W1P8A7H4D2S9K5M0Q6F3",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"span_id": "00f067aa0ba902b7",
"parent_event_id": "evt-01J3B7XZR4F2N8C6Q1M9V5K0P7"
},
"intervention": {
"status": "suspended",
"action": "revoke_task_identity",
"requested_by": "trajectory-risk-engine",
"completed_at": "2026-07-24T20:14:36.441Z"
},
"evidence": {
"payload_hash": "sha256:6b6ecf94f9f94f2f7d53f21f7c20e531",
"raw_event_pointer": "evidence/2026/07/24/task-ir-8841/1842"
}
}
For a real implementation, replace the example names, privilege taxonomy, semantic actions, task-relevance values, and intervention states with governed enterprise vocabularies. Keep values such as agent names, tool names, policy rules, and privilege levels bounded enough for reliable aggregation. Store high-cardinality identifiers in events and traces rather than using them as metric dimensions.
Successful implementation should allow an analyst to move from one high-risk event to the complete task trajectory, original source telemetry, applicable policy, identity lineage, and confirmed intervention. Common failure modes include generated correlation identifiers that do not propagate across systems, inconsistent timestamps, missing task versions, unbounded free-text fields, sensitive payload capture without policy, and policy decisions that cannot be matched to enforcement outcomes.
Detecting Task Divergence
Divergence detection should not depend on one universal anomaly model. Enterprise agents differ too much in task, authority, workflow, and operating environment. A useful detection design combines explicit invariants with sequence rules, task-relevance analysis, privilege tracking, behavioral baselines, and bounded risk scoring.
Repeated Boundary Exploration
One denied action may be an implementation mistake. A series of slightly modified attempts can indicate active exploration of the control boundary.
Examples include:
- Repeated requests for unavailable tools.
- Changing command syntax after policy denial.
- Testing alternative protocols, ports, destinations, or identities.
- Enumerating local capabilities after an external action is blocked.
- Asking nested agents to perform an action denied to the parent.
Detection should correlate denials by underlying semantic action, not only exact command text. The intervention threshold can consider retry count, variation, time window, and whether each attempt moves closer to increased authority.
Unrelated Destination Access
A destination can be legitimate, trusted, and still be outside the task. Detecting this requires more than an allowlist. The system needs a relationship between the declared objective and the systems reasonably required to complete it.
Task-aware destination controls can classify access as:
- Explicitly authorized.
- Implied by an approved dependency.
- Known but unrelated.
- New or unclassified.
- Explicitly prohibited.
An incident-review agent querying its approved case and endpoint systems is expected. The same agent reaching a production cluster control plane, source-code signing service, or unrelated customer database should create a high-confidence divergence signal even when the connection uses valid credentials.
Credential Enumeration
Credential discovery often appears as a collection of individually plausible reads. Sequence-level indicators include inspection of environment variables, token files, metadata services, local credential stores, process environments, configuration files, and secret-management endpoints.
The important distinction is between using a task-issued credential and searching for additional credentials. Telemetry should identify credential source and acquisition path. A task that begins with one scoped workload token but later discovers and uses another identity has crossed an important control boundary.
Privilege Escalation
Privilege escalation detection should compare current authority with the maximum authority defined by the task contract. It should include attempts, not just successful grants.
High-risk patterns include:
- Testing whether broader permissions are available.
- Requesting write capabilities for a read-only task.
- Assuming a role outside the approved delegation chain.
- Creating a new identity, token, key, or certificate.
- Changing policy, firewall, runtime, or admission controls.
- Delegating to an agent with greater authority.
The preferred response to a hard privilege invariant is immediate denial and suspension. A risk score should not convert a prohibited capability into an allowed action.
Persistence Attempts
Persistence means the agent is attempting to preserve access, execution, state, or control beyond the approved task lifetime. Signals include:
- Creating scheduled jobs, services, startup hooks, or durable workflows.
- Writing credentials, tokens, or executable artifacts to persistent storage.
- Modifying shell profiles, runtime configuration, or deployment manifests.
- Creating long-lived identities or refreshable credentials.
- Registering callbacks, webhooks, or remote-control paths.
- Extending task expiration or disabling cleanup.
Many automation platforms legitimately create durable resources. The detection question is whether persistence was explicitly part of the task contract and whether the created resource has a governed owner and expiration.
Lateral Movement
Lateral movement occurs when the trajectory crosses into additional workloads, accounts, clusters, tenants, networks, or administrative domains not required by the original task.
Useful signals include:
- New remote execution or management protocols.
- Authentication to systems not present in the task graph.
- Rapid destination fan-out.
- Identity reuse across unrelated environments.
- Discovery followed by access followed by credential use.
- Movement from application data paths to management or control planes.
A destination novelty alert by itself may be noisy. A sequence that combines discovery, credential acquisition, identity change, and control-plane access is much stronger.
A Practical Detection Model
A production design should evaluate several layers in order:
Hard invariants immediately block actions that are never acceptable for the task, such as use of an unapproved identity, access to a prohibited destination, creation of durable credentials, or privilege above the contract ceiling.
Sequence and temporal rules detect action chains that become dangerous through accumulation, such as repeated denials, credential discovery followed by role assumption, or package installation followed by new outbound access.
Task-relevance analysis evaluates whether the tool, destination, data, and action have a defensible relationship to the declared objective. This can use structured task graphs, approved dependency maps, retrieval-based classification, or constrained model assistance, but the result should remain evidence rather than unrestricted authority.
Privilege-delta analysis compares the authority required by the next action with the authority granted at task start and after each approved change.
Velocity and fan-out controls detect unusually rapid attempts, excessive destination spread, nested-agent expansion, or resource use that exceeds task budgets.
Behavioral baselines provide context about what this agent version usually does for this task class. Baselines can improve prioritization, but they must never override explicit policy. Repeated unsafe behavior does not become safe because it is common.
A risk score can combine these signals for triage and graded intervention. It should not become the only enforcement mechanism. The system must preserve deterministic rules for non-negotiable boundaries.
| Divergence Pattern | Sequence-Level Evidence | Recommended Response |
|---|---|---|
| Boundary exploration | Multiple semantically similar denials with changing syntax or route | Constrain tool set, lower action budget, require human review |
| Unrelated destination access | Destination outside task graph, especially after discovery activity | Deny connection, block destination, evaluate suspension |
| Credential enumeration | Reads across multiple credential sources followed by token use | Suspend, revoke task identity, preserve runtime state |
| Privilege expansion | Requested capability exceeds task ceiling | Deny immediately, suspend on repeated or high-impact attempt |
| Persistence attempt | Durable resource, long-lived credential, or startup modification outside scope | Block creation, freeze workload, initiate incident response |
| Lateral movement | New identity and cross-boundary access to unrelated systems | Revoke credentials, isolate workload, quarantine trajectory |
| Telemetry loss | Agent continues while required signals disappear | Fail closed or pause, restore visibility before resuming |
Building a Trajectory-Correlation Pipeline
The correlation pipeline is where a high-volume event stream becomes an operational model of agent behavior. The architecture can use different telemetry backends and stream-processing technologies, but it must preserve several logical stages.
Instrument the Agent and Its Enforcement Boundaries
Instrumentation should begin at the task boundary and propagate correlation context through the agent runtime, model calls, tool broker, nested agents, and downstream services. The agent framework should emit task, agent, model, tool, and workflow context. Independent enforcement systems should emit identity, policy, network, endpoint, package, and cloud activity.
Do not rely on the agent to self-report every security-relevant action. An agent can be incomplete, compromised, misconfigured, or simply unaware of what the underlying runtime performed. The strongest evidence comes from both the agent plane and the systems that enforce its authority.
Normalize and Enrich Events
Native events should be preserved, but the detection layer needs a common schema. Normalize:
- Identity and delegation.
- Tool and semantic action.
- Source and destination.
- Privilege and capability.
- Policy decision and enforcement status.
- Task relevance and data classification.
- Intervention state.
Enrichment can add asset ownership, environment, criticality, approved dependency relationships, known task targets, vulnerability context, and whether a destination is a management plane.
Preserve Correlation Across Systems
A trace identifier is valuable but may not exist in every security system. Use multiple join keys:
- Agent ID.
- Task ID.
- Trajectory or correlation ID.
- Trace and span IDs.
- Tool-call ID.
- Workload identity and token identifiers.
- Runtime, process, container, pod, host, or function identity.
- Source and destination pair.
- Time window and sequence number.
Events can arrive late or out of order. The pipeline should support bounded reordering, idempotent ingestion, duplicate detection, and revision of the trajectory state when authoritative events arrive after an initial decision.
Maintain a Trajectory State Store
The detector needs current state, not only a searchable archive. For each active task, maintain:
- Current sequence and last known action.
- Active identities and delegated credentials.
- Tools used and capabilities requested.
- Destinations touched and novelty classification.
- Privilege history and current ceiling.
- Policy denials, retries, and exceptions.
- Resource budgets consumed and remaining.
- Accumulated risk factors.
- Intervention status and acknowledgments.
The state store allows a new event to be evaluated in the context of everything that preceded it.
Separate Detection from Enforcement
The analytics engine should produce structured decisions that an intervention broker can execute through trusted control points. This separation prevents the agent from deciding whether its own suspension is justified.
The intervention broker should integrate with:
- Agent orchestrators and tool brokers.
- Identity and token services.
- Network policy and egress controls.
- Workload runtimes and cluster admission controls.
- Endpoint or cloud containment systems.
- Evidence storage and incident-management platforms.
The detector may be sophisticated. The enforcement path should be simple, fast, authenticated, auditable, and regularly tested.
Reference Observability Architecture
The architecture below separates the agent runtime from independent evidence sources and enforcement controls. The key teaching point is that trajectory analysis receives both self-reported agent telemetry and externally observed activity. Suspension is executed by control points that the agent does not own.

This is a logical architecture. A single platform may implement several boxes, but the trust boundaries should remain explicit. A telemetry backend should not automatically receive authority to alter identity or network policy. An intervention service should not depend on the agent’s cooperation. Evidence storage should not be writable by the runtime being investigated.
Real-Time Intervention and Automatic Suspension
An alert that arrives after the trajectory completes is a forensic feature, not a real-time control. High-authority agents need an intervention model that can act within the same operational window as the agent.
Define Graded Execution States
A practical state model includes:
- Running: Normal policy and budgets apply.
- Constrained: High-risk tools, destinations, or write actions are temporarily removed.
- Paused: No new actions begin, but the runtime remains available for rapid review.
- Suspended: Task credentials and tool access are revoked; execution cannot continue.
- Quarantined: The workload is isolated while memory, process, filesystem, and telemetry state are preserved.
- Terminated: Execution is stopped and cleanup begins.
- Released: A human or policy authority permits controlled continuation under a new contract version.
State changes should be monotonic during an active incident unless an authorized reviewer explicitly releases the task. The agent should not be able to downgrade its own restriction state.
Match the Intervention to the Signal
A denied low-impact action may justify a warning or temporary constraint. Credential discovery followed by role assumption and unrelated control-plane access should trigger suspension, credential revocation, and isolation.
Useful intervention actions include:
- Deny the current tool call or command.
- Remove a tool from the active catalog.
- Reduce the action, time, token, compute, or network budget.
- Revoke the task token and delegated credentials.
- Block one destination or all outbound egress.
- Prevent new processes or child agents.
- Freeze or snapshot the workload.
- Rotate exposed credentials.
- Preserve evidence and open an incident.
- Page a human reviewer with the complete trajectory.
The intervention status must be observable. A requested suspension that failed is itself a critical alert.
Keep Enforcement Outside the Agent
The agent can receive a message explaining that an action is denied, but the message is not the control. Enforcement should occur at the tool broker, identity provider, gateway, network policy layer, runtime, or other independent boundary.
This follows the same principle used in zero-trust architecture: valid identity and network location do not create unlimited trust. Authorization should be evaluated for the specific resource and action, and the decision should remain bounded by the current task.
Exercise the Kill Path
Organizations often test whether telemetry arrives and whether an alert fires. They also need to test whether the complete containment chain works:
- The detector identifies a synthetic divergent sequence.
- The intervention broker receives a signed decision.
- The identity service revokes the task credential.
- The network layer blocks new connections.
- The runtime stops new tool executions.
- The evidence system preserves state.
- The SOC receives a trajectory summary.
- Operators confirm that the agent cannot resume through a cached credential or alternate path.
A kill switch that has never been tested under load and failure conditions is an assumption, not a control.
Immutable Evidence and Forensic Reconstruction
Agent incidents require more than a searchable dashboard. Investigators must be able to reconstruct what objective was active, which policies applied, what actions occurred, which identities were used, and whether the controls worked.
The evidence model should preserve:
- Original task request and every contract revision.
- Model, prompt, agent, tool, policy, and runtime versions.
- Complete event order with synchronized timestamps and sequence numbers.
- Raw events plus normalized and enriched records.
- Identity issuance, delegation, exchange, use, and revocation.
- Tool arguments and results when policy permits, or hashes and secure pointers when it does not.
- Network and DNS evidence, including denied attempts.
- Human approvals, exceptions, and break-glass decisions.
- Detection results, risk factors, and rule versions.
- Intervention requests, acknowledgments, completion, and failures.
- Workload snapshots or volatile evidence when required by incident policy.
“Immutable” should be implemented as append-only and tamper-evident evidence with controlled retention, object locking or equivalent write protection, cryptographic integrity checks, restricted administrative access, and audit trails. No single application administrator should be able to rewrite the trajectory after an incident.
Forensic reconstruction also depends on clock quality. Time synchronization, source timestamp confidence, ingestion timestamp, sequence numbers, and causal identifiers should all be available. When events arrive late, the system should preserve both the original decision and the revised reconstruction rather than silently replacing history.
Security Operations Ownership
Agent observability crosses organizational boundaries. Treating it as an AI platform feature alone leaves gaps in detection and response. Treating it as a SOC project alone leaves the security team without task semantics, instrumentation, or enforceable agent controls.
| Team | Primary Responsibilities |
|---|---|
| AI platform engineering | Agent and task identifiers, prompt and tool versions, orchestration telemetry, tool-broker controls, intervention integration |
| Security engineering | Threat model, hard invariants, trajectory rules, risk factors, evidence requirements, containment design |
| Security operations center | Alert triage, trajectory investigation, containment decisions, incident command, escalation and recovery coordination |
| Identity and access management | Task-specific identities, delegation policy, token telemetry, revocation, credential rotation, privilege taxonomy |
| Network and platform security | Egress policy, destination classification, control-plane segmentation, runtime isolation, enforcement confirmation |
| SRE and observability teams | Collection reliability, context propagation, pipeline capacity, state-store availability, telemetry-loss detection |
| Application and business owners | Authorized task definition, approved targets and methods, data sensitivity, expected workflow, business impact |
| Privacy, legal, and governance | Content-capture rules, retention, access, evidence handling, regulatory and employee considerations |
One team should own the end-to-end control objective: prevent an untrusted agent decision from becoming an unauthorized action. Individual components can have separate owners, but the trajectory from task creation through suspension needs one accountable operating model.
Agent-Specific Alerts and Dashboards
A standard infrastructure dashboard can show CPU, memory, latency, and error rates while completely missing agent divergence. Agent-specific views should be designed around objectives, authority, sequences, and control outcomes.
High-Value Alerts
Prioritize alerts that change response decisions:
- Action outside the declared task or target set.
- Use of an identity not present in the approved delegation chain.
- Requested privilege above the task ceiling.
- Repeated semantically similar denials.
- Credential-source enumeration or unexpected token acquisition.
- Access to an unrelated management or control plane.
- New destination combined with identity change or privilege increase.
- Creation of durable resources or long-lived credentials.
- Nested-agent fan-out above policy.
- Budget exhaustion combined with continuing execution.
- Policy-enforcement failure.
- Suspension, revocation, egress block, or runtime-freeze failure.
- Loss of required telemetry while the task remains active.
Alert severity should reflect both action impact and trajectory evidence. A single novel DNS query may be informational. A novel destination reached after credential discovery and role assumption should be critical.
Dashboards That Support Investigation
A useful agent incident dashboard should show:
- Declared task contract and active version.
- Current execution state and remaining budgets.
- Time-ordered action trajectory.
- Parent-child and nested-agent relationships.
- Identities and privilege changes over time.
- Tool use and semantic action categories.
- Destination map with task relevance and ownership.
- Policy decisions, denials, retries, and approvals.
- Risk score history and contributing factors.
- Intervention attempts and confirmed outcomes.
- Links from normalized events to raw evidence in the secured investigation system.
The dashboard should help an analyst answer “why was this suspended?” without reading thousands of uncorrelated records.
Retention, Privacy, and Cost Considerations
Agent telemetry can be expensive and sensitive. Prompts, retrieved context, tool arguments, command output, model responses, and business records may contain credentials, customer data, intellectual property, security findings, or regulated information.
The answer is not to capture everything indefinitely or to omit the evidence needed for security. Use a tiered policy.
Capture Structured Context by Default
Always capture low-content security context such as identifiers, versions, timestamps, semantic actions, policy results, privilege levels, destination classification, risk factors, intervention status, and hashes. These fields support correlation without storing every payload.
Capture Sensitive Content Selectively
Full prompts, tool arguments, results, files, and command output should require an explicit policy based on task class, environment, data sensitivity, and incident state. Redact secrets and regulated fields before export where possible. Keep secure pointers to separately governed evidence rather than copying sensitive content into every telemetry backend.
Retain High-Risk Trajectories More Aggressively
Retain all policy denials, privilege changes, identity transitions, egress anomalies, credential events, persistence signals, intervention actions, and telemetry-loss events. Routine successful trajectories can use shorter retention, summarization, or risk-aware sampling.
Sampling must not remove the very sequence needed to identify divergence. Tail-based or risk-aware sampling can preserve complete high-risk traces after policy or anomaly signals appear. The system should be able to promote an active trajectory to full-fidelity capture when risk increases.
Separate Hot Detection from Long-Term Evidence
Use hot storage for active state and recent high-resolution events, warm storage for investigation and trend analysis, and protected archival storage for evidence governed by incident, legal, or regulatory policy. The retention clock should account for task completion, incident declaration, litigation hold, and credential exposure.
Control Cardinality and Duplication
High-cardinality task, user, trace, event, and payload identifiers belong in traces, logs, events, or security data stores, not unrestricted metric labels. Avoid copying full payloads into multiple platforms. Preserve authoritative raw evidence once, then use normalized metadata and secure references for correlation.
Cost controls must never create silent blind spots. Telemetry suppression, sampling decisions, collector backpressure, schema rejection, and dropped events should be observable and should pause high-authority tasks when required evidence is unavailable.
A Practical Implementation Sequence
Enterprises do not need a perfect behavioral model before improving control. They do need to build the foundations in the correct order.
Define the Task Contract
Start with a small set of high-value agent workflows. Define the objective, approved methods, tools, destinations, identities, privilege ceiling, data classes, budgets, approvals, and expiration. If the organization cannot describe the authorized task, it cannot reliably detect divergence from it.
Instrument the Complete Execution Path
Create a root task context and propagate it through model calls, tools, nested agents, identity events, and external services. Confirm that tool execution, not only tool selection, is visible. Validate timestamps, parent-child relationships, and identity lineage using raw events before building dashboards.
Add External Security Evidence
Join agent telemetry with IAM, network, DNS, endpoint, package, cloud, and policy events. Identify places where the agent’s self-reported view differs from the externally observed action.
Enforce Hard Invariants
Implement deterministic controls for prohibited destinations, identities, privilege levels, persistence, credential creation, and destructive actions. Test that denials are confirmed at the enforcement point.
Add Sequence-Level Detection
Build rules for repeated boundary exploration, credential discovery, identity change, privilege expansion, persistence, and lateral movement. Use semantic normalization so trivial syntax changes do not bypass detection.
Connect the Intervention Broker
Automate graded responses through identity, network, runtime, and tool boundaries. Confirm that suspension remains effective when one control fails or credentials are cached.
Exercise and Tune
Run realistic simulations that include benign mistakes, tool failures, ambiguous sequences, and deliberate boundary exploration. Measure detection latency, false positives, intervention success, analyst workload, evidence completeness, and time to reconstruct the trajectory.
The goal is not a dashboard with more agent events. The goal is a tested control loop that can observe, decide, intervene, and explain.
Conclusion
Agent observability is not a larger logging project. It is a security and operations capability built around the trajectory of an autonomous system.
Traditional telemetry remains necessary. Logs record events. Traces preserve causal execution. Metrics expose rates, latency, saturation, and consumption. Agent observability connects those signals to the declared task, identity lineage, privilege state, destination relevance, policy decisions, and intervention controls that determine whether the execution remains authorized.
The central design decision is to make the task trajectory a first-class security object. Every high-authority agent should begin with a versioned task contract, carry correlation context through every action, and remain subject to independent policy and containment controls. Hard invariants should stop forbidden actions immediately. Sequence analytics should identify divergence that only becomes visible across time. Evidence should be preserved well enough for operators to reconstruct both the behavior and the effectiveness of the controls.
A platform that can explain an incident only after the agent finishes is observable too late. The operational standard should be stronger: detect the divergence while it is forming, suspend the trajectory before the harmful sequence completes, and give investigators enough evidence to understand exactly why the intervention occurred.
The next practical step is to build the trajectory-level detection pipeline itself, including correlation keys, state management, rules, risk scoring, intervention APIs, and validation tests for enterprise AI agents.
External References
- OpenTelemetry: Semantic Conventions for GenAI agent and framework spans
Canonical URL: https://github.com/open-telemetry/semantic-conventions-genai/blob/main/docs/gen-ai/gen-ai-agent-spans.md - OpenTelemetry: Observability primer
Canonical URL: https://opentelemetry.io/docs/concepts/observability-primer/ - OpenTelemetry: Context propagation
Canonical URL: https://opentelemetry.io/docs/concepts/context-propagation/ - OWASP Gen AI Security Project: OWASP Top 10 for Agentic Applications for 2026
Canonical URL: https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/ - NIST: Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile
Canonical URL: https://www.nist.gov/publications/artificial-intelligence-risk-management-framework-generative-artificial-intelligence - NIST: Incident Response Recommendations and Considerations for Cybersecurity Risk Management: A CSF 2.0 Community Profile
Canonical URL: https://csrc.nist.gov/pubs/sp/800/61/r3/final - NIST: Zero Trust Architecture
Canonical URL: https://csrc.nist.gov/pubs/sp/800/207/final
TL;DR The OpenAI and Hugging Face incident should not be interpreted as a model spontaneously acquiring authority or developing independent malicious intent....