# Add Dependabot to a Reflex App

Yes. An agent writes a Dependabot config for a Reflex app's pip requirements and SHA-pinned GitHub Actions, checks the first bumps pass its CI, and opens a PR.

[Run this on Rush](https://cloud.getrush.ai/run/add-dependabot/reflex/). Opens the console with this prompt ready to send, in a Project that has your repository.

## What the agent does

The agent reads what there is to update before it writes the config, because in a small Reflex app that is the whole decision. In an app like reflex-dev/reflex-chat, `requirements.txt` has two lines, `reflex>=0.7.11` and `openai>=1.78.1`, and nothing pins them: there is no lockfile, `.gitignore` ignores `poetry.lock` and `package-lock.json`, and `rxconfig.py` only names the app and the sitemap plugin. `.github/workflows/ci.yml` runs three jobs on every push and pull request to `main`, each installing the requirements with `astral-sh/setup-uv` on Python 3.10: `check-pyright` runs `pyright .`, `check-ruff` runs `astral-sh/ruff-action`, and `check-export` runs `reflex init` and `reflex export`. Every action is pinned to a commit SHA with its version in a comment (`actions/checkout` at v6.0.2, `setup-uv` at v8.1.0, `ruff-action` at v4.0.0), and the workflow sets `OPENAI_API_KEY` to `dummy` because `chat/state.py` raises at import when the variable is unset.

Those `>=` floors change what Dependabot can do. With no lockfile, every CI run already installs the newest `reflex` and `openai` that satisfy the floor, so a bump only raises the floor and nothing about what runs changes. The agent writes `.github/dependabot.yml` with a `pip` entry at the root on a weekly schedule and `versioning-strategy: increase`, so each new release of either package still opens a pull request that raises the floor and runs the three checks against it, which is the only moment a breaking release is noticed before it reaches a developer's machine. It puts the two packages in one `python` group so a Reflex release and the OpenAI client release it needs land together, and sets `open-pull-requests-limit` so a busy week does not open several.

The second entry is where the real drift is. The `github-actions` ecosystem updates SHA-pinned actions and rewrites the version comment beside the pin, so `checkout`, `setup-uv` and `ruff-action` get a pull request on each new release instead of ageing silently. The agent groups them as `actions` and labels every bot pull request `dependencies`. It then states the choice it did not make: pinning `reflex==` and `openai==` would make CI reproducible and give the pip entry real work, and the pull request offers that as a one-line change for the reviewer to accept or decline.

Then it checks what the first bumps would do. It installs the requirements with `uv pip install -r requirements.txt pyright` as the workflow does, with the two floors raised to the current releases, and runs `pyright .`, `ruff check` and, with `OPENAI_API_KEY` set to a dummy value, `reflex init` and `reflex export`, the frontend build that `check-export` runs. A failure there, such as a type Reflex renamed, goes into the pull request as the first thing the first Dependabot pull request will show.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Add Dependabot to this Reflex app. Read requirements.txt, rxconfig.py, .gitignore, chat/state.py and .github/workflows/ci.yml first, and note that the requirements are floors with no lockfile and that every action is pinned by commit SHA. Write .github/dependabot.yml with a pip entry at the root on a weekly schedule using versioning-strategy increase, the two packages in one group, a pull request limit and a dependencies label, and a github-actions entry grouping the workflow's actions. Install the requirements with uv the way the workflow does, raise the two floors to the current releases, and run pyright, ruff check, reflex init and reflex export with a dummy OPENAI_API_KEY; report anything that fails. Open a pull request with the config, what each check returned, and the option of pinning the two packages exactly as a separate choice for the reviewer.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
```

1. **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.
2. **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.
3. **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

A pull request that adds one file, `.github/dependabot.yml`, and a description that explains each choice against the app's own files: why `increase` on floors, which actions form the `actions` group, and what `pyright`, `ruff check` and `reflex export` returned with the floors raised. The pin-exactly option is set out as a diff the reviewer can apply or ignore.

A reviewer checks the weekly day, the limit and the two groups, decides on the pins, and merges. On the next scheduled day Dependabot opens its first pull requests, each run through the same three jobs, and a release of Reflex that breaks the export shows up there rather than on a laptop.

## Run it on every Monday morning

Once the config is merged, Dependabot opens the pull requests, but someone still has to read a failing `check-export` and decide. Make that an automation in the Project with a `schedule` trigger, `cron` `0 9 * * 1` in your `timezone`, and a prompt that lists the open Dependabot pull requests, runs the three checks on each in a sandbox, and answers with which are safe to merge and what the failing ones need; a week with none open answers briefly. An automation has its own `max_runs_per_hour` cap, separate from any API key.

From your own tooling, the same work is one `POST /o/{org}/sessions` with this body and the repository in `resources`; the key's `webhook_url` posts `run.completed` with the `session_url` when the turn ends.

## Why run it on Rush?

The config is short; the judgement is whether floors with no lockfile make the pip entry worth anything, and the only way to answer is to raise them and run the project's own checks, including a Reflex frontend export that installs its own toolchain. The agent does that in its own sandbox and keeps every command and its output in the run's record, so the pull request says what the first bot pull request will show instead of guessing.

The same run fits any Reflex project: an app with a `pyproject.toml` and `uv.lock` where the `uv` ecosystem and `lockfile-only` are the right entry, one with a `Dockerfile` that pins a base image the `docker` ecosystem should track, or a monorepo where each app gets its own directory entry. Each gets a config derived from its own files and a check against its own CI.

## Frequently asked questions

### Why increase rather than lockfile-only?

There is no lockfile, so `lockfile-only` would have nothing to move and Dependabot would open no pip pull requests at all. `increase` raises `>=0.7.11` to the new release each time one ships, which is the only change that makes a release visible in CI before it reaches a developer's environment.

### Will Dependabot keep the version comments beside the SHA pins?

Yes. The `github-actions` ecosystem recognises a pin like `actions/checkout@de0fac2e... # v6.0.2` and updates both the commit and the comment, so the workflow stays readable and still pinned to a commit rather than a movable tag.

### Does reflex export need an OpenAI key?

The export only builds the frontend, but `chat/state.py` raises at import if `OPENAI_API_KEY` is unset, and the export imports the app. The workflow sets the variable to `dummy` for that reason, and the run does the same, so no real key is used anywhere.

### Should I pin the packages exactly?

Pinning makes every CI run install the same versions and gives Dependabot a real version to bump, at the cost of one pull request per release. The run leaves the floors as they are and shows the pin as a separate diff, because that is a policy the team decides, not the agent.

## More Reflex jobs

- [Write a Dockerfile for a Reflex App](https://getrush.ai/run/add-dockerfile/reflex/)
- [Add File Uploads to a Reflex Chat App](https://getrush.ai/run/add-file-uploads/reflex/)
- [Add Pre-commit Hooks to a Reflex App](https://getrush.ai/run/add-pre-commit-hooks/reflex/)

## The same job on other stacks

- [Add Dependabot to a Rust CLI](https://getrush.ai/run/add-dependabot/rust-cli/)
- [Add Dependabot to a Sequelize App](https://getrush.ai/run/add-dependabot/sequelize/)
- [Add Dependabot to a Socket.IO App](https://getrush.ai/run/add-dependabot/socket-io/)

## Keep reading

- [How a Rush run works on your repository, from request to pull request](https://getrush.ai/cloud/)
- [Compare cloud agents, agent sandboxes and AI code review](https://getrush.ai/compare/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
