---
title: Set Up Agent Console
description: >-
  Set up integrations for Claude Code, Cursor, and GitHub Copilot to monitor
  coding agent activity in Datadog Agent Console.
breadcrumbs: Docs > Agent Console > Set Up Agent Console
---

# Set Up Agent Console

{% callout %}
##### Preview

Agent Console is available to all Datadog customers in Preview.
{% /callout %}

Set up an integration for each coding agent you want to monitor in [Agent Console](https://app.datadoghq.com/llm/ai-agents-console).

## Claude Code{% #claude-code %}

### Option 1: Anthropic Usage and Costs integration (recommended){% #option-1-anthropic-usage-and-costs-integration-recommended %}

To monitor Claude Code with Agent Console, set up the [Anthropic Usage and Costs](https://docs.datadoghq.com/integrations/anthropic-usage-and-costs.md) integration.

After setup, navigate to the [Agent Console](https://app.datadoghq.com/llm/ai-agents-console) and click the Claude Code tile to view metrics.

### Option 2: OpenTelemetry (OTLP){% #option-2-opentelemetry-otlp %}

The following procedure configures Claude Code to send telemetry directly to Datadog with the OpenTelemetry protocol (OTLP).

1. Make sure that your [Logs configuration](https://docs.datadoghq.com/logs/log_configuration.md) includes a catch-all [index](https://docs.datadoghq.com/logs/log_configuration/indexes.md), or an index that covers `service:claude-code`.

1. Generate a [Datadog API key](https://app.datadoghq.com/organization-settings/api-keys).

1. Set the following environment variables in your Claude Code settings file (for example, `~/.claude/settings.json`):

   ```json
   {
     "env": {
       "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
       "OTEL_LOGS_EXPORTER": "otlp",
       "OTEL_EXPORTER_OTLP_LOGS_PROTOCOL": "http/protobuf",
       "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT": "<YOUR_OTLP_LOGS_ENDPOINT>",
       "OTEL_METRICS_EXPORTER": "otlp",
       "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL": "http/protobuf",
       "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": "<YOUR_OTLP_METRICS_ENDPOINT>",
       "OTEL_EXPORTER_OTLP_HEADERS": "dd-api-key=<DATADOG_API_KEY>"
     }
   }
   ```

Replace `<DATADOG_API_KEY>` with your Datadog API key.
Important alert (level: info): To set up Agent Console for Claude Code across your organization, your IT team can use a Mobile Device Management (MDM) system or [server-managed settings](https://code.claude.com/docs/en/server-managed-settings) to distribute the Claude Code settings file across all managed devices.
1. Restart Claude Code.

After you restart Claude Code, navigate to the [Agent Console](https://app.datadoghq.com/llm/ai-agents-console) and click the Claude Code tile. Metrics (usage, cost, latency, errors) should appear within a few minutes.

### Option 3: Forward data through the Datadog Agent{% #option-3-forward-data-through-the-datadog-agent %}

1. Make sure that your [Logs configuration](https://docs.datadoghq.com/logs/log_configuration.md) includes a catch-all [index](https://docs.datadoghq.com/logs/log_configuration/indexes.md), or an index that covers `service:claude-code`.

1. [Install the Datadog Agent](https://docs.datadoghq.com/agent.md?tab=Host-based).

1. Configure your Datadog Agent to enable the OpenTelemetry Collector:

   ```yaml
   otlp_config:
     receiver:
       protocols:
         grpc:
           endpoint: 0.0.0.0:4317
     logs:
       enabled: true
   otelCollector:
     enabled: true
   ```

1. Set the following environment variables in your Claude Code settings file (for example, `~/.claude/settings.json`):

   ```json
   {
     "env": {
       "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
       "OTEL_METRICS_EXPORTER": "otlp",
       "OTEL_LOGS_EXPORTER": "otlp",
       "OTEL_EXPORTER_OTLP_ENDPOINT": "http://127.0.0.1:4317",
       "OTEL_EXPORTER_OTLP_PROTOCOL": "grpc",
       "OTEL_METRIC_EXPORT_INTERVAL": "10000"
     }
   }
   ```
Important alert (level: info): To set up Agent Console for Claude Code across your organization, your IT team can use a Mobile Device Management (MDM) system or [server-managed settings](https://code.claude.com/docs/en/server-managed-settings) to distribute the Claude Code settings file across all managed devices.
1. Restart Claude Code.

After you restart Claude Code, navigate to the [Agent Console](https://app.datadoghq.com/llm/ai-agents-console) and click the Claude Code tile. Metrics (usage, cost, latency, errors) should appear within a few minutes.

## Cursor{% #cursor %}

To monitor Cursor with Agent Console, set up the [Cursor](https://docs.datadoghq.com/integrations/cursor.md?tab=datadogextensionforcursor) integration using the Datadog Extension for Cursor.

After setup, navigate to the [Agent Console](https://app.datadoghq.com/llm/ai-agents-console) and click the Cursor tile to view metrics.

## GitHub Copilot{% #github-copilot %}

To monitor GitHub Copilot with Agent Console, set up the [GitHub Copilot](https://docs.datadoghq.com/integrations/github-copilot.md) integration.

After setup, navigate to the [Agent Console](https://app.datadoghq.com/llm/ai-agents-console) and click the GitHub Copilot tile to view metrics.

## Further reading{% #further-reading %}

- [Agent Console](https://docs.datadoghq.com/ai_agents_console.md)
- [Anthropic Usage and Costs integration](https://docs.datadoghq.com/integrations/anthropic-usage-and-costs.md)
- [Cursor integration](https://docs.datadoghq.com/integrations/cursor.md)
