---
title: Set Up Agent Console
description: >-
  Connect coding agents, knowledge agents, and productivity tools to Datadog
  Agent Console, and map user identities across tools.
breadcrumbs: Docs > Agent Console > Set Up Agent Console
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Set Up Agent Console

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com

{% callout %}
##### Preview

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

{% /callout %}

To set up [Agent Console](https://app.datadoghq.com/llm/ai-agents-console), connect the AI tools you want to monitor, optionally connect productivity tools, and map user identities across tools. The Setup page in Agent Console Settings tracks your progress through each step.

{% image
   source="https://docs.dd-static.net/images/ai_agents_console/setup_agent_console.19b9346c80587986a9cbacc260e02bff.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/ai_agents_console/setup_agent_console.19b9346c80587986a9cbacc260e02bff.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Agent Console Settings Setup page with a progress bar and steps to validate your data, map identities, connect your first agent, and connect productivity tools" /%}

## Permissions{% #permissions %}

Agent Console access is controlled by the following role permissions. Assign them to roles in [Organization Settings > Roles](https://app.datadoghq.com/organization-settings/roles).

| Permission            | Description                                                                                                                    |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `agent_console_read`  | View Agent Console, including Overview, My Usage, Usage, and Settings. Users without this permission can't open Agent Console. |
| `agent_console_write` | Change Agent Console configuration, such as identity mapping and integration setup.                                            |

## Connect AI tools{% #connect-ai-tools %}

Select the AI tools to connect from the Set up your AI tools page, which appears the first time you open Agent Console. Connect at least one tool to start seeing data. You can add more tools later.

{% image
   source="https://docs.dd-static.net/images/ai_agents_console/agent_console_onboarding.d983190a8f9dc20de60c3d324c4720ce.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/ai_agents_console/agent_console_onboarding.d983190a8f9dc20de60c3d324c4720ce.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Set up your AI tools page with cards for Trajectory, Cursor, Anthropic Products, GitHub Copilot, Codex, Microsoft Copilot, ChatGPT Work, and Another Integration" /%}

### Anthropic products{% #anthropic-products %}

To monitor Claude Code, Claude Chat, Claude Cowork, and Claude Design, set up the [Anthropic Usage and Costs](https://docs.datadoghq.com/integrations/anthropic-usage-and-costs.md) integration. The integration collects daily spend and user analytics for each Claude product.

The Anthropic Usage and Costs integration doesn't support Claude Team plans. If your organization uses a Team plan, send Claude Code telemetry to Datadog with OpenTelemetry instead.

### Claude Code with OpenTelemetry{% #claude-code-with-opentelemetry %}

Use OpenTelemetry (OTLP) to send Claude Code telemetry directly to Datadog. Data collected this way appears on the Claude Code (OTel) card in Agent Console.

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.

{% tab title="Send directly to Datadog" %}

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": "<span class="js-region-param region-param" data-region-param="otlp_logs_endpoint"></span>",
       "OTEL_METRICS_EXPORTER": "otlp",
       "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL": "http/protobuf",
       "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": "<span class="js-region-param region-param" data-region-param="otlp_metrics_endpoint"></span>",
       "OTEL_EXPORTER_OTLP_HEADERS": "dd-api-key=<DATADOG_API_KEY>"
     }
   }
   ```

Replace `<DATADOG_API_KEY>` with your Datadog API key.

1. Restart Claude Code.

{% /tab %}

{% tab title="Forward 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"
     }
   }
   ```
1. Restart Claude Code.

{% /tab %}

After you restart Claude Code, metrics (usage, cost, latency, errors) appear in Agent Console within a few minutes.

### Codex{% #codex %}

To monitor Codex, set up the [OpenAI Codex](https://docs.datadoghq.com/integrations/openai-codex.md) integration. The integration collects daily usage, credits, code attribution, and review analytics.

### ChatGPT Work{% #chatgpt-work %}

To monitor ChatGPT Work, set up the [OpenAI](https://docs.datadoghq.com/integrations/openai.md?tab=apikey) integration. The integration collects activity, token, and estimated cost analytics.

### Cursor{% #cursor %}

To monitor Cursor, set up the [Cursor](https://docs.datadoghq.com/integrations/cursor.md?tab=datadogextensionforcursor) integration using the Datadog Extension for Cursor. The integration collects spend metrics and user analytics once a day.

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

To monitor GitHub Copilot, set up the [GitHub Copilot](https://docs.datadoghq.com/integrations/github-copilot.md) integration. The integration collects spend metrics and user analytics once a day.

### Microsoft Copilot 365{% #microsoft-copilot-365 %}

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com

{% callout %}
##### Preview

Microsoft Copilot 365 support is in Preview. To request access, contact your Datadog account team.
{% /callout %}

{% /callout %}

The Microsoft Copilot integration collects daily Microsoft 365 Copilot adoption data and metadata-only interaction analytics.

### Other coding and desktop agents with Trajectory{% #other-coding-and-desktop-agents-with-trajectory %}

[Trajectory](https://github.com/datadog-labs/trajectory) is an open source tool that captures sessions from more than 30 coding and desktop agents, such as Claude Code, Claude Desktop, Codex CLI, Cursor, Cline, Windsurf, and Zed, and sends them to Datadog. For the full list and version requirements, see [Supported Clients](https://github.com/datadog-labs/trajectory/blob/main/docs/SUPPORTED-CLIENTS.md).

Trajectory session data powers the Tasks, Skills, Tools, and Sessions views in Agent Console.

{% tab title="Individual developers" %}
Run the installer to install Trajectory for the current user:

```bash
bash <(curl -fsSL https://raw.githubusercontent.com/datadog-labs/trajectory/main/install.sh)
```

The installer downloads the latest Trajectory release for your platform, runs `trajectory setup`, and connects the coding agents it finds. When prompted, enter a [Datadog API key](https://app.datadoghq.com/organization-settings/api-keys) to send data to Datadog.

To configure the Datadog destination later, run:

```bash
trajectory publish destination configure
```

To upgrade Trajectory, rerun the installer.
{% /tab %}

{% tab title="Managed fleets (MDM)" %}
To deploy Trajectory to developer computers with an MDM or UEM product such as Jamf Pro or Microsoft Intune, follow the [Managed Endpoint Administrator Guide](https://github.com/datadog-labs/trajectory/blob/main/docs/MANAGED-ENDPOINTS.md). The guide covers package preparation, policy deployment, coding agent selection, and verification.
{% /tab %}

### Request an integration{% #request-an-integration %}

If the tool you want to monitor isn't listed, click Request an Integration on the Set up your AI tools page.

## Connect productivity tools{% #connect-productivity-tools %}

Optionally, connect productivity tools so Agent Console can show merged pull requests, time to merge, cost per pull request, and resolved issues alongside AI spend.

- **GitHub**: Set up the [GitHub](https://docs.datadoghq.com/integrations/github.md) integration to collect pull request data.
- **Jira**: Set up the [Jira](https://docs.datadoghq.com/integrations/jira.md) integration to collect issue data.

## Map identities{% #map-identities %}

Each AI tool identifies users differently, for example by email address, GitHub login, or Microsoft user principal name (UPN). Upload an identity mapping table so that usage and spend from every tool are attributed to the right person.

1. In Agent Console, go to Settings > Identity Mapping.

1. Prepare a CSV file with one row per person and the following columns:

| Column            | Requirement                |
| ----------------- | -------------------------- |
| `email`           | Required                   |
| `github_login`    | Required if you use GitHub |
| `microsoft_upn`   | Optional                   |
| `jira_account_id` | Optional                   |
| `datadog_handle`  | Optional                   |

Separate multiple email aliases, GitHub logins, or Jira account IDs with semicolons. The first email is the canonical email.

Choose any column with unique values, such as `email`, as the primary identifier. You can also add your own column for this purpose, such as an employee ID.

1. Upload the CSV file (maximum 10 MiB), preview the mapping, and save it.

{% image
   source="https://docs.dd-static.net/images/ai_agents_console/agent_console_identity_mapping.0d4bdac10b0a35adfe31f76ef6ff5b90.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/ai_agents_console/agent_console_identity_mapping.0d4bdac10b0a35adfe31f76ef6ff5b90.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Set up identity mappings dialog showing the required and optional CSV columns and a CSV upload area" /%}

## Validate your data{% #validate-your-data %}

After you connect your tools, open the [Agent Console](https://app.datadoghq.com/llm/ai-agents-console) and check that each connected integration shows as active on the Overview tab. Most integrations collect data once a day, so data can take up to 24 hours to appear.

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

Additional helpful documentation, links, and articles:

- [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)
- [OpenAI Codex integration](https://docs.datadoghq.com/integrations/openai-codex.md)
- [OpenAI integration](https://docs.datadoghq.com/integrations/openai.md)
- [Cursor integration](https://docs.datadoghq.com/integrations/cursor.md)
- [Trajectory](https://github.com/datadog-labs/trajectory)
