Skip to main content

Prerequisites

Before you begin, ensure you have:
  • Completed the GitHub App installation
  • Admin or write access to your repository
  • Required secrets configured in your GitHub repository

Setting up the workflow

Follow these steps to add the AutoDev workflow to your repository:

1. Create the workflow file

Create a new file at .github/workflows/autodev.yml in your repository.

2. Add the workflow configuration

Copy the following YAML configuration into the file:
name: 'AutoDev'
run-name: 'AutoDev: ${{ inputs.task_title }}'

on:
  workflow_dispatch:
    inputs:
      prompt:
        description: "Instructions for AutoDev. Can be a direct prompt or custom template."
        type: string
        required: true

      base_branch:
        description: "The branch to use as the base/source when creating new branches (defaults to repository default branch)"
        type: string
        required: false
        default: 'main'

      agent:
          description: "The agent to use for the action. Can be 'claude_code', 'gemini_cli', 'codex_cli' or 'opencode'"
          type: choice
          default: 'claude_code'
          options:
            - claude_code
            - gemini_cli
            - codex_cli
            - opencode
            - crush_cli
            - github_copilot_cli

      agent_model:
        description: "The (optional) model to use for the agent"
        type: string
        required: false
        default: ''


      autodev_workflow_execution_token:
        description: "The token to use for the AutoDev task"
        type: string
        required: false
        default: ''

      autodev_mode:
        description: "The AutoDev execution mode. Can be 'develop' (default) or 'plan' (for task graph planning)"
        type: choice
        default: 'develop'
        options:
          - develop
          - plan

      task_title:
        description: "The title of the AutoDev task"
        type: string
        required: false
        default: ''

jobs:
  autodev:
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
      issues: write
      id-token: write
      actions: read # Required for Claude to read CI results on PRs
    steps:
      - name: Checkout code
        uses: actions/checkout@v5

      # Setup step.
      # See next section for the documentation
      # - name: Setup Node.js
      #   uses: actions/setup-node

      - name: Run AutoDev
        uses: delinoio/autodev-action@main
        with:
          agent: ${{ inputs.agent }}
          agent_model: ${{ inputs.agent_model }}
          autodev_mode: ${{ inputs.autodev_mode }}
          autodev_workflow_execution_token: ${{ inputs.autodev_workflow_execution_token }}
          prompt: ${{ inputs.prompt }}
          base_branch: ${{ inputs.base_branch }}
          mode: 'develop'
          delino_access_token: ${{ secrets.DELINO_ACCESS_TOKEN }}
          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
          openai_api_key: ${{ secrets.OPENAI_API_KEY }}

3. Customize the setup steps

The workflow includes a setup step that you should customize for your repository:
- name: Setup Node.js
  uses: actions/setup-node
Replace these with your project’s setup steps. The steps here should configure a complete development environment for the AI agent.
For example, the Delino monorepo includes steps for
  • installing protoc for RPC definitions
  • installing golang for backend servers
  • installing nodejs for next.js apps
  • fetching environment variables for development environment

4. Configure DELINO_ACCESS_TOKEN

Create a new API key following the guide at Creating API Keys and add it as a repository secret on GitHub settings.

5. Commit to your main branch

Commit the workflow file to your repository’s main branch:
git add .github/workflows/autodev.yml
git commit -m "Add AutoDev workflow"
git push

Next steps

Once the workflow is set up, you can start using AutoDev to automate development tasks. Learn how to trigger your first AutoDev task in the Creating your first PR guide.
I