What the agent does
Dependabot needs to know which ecosystems a repository has and how often to look, so the agent reads the build before writing any YAML. In a Spring Boot project laid out like gothinkster/spring-boot-realworld-example-app, build.gradle applies org.springframework.boot 2.6.3, io.spring.dependency-management 1.0.11.RELEASE, com.netflix.dgs.codegen 5.0.6 and com.diffplug.spotless 6.2.1, sets sourceCompatibility to 11, and pins mybatis-spring-boot-starter:2.2.2, graphql-dgs-spring-boot-starter:4.9.21, jjwt-api:0.11.2, joda-time:2.10.13, sqlite-jdbc:3.36.0.3 and rest-assured:4.5.1, while flyway-core, lombok and the Spring starters take their versions from the Boot BOM. gradle/wrapper/gradle-wrapper.properties points at gradle-7.4-bin.zip. There is no .github/dependabot.yml, no settings.gradle, and no version catalog; every version lives in that one build file.
The agent then reads .github/workflows/gradle.yml, the only workflow: it runs on every branch push and pull request, checks out with actions/checkout@v2, installs Zulu JDK 11 with actions/setup-java@v2, caches ~/.gradle/caches and ~/.gradle/wrapper with actions/cache@v2, and runs ./gradlew clean test. That is a second ecosystem for Dependabot, and the pinned major versions of those actions are what a github-actions entry would raise. The agent also reads README.md, which says the project needs Java 11 and is tested with ./gradlew test, and lists the test tree under src/test/java/io/spring: api, application, infrastructure and core packages plus RealworldApplicationTests, so it knows what a Dependabot pull request will run against.
The configuration it writes is one file, .github/dependabot.yml with version: 2 and two updates entries. The gradle entry has directory: "/", a weekly schedule on a weekday morning in the team's timezone, and groups so related libraries arrive together: a spring group for org.springframework* patterns, a dgs group for com.netflix.graphql.dgs* and the codegen plugin, a test group for io.rest-assured* and the MyBatis test starter, and a minor-and-patch group for everything else with update-types limited to minor and patch. An ignore rule keeps org.springframework.boot and io.spring.dependency-management off version-update:semver-major, because Spring Boot 3 needs Java 17 and the Jakarta namespace and this build compiles for 11; the pull request says that is a deliberate hold, not an oversight. The github-actions entry has directory: "/", the same schedule and one group for all actions. Both set open-pull-requests-limit explicitly and commit-message prefixes so the history reads cleanly.
To check the file does what it claims, the agent validates it against the Dependabot v2 schema from SchemaStore with a JSON Schema checker, since a wrong key such as update-type instead of update-types is silently ignored by GitHub. It then installs a JDK 11 in its sandbox, runs ./gradlew clean test once to record that the suite is green before any dependency moves, and runs ./gradlew dependencies --configuration runtimeClasspath to list what Dependabot will see as managed by the BOM versus pinned directly. Those two outputs go into the pull request so the first Dependabot pull request has a baseline to compare against. The agent changes nothing in build.gradle.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Add Dependabot to this Gradle project. Read build.gradle, gradle/wrapper/gradle-wrapper.properties, .github/workflows/gradle.yml, README.md and the test tree under src/test first. Write .github/dependabot.yml with a gradle entry and a github-actions entry, both weekly, with groups that keep Spring, DGS and test libraries together and a group for minor and patch updates of everything else. Ignore semver-major updates of org.springframework.boot and io.spring.dependency-management because the build targets Java 11, and say so in a comment. Set open-pull-requests-limit and commit-message prefixes. Validate the file against the Dependabot v2 JSON schema, run ./gradlew clean test on JDK 11 to record a green baseline, run ./gradlew dependencies --configuration runtimeClasspath, and open a pull request that includes both outputs and explains each group. Do not change build.gradle.",
"resources": [
{
"url": "https://github.com/your-org/your-app"
}
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
The pull request adds one file, .github/dependabot.yml, and its description explains each group, names the two ignored major upgrades and why, and pastes the schema validation line, the ./gradlew clean test summary and the runtimeClasspath dependency tree from the sandbox. A reviewer can read which versions are pinned in build.gradle and which come from the Spring Boot BOM without opening Gradle.
GitHub reads the file as soon as it lands on the default branch; the first pull requests from Dependabot then run the existing Java CI workflow, so each one arrives with ./gradlew clean test already green or red. The run's record keeps the Gradle output the agent captured, so a later failure can be compared against the baseline.
Before merging, a reviewer picks the schedule day and timezone, decides whether the open-pull-requests-limit fits how fast they review, and whether to also hold mybatis-spring-boot-starter on its current major. The agent touches no source file and no workflow.
Run it on every Gradle repository without Dependabot
An organisation with many Gradle services starts one run per repository from its own server: one POST /o/{org}/sessions each with the repository in resources and a request_id that is a UUID v5 of the repository's full name, so a retry returns the run already started. Each run reads its own build, so a project on a version catalog gets groups written against libs.versions.toml aliases, a multi-module build gets one gradle entry per module directory, and a repository that already has dependabot.yml gets a report of what it lacks and no pull request.
A team that wants the configuration to stay complete runs this prompt weekly from an automation with a schedule trigger set to Monday morning in its timezone, in the Project that holds the repository. When a new workflow directory, a second Gradle module or a Dockerfile has appeared since the last run, that run opens a pull request adding the missing entry; otherwise it ends with no pull request and says so.
The use case this job follows, with its automation and trigger: Upgrade dependencies weekly.
Why run it on Rush?
A Dependabot file is short, but the mistakes are quiet: a misspelled key is ignored rather than rejected, a missing ignore rule lets a Spring Boot 3 pull request arrive against a Java 11 build and fail for a reason that has nothing to do with the dependency, and without groups a weekly schedule turns into a dozen pull requests. The agent reads the build, validates the file against the schema and runs the suite once so the first Dependabot pull request lands on a known-green baseline.
Every command stays with the run, from the schema check to ./gradlew clean test, and the pull request quotes them. Doing this for twenty repositories at once costs no more attention than one, because each run has its own JDK, its own Gradle cache and its own pull request.
Frequently asked questions
Why ignore major Spring Boot updates?
Because build.gradle sets sourceCompatibility to 11, and Spring Boot 3 requires Java 17 and moves from javax to jakarta packages. A Dependabot pull request for that would fail to compile and teach the team to ignore Dependabot. The ignore rule holds only version-update:semver-major for the two Spring plugins; minor and patch updates still arrive. The pull request describes the rule so it can be removed when the project moves to Java 17.
Does Dependabot understand dependencies managed by the Spring Boot BOM?
It updates versions written in build.gradle; flyway-core, lombok and the Spring starters have no version there and follow the Boot plugin version. The agent's runtimeClasspath output in the pull request shows which is which, so a reviewer is not surprised when Flyway only moves with Boot.
Will the GitHub Actions entry change my workflow?
Not by itself. It only lets Dependabot open pull requests that raise actions/checkout@v2, actions/setup-java@v2 and actions/cache@v2 to their current majors. Each of those arrives as its own reviewable pull request with the Java CI workflow run against it.
Can the agent run Dependabot itself to prove the configuration?
No. Dependabot runs on GitHub after the file is merged. What the agent can prove is that the file is valid against the published schema and that the suite passes on the current versions, which is what the pull request shows. The first Dependabot pull requests are the real test, and the baseline output is there to compare them against.