All Products
Search
Document Center

Simple Log Service:Collect AI Agent observability logs (AgentSight)

Last Updated:Sep 23, 2026

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 -r
  • LoongCollector 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 enableEBPF switch 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

  1. Log on to the Simple Log Service console.

  2. In the Data Import section, select the LoongCollector collection configuration entry, and then select the target Project and Logstore.

  3. On the Machine Group Configuration page, configure and apply the target machine group.

    Important

    If 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.

  4. 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.RawHttpsFallback is 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"
            }
        ]
    }
    Note

    Note the following behavior:

    • Raw HTTP logs produced by RawHttpsFallback: true are generated only when AgentSight cannot resolve traffic into GenAI semantics. They are mutually exclusive with gen_ai.* logs: a single request produces at most one of the two.

    • Raw HTTP traffic is reported with the event names event.name=http.request and event.name=http.response.

    • This feature is supported only in LoongCollector v3.3.10 and later.

  5. Create indexes and preview data. You can manually create field indexes based on the collected fields, or click Auto Generate Index.

  6. 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, and gen_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 input_agentsight.

ProbeConfig

object

No

N/A

AgentSight probe configuration. When not configured, all sub-parameters use default values.

ProbeConfig.Verbose

uint

No

0

Specifies whether to print detailed eBPF logs. 1: enabled. 0: disabled.

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 AgentType (written to the gen_ai.agent.type log field) and Args (a string array that performs glob matching against each segment of the process command line by position). When neither this parameter nor CmdlineBlacklist is configured, the built-in default whitelist is injected. Once configured, only user-defined rules are used and built-in defaults are not appended. An empty array [] is treated as an invalid configuration.

ProbeConfig.CmdlineBlacklist

array

No

N/A

Process Agent filter blacklist. Each entry is a glob string array (no AgentType). Matching processes are excluded from collection. Takes priority over the whitelist.

ProbeConfig.Https

array

No

Built-in 7 rules

HTTPS encrypted traffic domain whitelist (string array, glob wildcard *, case-insensitive). Processes that access domains in this list are identified as collection targets. When not configured, the built-in default list is injected.

ProbeConfig.Http

array

No

[] (disabled)

HTTP plaintext traffic target list. Each entry can be :port, IP, IP:port, or a domain. When left empty, HTTP plaintext traffic is not collected.

ProbeConfig.RawHttpsFallback

bool

No

false

When set to true, traffic that cannot be parsed into LLM semantics (unknown API paths or non-standard bodies) is no longer discarded. Instead, it is reported as raw HTTP traffic with the event names event.name=http.request and event.name=http.response. Such raw HTTP logs are generated only when AgentSight cannot resolve traffic into GenAI semantics, and are mutually exclusive with gen_ai.* logs: a single request produces at most one of the two. Supported only in LoongCollector v3.3.9 and later.

ProbeConfig.EventStreamFormat

bool

No

true

When true, each LLM call outputs two logs in the same log group: gen_ai.model.request (request) and gen_ai.model.response (response), each with an event.id. When false, a single merged log is output without event.name or event.id.

ProbeConfig.MessageDeltaOnly

bool

No

true

When true, the full gen_ai.input.messages is not output. Only the incremental gen_ai.input.messages_delta is output, along with full system/tools text when the hash changes. When false, the full non-empty gen_ai.input.messages is output each time. Does not affect gen_ai.output.messages.

Collection scope determination logic

HTTPS encrypted traffic (process level) is determined in the following fixed order:

  1. Matches CmdlineBlacklist → not collected (blacklist takes priority).

  2. Does not match the blacklist and matches CmdlineWhitelist → collected.

  3. Still not included, and the process accesses a domain that matches Https → collected.

  4. 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)

hermes

hermes*

hermes

*python*, *hermes*

hermes

*python*, -m, *hermes*

cosh

node*, */usr/bin/co*

cosh

node*, */usr/bin/cosh*

cosh

node*, */usr/bin/copliot*

cosh

node*, *copilot-shell*

openclaw

*openclaw-gatewa*

openclaw

node*, *openclaw*

Built-in default domain whitelist entries

Domain

Description

api.openai.com

OpenAI

api.anthropic.com

Anthropic

dashscope.aliyuncs.com

DashScope pay-as-you-go, China (Beijing)

dashscope-intl.aliyuncs.com

DashScope pay-as-you-go, Singapore

dashscope-us.aliyuncs.com

DashScope pay-as-you-go, US (Virginia)

coding.dashscope.aliyuncs.com

DashScope Coding Plan

*.maas.aliyuncs.com

DashScope dedicated workspace / trial / Token Plan domains

Important

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 a CmdlineWhitelist rule, or that the domains it accesses are in the Https list. 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; echo

    Technical 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 SSL_read and SSL_write through symbols. Examples: OpenClaw, Hermes, Cosh, and Claude Code.

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.