Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions config/_default/menus/main.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,11 @@ menu:
parent: bits_ai
identifier: bits_ai_dev_agent
weight: 2
- name: Setup
url: bits_ai/bits_ai_dev_agent/setup
parent: bits_ai_dev_agent
identifier: bits_ai_dev_agent_setup
weight: 200
- name: Chat with Bits AI
url: bits_ai/chat_with_bits_ai
identifier: bits_ai_chat_with_bits_ai
Expand Down
69 changes: 0 additions & 69 deletions content/en/bits_ai/bits_ai_dev_agent.md

This file was deleted.

110 changes: 110 additions & 0 deletions content/en/bits_ai/bits_ai_dev_agent/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
title: Bits AI Dev Agent
further_reading:
- link: "https://www.datadoghq.com/blog/bits-ai-dev-agent/"
tag: "Blog"
text: "Automatically identify issues and generate fixes with the Bits AI Dev Agent"
---

{{< callout url="http://datadoghq.com/product-preview/bits-ai-dev-agent" >}}
Bits AI Dev Agent is in Preview. To sign up, click <strong>Request Access</strong> and complete the form.
{{< /callout >}}

## Overview

{{< img src="bits_ai/dev_agent/error_tracking_assistant.png" alt="Bits AI Dev Agent suggesting a fix for an IndexError in a Django app" style="width:100%;">}}

Bits AI Dev Agent is a generative AI coding assistant that uses observability data from Datadog to automatically detect, diagnose, and fix high-impact issues in your code. It integrates with GitHub to create production-ready pull requests, iterates on fixes using CI logs and developer feedback, and draws on multiple Datadog products to generate contextual fixes.

## Supported Datadog products

Bits AI Dev Agent is available for the following Datadog products:

| Product | Availability | Issues Detected |
|---------------------------|----------------------|--------------------------------------------------------------------|
| [Error Tracking][1] | Preview | Crashes, panics, exceptions, unhandled errors |
| [Code Security][2] | Preview | Security issues in first-party code and open source dependencies |
| [Continuous Profiler][3] | Preview | Code-level performance issues |
| [Test Optimization][4] | Preview | Flaky tests |

## Key capabilities

Bits AI Dev Agent provides comprehensive code remediation across multiple areas of your development workflow:

### Error tracking

Bits AI Dev Agent diagnoses and remediates code issues with automated context and unit-tested fixes:
- Determines whether an error can be fixed through code and generates unit tests.
- Provides links 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.

### Flaky test remediation

Bits AI Dev Agent fixes unreliable tests in CI/CD pipelines and verifies that the tests remain stable.

### Trace investigation

Bits AI Dev Agent debugs errors and latency directly from traces using natural language queries:
- Parses and summarizes large traces.
- Diagnoses likely root causes.
- Generates code fixes for errors or latency issues within a trace.

### Code fix generation

Bits AI Dev Agent applies automated code changes based on Datadog insights such as CCM Recommendations, APM Recommendations, and Profiling Insights.

### 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.

### Pull request assistance

Bits AI Dev Agent works in GitHub to request changes, fix CI failures, and respond to review comments:

- Generates PR titles and descriptions based on your PR template.
- Opens PRs as drafts, iterates using CI logs, and marks them ready for review when checks pass.
- Continues iterating in response to chat messages and review feedback.
**Note**: Comment `@Datadog` to ask for updates to the PR. The Dev Agent never auto-merges PRs.

Go to **Bits AI** > **Dev Agent** > **[Code sessions][7]** to see all Dev Agent code sessions and generated PRs. You can search by service, source, and status.

### Bits AI SRE integration

Bits AI Dev Agent generates fixes from SRE-led investigations. Learn more about [Bits AI SRE][8].

## Get started

To enable Bits AI Dev Agent:

1. Install the [GitHub integration][5].
2. Grant the required permissions.
3. Send CI logs to Datadog if you want the Dev Agent to iterate on PRs using build feedback.

For full installation and configuration instructions, see [Setup][6].

## Limitations

- Bits AI Dev Agent is an AI-based product, which means outputs may vary for the same input and sometimes require human review.
- Bits AI Dev Agent does not support multi-repository investigations.

## Security considerations

Observability data (such as traces, logs, and metrics) can include content from untrusted sources. Attackers might attempt to inject this data to influence agent behavior (for example, by injecting prompts that cause unintended code changes).

Datadog applies automated security and quality checks on agent output, but safeguards are limited and may not detect all malicious or unsafe code. Review and test all changes generated by the Dev Agent before merging them into production.

## Further reading

{{< partial name="whats-next/whats-next.html" >}}

[1]: /error_tracking
[2]: /security/code_security
[3]: /profiler/
[4]: /tests/
[5]: https://app.datadoghq.com/integrations/github
[6]: /bits_ai_dev_agent/setup
[7]: https://app.datadoghq.com/code?tab=my-sessions
[8]: /bits_ai/bits_ai_sre/
92 changes: 92 additions & 0 deletions content/en/bits_ai/bits_ai_dev_agent/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
title: Bits AI Dev Agent Setup
disable_toc: false
---

## Overview

Bits AI Dev Agent integrates with GitHub to open, update, and iterate on pull requests based on issues detected in Datadog.

<div class="alert alert-info">Bits AI Dev Agent supports GitHub only.</div>

## Setup

### Step 1: Enable the GitHub integration

Install the [GitHub integration][5]. For full installation and configuration steps, see the [GitHub integration guide][6].

### Step 2: Configure GitHub permissions

The GitHub integration must be granted the following permissions to enable basic Dev Agent functionality:

- **Repository Permissions**
- `Contents: Read & Write`
- `Pull Requests: Read & Write`
- **Subscribe to Events**
- `Push`

#### Additional permissions for CI integration

To allow the Dev Agent to use CI logs when iterating on pull requests, you must send CI logs to Datadog and enable the Auto-commit feature. This requires additional permissions:

- **Repository permissions**
- `Checks: Read`
- `Commit statuses: Read only`
- **Subscribe to events**
- `Check run`
- `Check suite`
- `Issue comment`
- `Status`

### Step 3: Configure telemetry tagging

Bits AI Dev Agent uses the `service` and `version` telemetry tags to match detected issues (such as errors or vulnerabilities) to the version of code that was running at the time.

To configure telemetry tagging, see [Tag your telemetry with Git information][7]. You can also configure service-to-repository mapping manually in **Settings**.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leachface Are you able to provide more specific instructions on the manual route here?


### Step 4: (Optional) Enable Auto-push

Enabling Auto-Push allows the Dev Agent to push commits directly to a branch. With Auto-Push, the Dev Agent can:
- Open merge-ready pull requests that fix errors, vulnerabilities, and other issues.
- Update pull requests in response to your comments in GitHub.
- Resolve CI failures automatically.

If Auto-Push is disabled, you must review and approve code in Datadog before it is pushed.

### Step 5: Configure custom instructions

The Dev Agent ingests custom instruction files from your repository, including:

- `.cursorrules`
- `.windsurfrules`
- `copilot-instructions.md`
- `claude.md`
- `agents.md`
- `agent.md`

You can also define global custom instructions in **Settings**, which apply to all Dev Agent sessions.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leachface Same Q here: I brought this over from the Google Doc but don't know what Settings are being referred to. Would like to give more specific instructions if possible.


## Troubleshooting

If you encounter issues during setup:

- **GitHub integration not connecting**: Verify your GitHub account has the necessary permissions and that the integration is properly configured.
- **Missing telemetry data**: Ensure your applications are properly instrumented and sending data to Datadog with the required tags.
- **Dev Agent not creating pull requests**: Check that Auto-Push is enabled (if desired) and that the GitHub integration has the required repository permissions.

For additional help, see the [GitHub integration troubleshooting guide][9] or contact [Datadog support][10].

## Further reading

{{< partial name="whats-next/whats-next.html" >}}

[1]: /error_tracking
[2]: /security/code_security
[3]: /profiler/
[4]: /tests/
[5]: https://app.datadoghq.com/integrations/github
[6]: /integrations/github/
[7]: /integrations/guide/source-code-integration/?tab=go#tag-your-telemetry-with-git-information
[8]: https://app.datadoghq.com/metric/summary
[9]: /integrations/github/#troubleshooting
[10]: /help/
Loading