Skip to content

Create an Agent Monitoring Application


By integrating Agent applications or frameworks, you can view traces, model usage, and related performance data in Agent Monitoring. The integration methods for different types are as follows.

  1. Go to Agent Monitoring > Summary;
  2. Select the Agent tab;
  3. Click Integrate Agent to open the integration configuration page.

Agent Types

Agent Monitoring supports the following types:

Category Agent Type Integration Method
Agent Application Claude Code (claude), Claude Desktop (claude-desktop), CodeBuddy, Codex, Cursor, DCode, DeepSeek Harness (dsh), Grok, Hermes, Kiro, MiMo, OMP, OpenClaw, OpenCode, Pi, Qoder, Qwen Work (desktop, qwenwork-cn), WorkBuddy Use the obs-agent-connector installer
Agent Framework AgentScope, Spring AI Alibaba, Deep Agents Manually integrate using OpenTelemetry; for a Deep Agents example, see Integration steps

Integrate Using the Installer

Install the Agent you want to monitor first. You only need to install obs-agent-connector once per host. After installing the connector, run obs-agent-connector agents to view the Agent identifiers supported by the current version and their corresponding operating systems. Claude Desktop requires connector v0.1.33 or later.

Step 1: Select the Agent Type

On the integration configuration page, select the category and Agent type you want to integrate.

Step 2: Configure User Identity

In the integration configuration, you can choose whether to associate the personal information of members in the current workspace.

  • By default, "Associate workspace personal information" is selected. The system uploads personal information such as member names, uses the member uuid as user_id, and the user name as user_name;
  • If cleared, the system automatically generates a random id as user_id, and you need to enter user_name manually;
  • user_id is used to aggregate, filter, and drill down into User data;
  • user_name is used only for display and search, and is not the unique identifier of a User;
  • Multiple Agent types integrated through the same Connector share the same user_id.

An anonymous user_id remains unchanged after the Connector restarts, upgrades, or a plugin is updated. A new anonymous ID is generated only when the identity configuration is completely cleared or the identity is actively reset.

Step 3: Install the Connector

Run the corresponding command for the operating system of the host where the Agent is located.

curl -fsSL -O https://static.guance.com/obs-agent-connector/install.sh && \
sh install.sh \
  --download-base-url=https://static.guance.com/obs-agent-connector \
  --endpoint=<Endpoint> \
  --x-token=<X-Token>

Replace <Endpoint> and <X-Token> with the corresponding values provided on the integration configuration page, then run the following commands in PowerShell:

$env:OBS_AGENT_CONNECTOR_OSS_ENDPOINT = "https://static.guance.com/obs-agent-connector"
Invoke-WebRequest -Uri "$env:OBS_AGENT_CONNECTOR_OSS_ENDPOINT/install.ps1" -OutFile "install.ps1"
powershell -ExecutionPolicy bypass -File .\install.ps1 -Endpoint '<Endpoint>' -XToken '<X-Token>'

After installation, if the current terminal does not recognize the obs-agent-connector command, reopen the terminal and then perform the subsequent operations.

Step 4: Install Plugins

Run the following command to automatically discover Agents in the current environment and complete the integration:

obs-agent-connector discover

Update or Remove Plugins

Use the Agent identifiers output by obs-agent-connector agents to update or remove plugins. For example, the identifier for Claude Desktop is claude-desktop.

Update a plugin:

obs-agent-connector update <Agent identifier>

Remove a plugin:

obs-agent-connector remove <Agent identifier>
More Commands

To view supported Agents, common commands, installation parameters, and usage examples, see obs-agent-connector command reference.

Manually Integrate AgentScope

AgentScope does not use obs-agent-connector; you need to integrate it manually through OpenTelemetry. The integration method differs slightly by language; the following uses Java as an example.

Step 1: Select AgentScope

On the integration configuration page, select AgentScope, then enter an instance name. The instance name supports Chinese characters, English letters, digits, underscores, and hyphens, and must be unique within the same Agent type.

Step 2: Enable OpenTelemetry

Refer to the AgentScope official documentation to register TelemetryTracer in your AgentScope code:

import io.agentscope.core.tracing.TraceRegistry;
import io.agentscope.core.tracing.telemetry.TelemetryTracer;

TraceRegistry.register(
    TelemetryTracer.builder()
        .build()
);

ReActAgent agent = ReActAgent.builder()
    .name("Assistant")
    .model(model)
    .build();

Step 3: Configure Environment Variables

The integration configuration page generates the Endpoint, X-Token, Agent ID, and Agent Name based on the current instance. Copy the actual values generated on the page and configure the following environment variables:

export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_TRACES_EXPORTER=otlp
export OTEL_METRICS_EXPORTER=otlp
export OTEL_LOGS_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="<Endpoint>/v1/write/otel-llm"
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT="<Endpoint>/v1/write/otel-metrics"
export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT="<Endpoint>/v1/write/otel-logs"
export OTEL_RESOURCE_ATTRIBUTES="service.version=1.0.0,deployment.environment=production,agent_id=<Agent ID>,agent_name=<Agent Name>,agent_runtime=agentscope"
export OTEL_EXPORTER_OTLP_HEADERS="X-token=<X-Token>,to-headless=true"

Step 4: Verify the Integration

Restart the AgentScope application and send a test request, then check in Agent Monitoring that Trace and Metrics data has been generated. If there is no data, check in particular whether the Endpoint, X-Token, Agent ID, and OpenTelemetry environment variables are correctly in effect.

Manually Integrate Deep Agents

Deep Agents reports traces through OpenTelemetry, with the runtime identifier langchain. The following configuration applies to Python applications that have enabled OpenTelemetry trace collection, and is used to report the invocation of Agents, models, tools, and sub-agents.

Step 1: Create an Instance

Go to the integration configuration page, select Deep Agents under Agent Framework, and enter the instance name and User identity information. Copy the Endpoint, X-Token, Agent ID, Agent Name, User ID, and User Name generated on the page for use in the following configuration.

Step 2: Configure OpenTelemetry

Run the following configuration in the terminal where you start the application (for macOS/Linux), replacing the angle-bracketed placeholders with the actual values generated on the page in step 1. For Endpoint, use the base address provided on the page and do not append /v1/write/otel-llm again.

export OTEL_SERVICE_NAME="langchain-deep-agent"
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf
export OTEL_TRACES_EXPORTER=otlp
export OTEL_METRICS_EXPORTER=none
export OTEL_LOGS_EXPORTER=none
export TRACELOOP_TRACE_CONTENT=false
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="<Endpoint>/v1/write/otel-llm"
export OTEL_RESOURCE_ATTRIBUTES="agent_id=<Agent ID>,agent_name=<Agent Name>,user_id=<User ID>,user_name=<User Name>,agent_runtime=langchain"
export OTEL_EXPORTER_OTLP_HEADERS="X-token=<X-Token>,to-headless=true"

This example reports only Traces and disables Metrics and Logs export. Input and output content is not collected by default; to view the content, after confirming the data collection scope, set TRACELOOP_TRACE_CONTENT to true, and then generate new invocation records. Configuration changes do not backfill content for existing Traces.

Step 3: Start and Verify

Start or restart the Deep Agents application using the application's own start command, ensure the process loads the above environment variables, and make a test call.

After completing a call, go to the Deep Agents type page in Agent Monitoring, select the corresponding instance, and view the newly generated Traces. You can locate them by agent_id or service name, and check the call hierarchy and model and tool invocation information.

If there is no data, first check whether the model request succeeded, then verify the Endpoint, X-Token, protocol, and network connection. Whether fields such as Token are displayed depends on the data actually collected; when content collection is disabled, you should not judge that trace reporting failed based on empty input and output content.

Feedback

Is this page helpful?