---
title: Bits AI Dev Agent
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > Bits AI > Bits AI Dev Agent
---

# Bits AI Dev Agent

{% 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). ().
{% /alert %}

{% /callout %}

## Overview{% #overview %}

Bits AI Dev Agent is a generative AI coding assistant that uses Datadog observability data to automatically diagnose and fix issues in your code. It integrates with GitHub to create production-ready pull requests, then iterates on changes using CI logs and developer feedback.

{% image
   source="https://docs.dd-static.net/images/bits_ai/dev_agent/code_sessions_overview.96c08435f0fa7f5620390fd14e56e1ae.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/bits_ai/dev_agent/code_sessions_overview.96c08435f0fa7f5620390fd14e56e1ae.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="A tab titled 'Code Sessions' shows a text field with suggestions underneath" /%}

Each time the Dev Agent investigates an issue or generates a fix, it creates a code session, which captures the agent's analysis, actions, and any resulting code changes across supported Datadog products.

To get started with Bits AI Dev Agent, [set up the GitHub integration](https://docs.datadoghq.com/bits_ai/bits_ai_dev_agent/setup.md) and complete any additional configuration. Then, start your first code session.

## Code sessions{% #code-sessions %}

A code session captures a segment of work with the Bits AI Dev Agent, including its analysis and code changes. Start, view, and manage your sessions at **Bits AI** > **Dev Agent** > [**Code Sessions**](https://app.datadoghq.com/code).

{% image
   source="https://docs.dd-static.net/images/bits_ai/dev_agent/code_fix.7c8b10895a7ad4726c58a7fd3e65f3ed.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/bits_ai/dev_agent/code_fix.7c8b10895a7ad4726c58a7fd3e65f3ed.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="A code session showing a Bits AI summary and task list on the left and a code diff on the right" /%}

### Start a code session{% #start-a-code-session %}

After [completing setup](https://docs.datadoghq.com/bits_ai/bits_ai_dev_agent/setup.md), do one of the following to start a code session:

- Enter a freeform prompt at [**Code Sessions**](https://app.datadoghq.com/code): enter a custom prompt or generate one by clicking a **Suggestions** or **Proactive Fixes** card
- Invoke Bits AI Dev Agent in a supported Datadog product

A code session can also be created when another Bits AI agent (like [Bits Assistant](https://docs.datadoghq.com/bits_ai/bits_assistant.md) or [Bits AI SRE](https://docs.datadoghq.com/bits_ai/bits_ai_sre.md)) hands off a coding task to the Dev Agent.

### View and manage code sessions{% #view-and-manage-code-sessions %}

On **[Code Sessions](https://app.datadoghq.com/code)**, view your past sessions in the **My Sessions** panel. A session appears here if you initiated it or interacted with it in some way, like participating in the conversation or creating an associated PR.

Click a session to view its details and continue working with the Dev Agent. To remove a session from your **My Sessions** list, click 
{% icon name="icon-archive-wui" /%}
 (**Archive for everyone**) or 
{% icon name="icon-eye-slashed-wui" /%}
 (**Unwatch session**).

## Supported Datadog products{% #supported-datadog-products %}

Bits AI Dev Agent can suggest code improvements in the following Datadog products:

| Product                                                                | Capabilities                                                                                                                                                  |
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [APM](https://docs.datadoghq.com/tracing.md)                           | Proposes code changes for relevant [APM Recommendations](https://docs.datadoghq.com/tracing/recommendations.md)                                               |
| [Bits AI SRE](https://docs.datadoghq.com/bits_ai/bits_ai_sre.md)       | Generates code remediations based on Bits AI SRE investigations                                                                                               |
| [Bits Assistant](https://docs.datadoghq.com/bits_ai/bits_assistant.md) | Suggests code changes arising from Bits Assistant conversations                                                                                               |
| [Cloud Cost](https://docs.datadoghq.com/cloud_cost_management.md)      | Generates code changes for [Cloud Cost Recommendations](https://docs.datadoghq.com/cloud_cost_management/recommendations.md)                                  |
| [Error Tracking](https://docs.datadoghq.com/error_tracking.md)         | Diagnoses issues and generates code fixes on-demand or autonomously                                                                                           |
| [Code Security](https://docs.datadoghq.com/security/code_security.md)  | Remediates code vulnerabilities individually or in bulk                                                                                                       |
| [Test Optimization](https://docs.datadoghq.com/tests.md)               | Provides code fixes for [flaky tests](https://docs.datadoghq.com/tests/flaky_management.md#ai-powered-flaky-test-fixes) and verifies that tests remain stable |
| [Continuous Profiler](https://docs.datadoghq.com/profiler.md)          | Provides code changes for [Automated Analysis](https://docs.datadoghq.com/profiler/automated_analysis.md) insights                                            |
| [Containers](https://docs.datadoghq.com/containers.md)                 | Provides code changes for [Kubernetes Remediations](https://docs.datadoghq.com/containers/bits_ai_kubernetes_remediation.md)                                  |

**Note**: Enabling Bits AI Dev Agent is product-specific. Even if it's active for one Datadog product, it must be separately enabled for each additional product you use.

## Key capabilities{% #key-capabilities %}

The following sections detail how Bits AI Dev Agent integrates with Datadog products to generate contextual code fixes.

### Pull request assistance{% #pull-request-assistance %}

Bits AI Dev Agent integrates with GitHub to create pull requests, respond to comments, update commits, and fix CI failures.

- Generates PR titles and descriptions based on your PR template.

- Opens PRs as drafts, iterates using CI logs, and marks the PRs as ready for review when checks pass.

- Continues iterating in response to chat messages and review feedback.

**Note**: Comment `@Datadog` to prompt Bits for updates to the PR. Bits Dev never auto-merges PRs.

See all PRs the Dev Agent is working on in **Bits AI** > **Dev Agent** > **[Code Sessions](https://app.datadoghq.com/code)**.

### Auto-push{% #auto-push %}

Auto-push allows the Dev Agent to create branches, push code, and open PRs when it detects something it can help you with. For example, the Dev Agent can:

- Auto-create PRs for high-impact errors (such as 500s or crashes).
- Update PRs in response to your comments in GitHub.
- Update PRs to address CI failures.

Auto-push only opens PRs and pushes changes; it never merges code. When auto-push is disabled, you must review code in Datadog before it gets pushed.

Auto-push is available for Error Tracking and Test Optimization.

#### Security considerations{% #security-considerations %}

Allowing any AI-based tool to read untrusted data can let attackers influence its output. Auto-push behavior depends on the type of data the Dev Agent works with: code-only workflows operate on source code the Agent can inspect directly, while telemetry-based workflows (such as errors or traces) may include untrusted runtime inputs.

To balance safety and automation, you can configure auto-push behavior in [Datadog](https://app.datadoghq.com/code/settings) (for example, limiting auto-push to code-only workflows or requiring review when telemetry is involved). Datadog scans all Agent-generated code before pushing changes, but these safeguards are not foolproof.

### Error tracking{% #error-tracking %}

In [Error Tracking](https://docs.datadoghq.com/error_tracking.md), Bits AI Dev Agent diagnoses and remediates code issues with context and unit-tested fixes:

- Determines whether an error can be fixed through code and generates a fix with unit tests.
- Provides links within the chat to relevant files and methods for streamlined navigation.
- Analyzes errors asynchronously as they arrive.
- Marks errors with a Fix available status and enables filtering to surface those issues.

Auto-push is available for this feature.

### Flaky test management{% #flaky-test-management %}

Bits AI Dev Agent fixes flaky tests that are detected through Flaky Test Management in [Test Optimization](https://docs.datadoghq.com/tests.md) and attempts to verify that tests remain stable.

Auto-push is available for this feature.

### In-product recommendations{% #in-product-recommendations %}

Bits AI Dev Agent suggests code improvements and fixes in various Datadog products, such as CCM Recommendations, [APM Recommendations](https://docs.datadoghq.com/tracing/recommendations.md), and Profiling Insights. See Supported Datadog products for a full list.

### Code security{% #code-security %}

Bits AI Dev Agent remediates vulnerabilities at scale, from single issues to large backlogs. You can:

- Create PR batches to fix multiple vulnerabilities at once.
- Use the Campaign tool to push PRs incrementally and manage review workload across teams.

Datadog Code Security uses Bits AI to enhance static analysis and generate remediation suggestions, which can be reviewed and applied through the Bits AI Dev Agent. Learn more about [AI-Enhanced Static Code Analysis](https://docs.datadoghq.com/security/code_security/static_analysis/ai_enhanced_sast.md).

## Limitations{% #limitations %}

- Bits Dev is an AI product, which means it can make mistakes. Use best practices when reviewing and testing agent-generated code.
- Bits AI Dev Agent does not support multi-repository investigations.

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

- [Automatically identify issues and generate fixes with the Bits AI Dev Agent](https://www.datadoghq.com/blog/bits-ai-dev-agent/)
- [Introducing Bits AI Dev Agent for Code Security](https://www.datadoghq.com/blog/bitsai-dev-agent-code-security)
