All jobs

Set Up Dependabot for a Streamlit App

Yes. An agent reads your Streamlit app's pins, workflows and devcontainer, writes a dependabot.yml with grouped weekly updates for each, and opens a PR.

Run this on RushOpens the console with this prompt ready to send, in a Project that has your repository.

What the agent does

The agent starts by listing what Dependabot would have to watch. In an app like streamlit/llm-examples, requirements.txt holds eight packages with three kinds of pin: exact pins on langchain==0.0.350 and langchain-community==0.0.3, floors on streamlit>=1.28, openai>=1.2, anthropic>=0.3.0 and trubrics>=1.4.3, and no version at all on duckduckgo-search and streamlit-feedback. requirements-dev.txt pins black==23.3.0, mypy==1.4.1 and pre-commit==3.3.3 and leaves watchdog and pytest open, although .pre-commit-config.yaml formats with ruff-format and never calls black. There is one workflow, .github/workflows/app-testing.yml, which uses actions/checkout@v4, actions/setup-python@v5 on Python 3.11, streamlit/streamlit-app-action@v0.0.3 with ruff: true and pytest, and pmeier/pytest-results-action@v0.6.0. .devcontainer/devcontainer.json is built on mcr.microsoft.com/devcontainers/python:3.11-bullseye. There is no .github/dependabot.yml.

It then reads how a bad update would show. app_test.py drives the app with Streamlit's AppTest: test_Chatbot patches openai.resources.chat.Completions.create and checks the chat flow in Chatbot.py, and test_Langchain_Quickstart patches langchain.llms.OpenAI.__call__ and runs pages/3_Langchain_Quickstart.py. The pages import langchain.llms, langchain.agents, langchain.chat_models, langchain.tools, langchain.callbacks and langchain.prompts, module paths that later LangChain releases moved out of the core package, and pages/4_Langchain_PromptTemplate.py names the retired text-davinci-003 model. So a LangChain bump will break imports and fail the AppTest in the existing workflow, which is exactly the signal a Dependabot pull request should carry; the OpenAI and Anthropic floors, by contrast, already let new releases in on every fresh install, so the app is tested against them today without anyone choosing to.

The agent writes .github/dependabot.yml with three ecosystems. pip on / weekly, with versioning-strategy: increase so the >= floors move up instead of being left as they are, a langchain group that holds langchain* together because the two pins have to move in step, a dev group for the development file, and an open-pull-requests-limit so a first sweep does not open a pull request per package. github-actions on / weekly, grouped so the four actions arrive as one pull request. devcontainers monthly for the base image. Each has a commit-message prefix and a label the team can filter on. It does not add an ignore for LangChain: the config lets the pull request come and the AppTest decide, and the description says that the first LangChain update will fail until the imports are migrated.

Two things are checked in the sandbox before the pull request. The agent installs both requirements files on Python 3.11 and runs pytest app_test.py to establish that the suite passes at today's pins, so a later Dependabot failure can be read as the update's doing. And it validates the new YAML against Dependabot's schema with a config check, since a typo in package-ecosystem is only reported in the repository's Dependabot tab after merge. The pull request also removes nothing: black in requirements-dev.txt is unused by the hooks, and the agent notes it rather than deleting it.

Start it with one API call

POST https://api.phoenix.so/o/{org}/sessions with this body:

{
  "agent": "claude",
  "input": "Set up Dependabot for this Streamlit app. Read requirements.txt, requirements-dev.txt, .pre-commit-config.yaml, app_test.py, every file under pages/, the workflow under .github/workflows and .devcontainer/devcontainer.json first, and note which packages are pinned exactly, which have only a floor and which have no version. Write .github/dependabot.yml with a weekly pip update on the root directory using the increase versioning strategy, a group that keeps the langchain packages together, a group for the development requirements and an open pull request limit; a weekly grouped github-actions update; and a monthly devcontainers update; with commit message prefixes and labels. Do not add ignore rules for packages whose update would break the imports; instead explain in the pull request which pages and which test will fail on the first such update and why that is the intended signal. In the sandbox install both requirements files on Python 3.11, run pytest app_test.py to record the passing baseline, and validate the Dependabot configuration file. Open a pull request with the pin inventory, the baseline test output and what each update group will touch.",
  "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

The pull request adds one file, .github/dependabot.yml. No requirement is bumped, no workflow is edited and no code changes; the first version updates arrive as Dependabot's own pull requests after merge, each one running the existing AppTest workflow.

Its description is an inventory: each package with its current pin style and which update group will carry it, the four actions and the devcontainer image, the baseline pytest app_test.py result from the sandbox, and a plain paragraph on the LangChain pins, naming the six import paths in pages/ and the test that patches one of them. The install and test output are in the session transcript at GET /o/{org}/sessions/{id}/messages.

Before merging, a reviewer checks the schedule day and the pull request limit against how much review the team wants per week, decides whether the langchain group should also hold openai, and confirms the labels exist in the repository. After merge, the first Dependabot pull requests show whether the grouping reads well; a follow-up message to the same session can migrate the LangChain imports once the first grouped update fails on them.

Run it on every terminal hand-off

A developer who notices the app is two years behind on one package and silently current on another starts this from the terminal with this body and goes back to the feature they were building. The run reads the real pins and the real workflow, so the groups and strategy in the configuration match this app rather than a generic Python template.

Send a request_id, a UUID, with the body so a retried start returns the run it already began. When the run is done, its GET /o/{org}/sessions/{id} answer names the pull request.

The use case this job follows, with its automation and trigger: Hand off a long task.

Why run it on Rush?

A Dependabot file written from memory tends to miss the thing that matters in a given repository: here, that two packages must move together, that floors need the increase strategy to move at all, and that an unused formatter pin will generate noise. The agent reads the requirements, the pages and the test in one sandbox, installs and runs the suite to know the baseline, and writes the configuration from that evidence.

The session keeps the install, the test run and the config check with their output, so the pull request's claim that the suite passes today is on record for the day an update fails it. A team with many small Python apps can send the same request for each at once and get one configuration per repository, each shaped by that repository's own pins.

Frequently asked questions

Why not pin LangChain to the current version and ignore updates?

Because the pins are already exact, so nothing moves today, and an ignore rule would keep it that way without anyone noticing. Letting Dependabot open the grouped update makes the broken imports visible in a failing AppTest on a pull request the team can see, which is a better place to decide on the migration than a config file.

Does Dependabot update the pre-commit hook versions?

No. .pre-commit-config.yaml is not an ecosystem Dependabot supports, so the ruff-pre-commit and pre-commit-hooks revisions stay where they are. The pull request notes pre-commit autoupdate as the command that moves them, and a later run can add a scheduled job for it.

What does versioning-strategy increase change?

For streamlit>=1.28 and the other floors, the default strategy leaves the requirement alone because any newer release already satisfies it. increase raises the floor to the new version, so the file records what the app was last tested with instead of a minimum from two years ago.

Will the first week open a dozen pull requests?

The groups keep it to a handful: one for the LangChain pair, one for the other application packages, one for the development file, one for the four actions, and one for the devcontainer image when it has a newer tag. The open-pull-requests-limit caps the pip ecosystem on top of that.

More Streamlit jobs

The same job on other stacks

Keep reading