The input_agentsight plugin for LoongCollector collects observability logs of interactions between AI Agents and large language models (LLMs). Using eBPF to observe Agent processes at the system level without code modification, the plugin captures requests, responses, token usage, tool definitions, and other data exchanged between Agents and LLMs. Supported LLM providers include OpenAI, Anthropic, and DashScope. This topic describes how to create a LoongCollector collection configuration in the Simple Log Service console to collect AgentSight logs.
Prerequisites
The server operating system kernel version is Linux 5.10 or later.
The plugin relies on eBPF for system-level observation. Kernels earlier than 5.10 do not support the required eBPF features and cannot perform collection.
Verified supported environments include:
Alibaba Cloud Linux 3
Ubuntu 22.04
Ubuntu 24.04
Run the following command to check your current kernel version:
uname -rLoongCollector v3.3.9 or later is installed on the server.
The AgentSight collection capability requires a recent version of LoongCollector. Upgrade to the latest version before configuring this plugin.
The target AI Agent (such as OpenClaw or Hermes) is deployed and running on the server.
ACK container environment: To collect LLM logs from Agent Pods in a Container Service for Kubernetes (ACK) cluster, make sure that the following requirements are met:
LoongCollector is upgraded to v3.3.10 or later.
The
enableEBPFswitch is enabled on the Component Management page of the ACK console.
After these requirements are met, you can create an AgentSight Logtail collection configuration in Simple Log Service to collect Agent LLM logs. The configuration applies to the same machine group as other LoongCollector configurations.
How it works
Traditional application instrumentation cannot keep up with the rapid iteration and highly customized nature of AI Agents, nor can it trace through tool calling chains to identify actual Agent behavior. The input_agentsight plugin attaches SSL/TLS probes and process observers at the kernel level through eBPF, capturing TLS-encrypted requests and responses between Agent processes and LLM services. This achieves end-to-end observability without modifying Agent code.
Features
Collects complete interaction data between AI Agents and LLMs: request messages, response messages, model name, token usage, latency, status codes, and more.
Identifies processes that access LLM APIs based on a domain whitelist with built-in common LLM API domains.
Supported LLM providers
Provider / Protocol | Supported |
OpenAI | Yes |
Anthropic | Yes |
DashScope | Yes |
For supported payload protocols, the plugin outputs standard OTel GenAI fields (such as gen_ai.*). For protocols not yet adapted, the plugin reports the desensitized raw payload for server-side adaptation.
Supported AI Agent examples
Category | Examples |
Common Agents | Claude Code, OpenClaw, QwenPaw, Hermes |
Common LLM frameworks | LangChain, LangGraph, Dify, AgentScope |
Custom Agents | Python-based custom Agents, Node.js-based custom Agents |
Procedure
Log on to the Simple Log Service console.
In the Data Import section, select the LoongCollector collection configuration entry, and then select the target Project and Logstore.
On the Machine Group Configuration page, configure and apply the target machine group.
ImportantIf you apply the machine group immediately after creating it, the heartbeat status may display as FAIL because the connection has not taken effect. Click Automatic Retry to resolve this issue.
On the Data Source Settings tab, specify a Configuration Name and enter the plugin configuration. The plugin type is fixed as
input_agentsight.Choose a configuration pattern based on your scenario:
Use minimal configuration when your Agent and LLM provider are covered by built-in defaults.
Use custom domain whitelist when your Agent connects to a non-default LLM endpoint.
Use custom command line whitelist when your Agent process is not matched by built-in rules.
Use raw HTTP traffic reporting when you need to inspect traffic that AgentSight cannot parse into GenAI semantics.
Minimal configuration
Minimal configuration: Specify only the plugin type. All settings use default values (built-in default command line whitelist and domain list are injected).
{ "inputs": [ { "type": "input_agentsight" } ] }Custom domain whitelist: Specify custom HTTPS domains to monitor.
{ "inputs": [ { "detail": { "ProbeConfig": { "Https": [ "api.openai.com", "api.anthropic.com", "dashscope-intl.aliyuncs.com", "dashscope.aliyuncs.com" ] } }, "type": "input_agentsight" } ] }Custom command line whitelist: Filter target Agents by process command line and tag their type.
{ "inputs": [ { "detail": { "ProbeConfig": { "CmdlineWhitelist": [ { "AgentType": "openclaw", "Args": ["node*", "*openclaw*"] }, { "AgentType": "claude-code", "Args": ["node*", "*claude*"] } ] } }, "type": "input_agentsight" } ] }Report unknown protocols as raw HTTP traffic: When
ProbeConfig.RawHttpsFallbackis enabled, traffic that AgentSight cannot parse into GenAI semantics (unknown API paths or non-standard bodies) is no longer discarded. Instead, it is reported as raw HTTP traffic. Create a field index for the raw HTTP events, and then use the LogStore query and analysis feature to inspect them.{ "inputs": [ { "detail": { "ProbeConfig": { "RawHttpsFallback": true } }, "type": "input_agentsight" } ] }NoteNote the following behavior:
Raw HTTP logs produced by
RawHttpsFallback: trueare generated only when AgentSight cannot resolve traffic into GenAI semantics. They are mutually exclusive withgen_ai.*logs: a single request produces at most one of the two.Raw HTTP traffic is reported with the event names
event.name=http.requestandevent.name=http.response.This feature is supported only in LoongCollector v3.3.10 and later.
Create indexes and preview data. You can manually create field indexes based on the collected fields, or click Auto Generate Index.
After the configuration is complete, wait approximately 1 minute for the index to take effect. You can then view the collected logs on the Logstore query and analysis page.
You should see log entries containing fields such as
gen_ai.agent.type,gen_ai.model.request, andgen_ai.model.response. The presence of these fields confirms that collection is working correctly.
Configuration parameters
Parameter | Type | Required | Default | Description |
Type | string | Yes | N/A | Plugin type. Fixed as |
ProbeConfig | object | No | N/A | AgentSight probe configuration. When not configured, all sub-parameters use default values. |
ProbeConfig.Verbose | uint | No |
| Specifies whether to print detailed eBPF logs. |
ProbeConfig.LogPath | string | No |
| Output path for eBPF logs. |
ProbeConfig.CmdlineWhitelist | array | No | Built-in 9 rules | Process Agent filter whitelist. Each entry is an object with |
ProbeConfig.CmdlineBlacklist | array | No | N/A | Process Agent filter blacklist. Each entry is a glob string array (no |
ProbeConfig.Https | array | No | Built-in 7 rules | HTTPS encrypted traffic domain whitelist (string array, glob wildcard |
ProbeConfig.Http | array | No |
| HTTP plaintext traffic target list. Each entry can be |
ProbeConfig.RawHttpsFallback | bool | No |
| When set to |
ProbeConfig.EventStreamFormat | bool | No |
| When |
ProbeConfig.MessageDeltaOnly | bool | No |
| When |
Collection scope determination logic
HTTPS encrypted traffic (process level) is determined in the following fixed order:
Matches
CmdlineBlacklist→ not collected (blacklist takes priority).Does not match the blacklist and matches
CmdlineWhitelist→ collected.Still not included, and the process accesses a domain that matches
Https→ collected.None of the above match → not collected.
Default injection rules: When neither CmdlineWhitelist nor CmdlineBlacklist is configured, the following 9 built-in default command line whitelist rules are injected. When Https is empty, the following 7 built-in default domain entries are injected.
Built-in default command line whitelist rules
AgentType | Args (glob pattern for each command line segment) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Built-in default domain whitelist entries
Domain | Description |
| OpenAI |
| Anthropic |
| DashScope pay-as-you-go, China (Beijing) |
| DashScope pay-as-you-go, Singapore |
| DashScope pay-as-you-go, US (Virginia) |
| DashScope Coding Plan |
| DashScope dedicated workspace / trial / Token Plan domains |
Override, not append: User-defined configurations override the built-in defaults entirely rather than appending to them. Once you specify any rule, the entire built-in default list becomes inactive. To retain built-in default entries, you must explicitly include them in your configuration (manually append them). Otherwise, any default Agent types or domains not listed in your configuration will no longer be collected. Use only lowercase letters, digits, and hyphens (-) for AgentType values (such as openclaw or claude-code) to facilitate cross-product aggregation and analysis.
Limits and troubleshooting
No data on the preview or query page: Verify that the server kernel version is 5.10 or later (
uname -r) and that LoongCollector is upgraded to v3.3.9 or later. Then verify that the target process command line matches aCmdlineWhitelistrule, or that the domains it accesses are in theHttpslist. Run the following command on the server to view the actual command line of a process before writing glob rules:tr '\0' ' ' < /proc/<PID>/cmdline; echoTechnical appendix for eBPF hook compatibility limitations that may prevent collection for certain Agent binaries.
For additional troubleshooting guidance, see Troubleshoot Logtail log collection failures.
This feature is currently in canary release and is available in the following regions: US (Virginia), US (Silicon Valley), Malaysia (Kuala Lumpur), Indonesia (Jakarta), South Korea (Seoul), and others.
Technical appendix
The input_agentsight plugin uses eBPF for collection. Whether it can capture HTTPS encrypted traffic from a given Agent depends on whether eBPF can locate the SSL send/receive functions in the Agent's executable. Use the following table to determine support:
Scenario | Supported | Locating method | Description |
Agents running through Node.js or Python, or Agents that retain the symbol table | Yes | Symbol-based | These programs send and receive data through common SSL libraries (primarily OpenSSL) with exported symbols. eBPF locates functions such as |
No symbol table (stripped), but statically linked to common C SSL libraries (OpenSSL) | Partial | Bytecode pattern matching | Without a symbol table, symbol-based locating is not possible. However, when the underlying library is a common C library such as OpenSSL, eBPF can still locate send/receive functions through bytecode pattern matching. Example: Python tools packaged with uv that statically link OpenSSL and are stripped. |
No symbol table (stripped), statically linked with no exported symbols, and bytecode patterns cannot be matched | No | Cannot locate | Neither the symbol table nor bytecode patterns can locate the send/receive functions, so no hook point can be established. Example: the official Codex CLI release (stripped, statically linked, no exported symbols) falls into this category and cannot be collected by this plugin. |