Create an Agent Monitoring Application¶
- Go to Agent Monitoring > Overview.
- Select the Agent tab.
- Click Integrate Agent to open the integration configuration page.
Integration Types¶
Agent Monitoring supports the following integration types:
| Access Method | Integration Type |
|---|---|
| Installer Access | Codex, Claude Code, OpenClaw, Hermes, Qoder, WorkBuddy |
| Manual Access | AgentScope |
Using Installer Access¶
Codex, Claude Code, OpenClaw, Hermes, Qoder and WorkBuddy use the obs-agent-connector installer for access. The connector only needs to be installed once.
Step 1: Select the Integration Type¶
Select the Agent type to integrate on the integration configuration page.
Step 2: Install the Connector¶
Execute the corresponding command based on the operating system of the host where the Agent is located.
After installation, if the obs-agent-connector command is not recognized in the current terminal, reopen the terminal before proceeding.
Step 3: Install Plugins¶
Execute the following command to automatically discover Agents in the current environment and complete the integration:
Update or Remove Plugins¶
Update a plugin:
Remove a plugin:
AgentScope Manual Access¶
AgentScope does not use obs-agent-connector. It needs to be integrated manually via OpenTelemetry. The integration methods differ slightly by language. The following uses Java as an example.
Step 1: Select AgentScope¶
Select AgentScope on the integration configuration page, then fill in the instance name. The instance name supports Chinese characters, English letters, numbers, underscores, and hyphens, and must be unique within the same Agent type.
Step 2: Enable OpenTelemetry¶
Refer to the AgentScope official documentation and register TelemetryTracer in the 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 Integration¶
Restart the AgentScope application and initiate a test request. Then confirm in Agent Monitoring that Trace and Metrics data has been generated. If no data is generated, check whether the Endpoint, X-Token, Agent ID, and OpenTelemetry environment variables are configured correctly.