Skip to main content

Auto-implement

Early access preview

This feature is in preview phase and is available in Dagster+ in limited early access. Functionality and APIs may change as we continue development. To get early access to this feature, reach out to your Dagster account team. For more information, see the API lifecycle stages documentation.

From any Issue, you can dispatch an AI coding agent to plan and implement a fix via GitHub Actions and Claude Code.

Prerequisites

  • A Dagster+ organization with Dagster+ AI enabled
  • A GitHub App installation connected to your organization
  • The dg CLI installed (pip install dagster-dg)
  • An Anthropic API key

Setup

Step 1: Scaffold the GitHub workflow

Run the following command in your repository to generate the GitHub Actions workflow:

dg labs scaffold github-actions-ai-dispatch

This creates .github/workflows/dg-ai-dispatch.yml. Commit and push the file to your repository's default branch.

Step 2: Add the Anthropic API key

Add ANTHROPIC_API_KEY as a GitHub Actions repository secret.

Dispatching from the UI

  1. Navigate to an Issue in the Dagster+ UI.
  2. Select the GitHub repository that contains the code to fix.
  3. The system checks for the required workflow file in the selected repository.
  4. Click Implement with Dagster+ AI.

After dispatching, links to the draft PR and workflow run appear in the UI.

Dispatching from the CLI

dg labs ai dispatch <issue_id>

The CLI infers the target repository from the origin git remote. To target a different repository, pass --repo owner/repo.

Required configuration (via flags or environment variables):

FlagEnvironment variableDescription
--organizationDAGSTER_CLOUD_ORGANIZATIONYour Dagster+ organization name
--deploymentDAGSTER_CLOUD_DEPLOYMENTThe deployment containing the Issue
--api-tokenDAGSTER_CLOUD_API_TOKENA Dagster+ API token

Customizing the workflow

The scaffolded workflow at .github/workflows/dg-ai-dispatch.yml can be customized:

  • Timeouts: Adjust timeout-minutes on the plan or implement jobs.
  • Model: Change the default value of the model_name input.
  • Setup steps: Add steps before the Claude Code action (e.g., installing dependencies, setting up a Python environment).
  • Prompts: Modify the prompt field in each Claude Code action step to customize how the agent approaches your codebase.

Coming soon

  • Support for other models and runtimes: You will be able to launch auto-implement with alternative providers other than GitHub Actions and Claude Code.