Auto-implement
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
dgCLI 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
- Navigate to an Issue in the Dagster+ UI.
- Select the GitHub repository that contains the code to fix.
- The system checks for the required workflow file in the selected repository.
- 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):
| Flag | Environment variable | Description |
|---|---|---|
--organization | DAGSTER_CLOUD_ORGANIZATION | Your Dagster+ organization name |
--deployment | DAGSTER_CLOUD_DEPLOYMENT | The deployment containing the Issue |
--api-token | DAGSTER_CLOUD_API_TOKEN | A Dagster+ API token |
Customizing the workflow
The scaffolded workflow at .github/workflows/dg-ai-dispatch.yml can be customized:
- Timeouts: Adjust
timeout-minuteson theplanorimplementjobs. - Model: Change the
defaultvalue of themodel_nameinput. - Setup steps: Add steps before the Claude Code action (e.g., installing dependencies, setting up a Python environment).
- Prompts: Modify the
promptfield 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.