Neptune

Neptune Agent

GitHub Action for AI-assisted build-fix iteration

Neptune Agent

A GitHub Action that iterates on rebuilt firmware projects with an AI agent until they compile and pass tests.

How it works

  1. Attempts to build the project (make, cmake, or gcc)
  2. If the build fails, sends errors to an AI agent for fixing
  3. Commits fixes and retries
  4. If the build succeeds, runs tests
  5. If tests fail or don't exist, asks the agent to fix/create them
  6. Repeats until everything passes or max iterations is reached

Usage

- uses: semicentric/neptune@main
  with:
    model: "anthropic/claude-sonnet-4-20250514"
    max_iterations: 20
    goal: "Build the project, fix all compilation errors, add basic tests, iterate until CI passes"
  env:
    ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

Inputs

InputDefaultDescription
modelanthropic/claude-sonnet-4-20250514AI model to use (format: provider/model)
max_iterations20Maximum build-fix cycles
goalBuild, fix, testCustom goal for the agent

Environment

VariableRequiredDescription
ANTHROPIC_API_KEYYesAnthropic API key for the AI agent

Typical workflow

Neptune Agent is designed to run after neptune rebuild pushes a decompiled project to a new repository:

name: Neptune Agent
on: [push]

jobs:
  build-fix:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: semicentric/neptune@main
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

On this page