Skip to main content

Dev Agent

A developer agent that picks up GitHub issues and implements the requested changes. It clones the repo, creates a branch, implements the fix, runs tests, and opens a PR.

Setup

  1. Copy agent-config.toml and ACTIONS.md into agents/dev/ in your project
  2. Edit agent-config.toml:
    • Set orgs to your GitHub organization
    • Set author to the GitHub username whose issues should be picked up
    • Set triggerLabel to the label that marks issues as ready for development
  3. Run al doctor to verify credentials

Trigger modes

Webhook (recommended): Fires when an issue is labeled with ready-for-dev (configurable via triggerLabel). Requires a GitHub webhook configured in config.toml — see Webhooks docs. Scheduled: Runs on a cron schedule (default: hourly). Searches for open issues matching the configured org, author, and triggerLabel.

How it works

Each run, the agent:
  1. Finds an issue to work on (from webhook trigger or scheduled search)
  2. Acquires a resource lock to prevent duplicate work
  3. Clones the repo and creates a branch (agent/<issue-number>)
  4. Reads the issue and any planner comments for context
  5. Implements the changes, following project conventions
  6. Runs all available checks (lint, type check, tests, build) and fixes failures
  7. Commits, pushes, and opens a PR
  8. Labels the issue as agent-completed

Custom Dockerfile

The dev agent uses the gh CLI, which isn’t in the base image. Add a Dockerfile to the agent directory (only needed for Docker mode):
FROM al-agent:latest
USER root
RUN apk add --no-cache github-cli
USER node