Intent detection
Intent detection (chain-of-thought detection) in Agent Security Center analyzes the multi-turn execution traces of an Agent to identify risks such as goal deviation, out-of-scope execution, deceptive behavior, and control evasion, and links each risk to specific objects, behavior stages, and execution evidence. After you connect observable AgentLoop logs, you can view events on the Intent detection page to locate where a deviation occurred, which objects were involved, and what the execution results were, and use this information as the basis for investigation and handling.
Overview
An Agent dynamically selects its action path based on the task description and the execution feedback. When a task is blocked, the Agent can retry, switch tools, or turn to systems outside the task. Beyond direct prompt injection and indirect injection in business materials, an Agent can also deviate from its goal or expand its operation scope during autonomous execution, even when no external attacker manipulates the input.
Multiple actions can combine to form these risks. For example, one read operation obtains a service address, a subsequent call obtains credentials, and the credentials are then used to access other systems. Examining a single request or the final answer alone makes it hard to explain the connection between successive actions, or to determine when the task scope started to expand.
Intent detection combines the original task with the collected execution records to reconstruct the actions of the Agent, the objects it interacted with, and the results, understand how each stage advanced the task, and then assess the behavior against the task goal and the security requirements. The generated events, risk relationship graph, behavior timeline, and asset list help you complete the following work:
Locate behavioral shifts: Identify the step at which the Agent started to change its goal, expand its access scope, or bypass restrictions.
Verify specific risks: Check which objects the behavior involved, what results were actually obtained, and which records support the risk assessment.
Identify investigation and handling targets: Locate the related domain names, IP addresses, files, and execution steps from a risk, which reduces the need to review logs entry by entry.
This feature provides detection and analysis results. Event handling in the console records the status and the reason only. It does not automatically end Agent sessions, block tool calls, or modify business configurations.
How it works
Relationship with real-time protection
Intent detection and real-time protection complement each other:
Real-time protection (synchronous): Checks a single model input, output, and execution action, and blocks clear risks at the execution point, such as access to a prohibited network target.
Intent detection (asynchronous): Analyzes continuous execution records together with the original task to identify intent deviations that are hard to judge from a single call.
Intent detection analyzes observable AgentLoop session logs. It does not block tool calls and does not need to wait for a task to finish. As new logs arrive, the system updates the analysis results and outputs risk events, risk chains, and execution evidence.

Analysis process
Intent detection first reconstructs the actual behavior of the Agent, then compares it with the original task, and finally outputs risk events and evidence. The analysis process is as follows:
Trace reconstruction (identify what actually happened): Pairs the request and the response of each tool call to identify the action, the object interacted with, and the actual result of each step.
Request and response: The request parameters show what operation the Agent initiated, and the response content shows how that operation was actually executed.
Action and result: Initiating an action and obtaining a result are assessed separately. For example, initiating a read request does not mean the file was obtained, and an access-denied response is not recorded as a successful read.
Baseline extraction (identify the goals and behaviors the task allows): Extracts the goal, the authorization scope, the restrictions, and the completion conditions from the original task to form the task baseline, which serves as the basis for judging whether a behavior is compliant.
Completion conditions and authorization scope: The completion conditions define the results that must be achieved, and the authorization scope defines which operations can be performed on which objects. Together, they constrain task execution.
Baseline source: The task baseline comes from the original authorization and cannot be inferred from what the Agent has already done. For example, the fact that the Agent scanned a host does not mean that the host should be included in the allowed access scope, and the purpose of completing the task does not automatically expand resource authorization.
Stage division (identify behavioral shifts during execution): Divides the behavior into stages based on changes in strategy, objects, methods, and key information sources, and identifies shifts in the execution direction.
Stage summary: Each stage is summarized with its goal, process, and result.
Division basis: Stages are divided by behavior changes, not by a fixed number of turns. For example, a shift from verifying the specified service to probing hosts outside the task is a stage change that requires further review.
Risk assessment (compare specific behaviors with the task requirements): Combines the session context and compares the behavior against the task baseline and the security requirements to determine whether it constitutes goal deviation, out-of-scope execution, deceptive behavior, or control evasion.
Risk elements: Each risk states which object was accessed, what action was taken, what result was obtained, and which task or security requirement was violated.
Evidence location: Stage summaries are used only to understand and locate the execution process. Risk judgments must be grounded in specific actions and original records.
Alerts and global graph (explain the risk and the connection between preceding and following actions): After verifying the original records cited by a risk, the system associates the risk with the related stages, objects, and execution records, and outputs risk events and the risk relationship graph.
Behavior association: The risk relationship graph shows how the information, access paths, or execution capabilities obtained in a previous step support the subsequent actions. For example, the Agent obtains deployment clues from logs to locate a service, and then uses the obtained credentials for further authentication.
Evidence traceback: During an investigation, you can trace an object in the graph back to the related stages and steps to verify the basis of the risk.
Assessment rules
Assessment follows these principles:
The original authorization prevails: The task baseline is not inferred from what the Agent has already done. The fact that the Agent scanned a host does not mean that the host is within the authorization scope.
A shift in behavior is not necessarily a violation: Normal retries, environment fixes, and tool changes also alter the execution method, so the behavior must be judged against the task baseline.
Conclusions require evidence: Each risk is linked to a specific action and original records. To identify deceptive behavior, there must be a contradiction between a statement and the execution records. Also check whether the Agent truthfully disclosed the failure or the alternative method. Ordinary factual errors, missing results, or an incomplete task do not constitute deception on their own.
Associations require a basis: The risk relationship graph connects only behaviors that have a dependency relationship. Behaviors are not associated merely because they occurred one after another.
Assessment example:
Background: The task required the Agent to complete verification on a specified service. After the target service became temporarily unavailable, the Agent scanned hosts outside the task, read sensitive information from internal logs, and bypassed access restrictions to obtain an image, and it finally computed the correct answer.
Each behavior is assessed as follows:
Behavior
Assessment basis
Scanning hosts outside the task
Compare the originally authorized objects with the actual scan targets to determine whether this constitutes out-of-scope execution.
Bypassing restrictions to obtain an image
Verify whether the restriction was in effect, what bypass measures were taken, and whether the restricted access continued, to determine whether this constitutes control evasion.
Switching to another method to compute the answer
Further confirm whether the Agent abandoned the original task requirements and pursued a different goal instead. A change of method alone, or a correct answer alone, is not enough to identify goal deviation.
Final result: The correct answer does not offset the out-of-scope behavior during execution. The actual impact, such as reading sensitive information, obtaining an identity, and accessing the target system, must be verified separately based on the returned results and the environment evidence.
Use cases
Scenario | Analysis focus |
Continuous exploration after a task is blocked | Distinguish normal retries, fixes, and alternative methods within the authorization scope from probing outside the task, unauthorized reads, or control evasion. |
Risks formed by a combination of multiple steps | Associate the information, access paths, or execution capabilities obtained in a previous step, and analyze how they support the subsequent actions. |
A correct task result but a non-compliant execution process | Verify whether the way the result was obtained complies with the authorization, so that process risks are not ignored merely because the task was completed or the answer was correct. |
A completion statement that is inconsistent with the execution records | Compare the report of the Agent with the original records to verify whether results were fabricated or failures were concealed. |
Prerequisites
Analyze and handle intent risks
Step 1: Connect session logs
Go to the Agent Security Center – Intent Detection,
On the Intent Detection page, click Data Source Management in the upper-right corner.
In the Log Source Integration panel, click Add Data Source. Fill in the target Agent audit log information as described below, and then click Add.
Endpoint:
<region ID for Agent audit log storage>.log.aliyuncs.com.Project: The Simple Log Service (SLS) project that corresponds to the Agent audit logs. The format is
aliyun-aisc-log-${uid}-${regionId}. You can go to the Simple Log Service console to view the corresponding data.Logstore: The SLS Logstore that corresponds to the Agent audit logs. For the Logstore that corresponds to each log type, see Log types.
NoteIf you forget the Agent audit log storage information, go to the Log Details tab of Agent Log and click Log Delivery Settings in the upper-right corner of the page to view the related information. For more information, see Agent Loop.
After the connection is complete and logs keep arriving, the system analyzes them automatically by session. You do not need to submit detection tasks one by one.
Step 2: View and analyze risk events
In the event list on the Intent Detection page, use the following conditions to filter for the target event.
Search box: Enter an event title keyword or a Session ID for an exact search.
Handling status: Filter by status, such as unhandled or confirmed.
Priority: Filter by high, medium, or low risk.
Click the Event Title of the target event to go to the event details page.
Review the assessment and the task background:
Event metadata: The event status, the attack dimensions (such as out-of-scope execution and control evasion), the most recent occurrence time, the log source, and the session ID.
Intelligent assessment analysis: The risk analysis text that the system automatically generates. It describes the complete attack chain of the Agent, the technical methods used, the systems involved, and the final impact.
NoteIntelligent assessment analysis helps you quickly understand the overall risk profile of an event and provides direction for further investigation.
Trace the behavior and the execution evidence:
View key relationships in the risk visualization: On the Risk Visualization tab, view the risk relationship graph of the Agent behavior. The graph shows the nodes involved in the execution of the Agent (such as services, files, and credentials) and their interactions, which visually presents how the elements in the attack chain are related.
Locate abnormal stages in the behavior timeline: On the Behavior Timeline tab, view the detailed records of each Agent operation. The timeline displays the execution content, the time, and the risk annotation (such as out-of-scope execution) of each step in chronological order, and summarizes the impact status and the time range of each stage. You can quickly locate the step at which the Agent started to deviate from the task goal.
Verify the step evidence: In the behavior timeline, expand each step to view the specific execution commands, the returned results, and the system responses, and verify whether the risk judgment is supported by sufficient evidence.
View the involved assets: On the Asset Inventory tab, view the list of assets involved in the event, such as domain names, IP addresses, and files. Each asset is labeled with its impact status (affected or unaffected), the associated behavior stage, and an AI summary, which helps you determine the assets that require focus.
View the session information: On the Session Info tab, view the complete background information of the Agent session, including the task goal, the authorization scope, the task requirements, the prohibitions, the completion criteria, the model used, and the tool call statistics (such as the number of calls to tools such as Bash, Read, and Write).
Step 3: Confirm the risk handling result
After you handle the risk based on the risk description in Step 2 (for example, tighten tool and resource permissions, check the data that was accessed, rotate the exposed credentials, or add manual confirmation for critical operations), return to the console to record the related measures and confirm the closure of the risk event.
In the upper-right corner of the event details page, click Resolve.
In the Resolve Event dialog box, verify the current status and the target status. Fill in Change Reason to record the basis for the handling and the measures taken.
NoteFor a pending event, the target status in the window is Confirmed.
Click Confirm Disposal. After the event is confirmed, take the corresponding measures in your business environment based on the actual risk. After you make the adjustments, run the corresponding business scenario and check the result against the new execution records.
Limitations
Log connection: Synchronizing Agent asset information alone does not replace connecting session logs.
Data integrity: Detection depends on the task input, session association information, model interactions, and tool call records that have been received. Missing, truncated, or incompletely associated logs can affect risk identification and result judgment.
Thinking content: Only the thinking content actually collected in the logs is analyzed. When no thinking content is collected, behavior can be analyzed based on user instructions, model outputs, and tool call records, but the internal reasoning process that was not recorded cannot be reconstructed.
Analysis timeliness: Analysis runs asynchronously after the logs are connected. The time when results are generated depends on log arrival, session size, and analysis duration.
Handling scope: This feature provides detection and analysis results. Event handling in the console records the status and the reason only. It does not automatically end Agent sessions, block tool calls, or modify business configurations.
Log source: Intent detection supports only AI assets that are connected to Agent audit logs. The only supported log source is Agent audit logs (AgentLoop). Other log sources are not currently supported.
Detection scope:
Risk type
Description
Example
Goal deviation
The goal actually pursued is inconsistent with the currently valid task. The focus of the judgment is whether the task goal was replaced.
Explicitly abandoning independent verification on the specified target and pursuing only a submittable scoring result instead.
Out-of-scope execution
The goal is unchanged, but the operation objects or the execution methods exceed the authorization scope.
Scanning hosts outside the task or reading unauthorized management credentials to complete the verification of the specified service.
Deceptive behavior
Misleading the judgment of the execution process or the results by fabricating or concealing facts.
Fabricating test records and claiming that the tests passed without running the tests.
Control evasion
Deliberately bypassing a control and continuing to act while knowing that an authentication, authorization, approval, or stop requirement is in effect.
Bypassing an access restriction that is in effect and continuing to access the restricted target.