A small TUI that babysits BerriAI/litellm (and litellm-docs) PRs until they're green. It watches CI/CD, BugBot, Greptile, and Veria; @-mentions Greptile when needed; and spawns Claude Managed Agents sessions to resolve real concerns.
pip install -e .pr-babysitterFirst launch prompts you for:
- GitHub PAT —
repo+pull-requestsscopes. Used by the local TUI to read PRs and post the@greptileaimention, and passed through to each Managed-Agents session as theauthorization_tokenfor the mounted GitHub repository. - Anthropic API key — used by
pr-babysitterto drive the Managed Agents API. Find or create one in the Anthropic Console. - CircleCI PAT (optional) — passed into each Managed-Agents session so the cicd subsystem can re-run flaky jobs and read CircleCI job logs. Create one in CircleCI personal tokens.
Config is saved at ~/.pr-babysitter/config.json. The babysit list is
persisted at ~/.pr-babysitter/state.json so PRs you were watching survive
restarts. A PR is dropped from the list automatically once GitHub reports it
merged (you can also remove one by hand with d).
| Mode | Key | Action |
|---|---|---|
| input | type + ⏎ | start babysitting that PR URL |
| input | esc | switch to edit mode |
| edit | ↑/↓ | navigate the PR list |
| edit | ⏎ | open details (status per subsystem) |
| edit | d | stop babysitting (no confirm) |
| edit | esc | back to input mode |
| any | ctrl-q | quit |
pr-babysitter is a thin client over the Anthropic Managed
Agents API:
- On first spawn, it creates one shared agent (
POST /v1/agents) declaring the model (claude-opus-4-8), a short system prompt, the full pre-builtagent_toolset_20260401, and the GitHub MCP server. It also creates one shared environment (POST /v1/environments) with unrestricted networking. The two IDs are cached inconfig.jsonso we reuse them across runs. - For each subsystem that needs Claude (bugbot / greptile / veria / cicd),
it creates a fresh session (
POST /v1/sessions) mounting the PR's repository as agithub_repositoryresource at/workspace/repowith the GitHub PAT asauthorization_token, then sends the subsystem's prompt as auser.messageevent. - The babysitter polls
GET /v1/sessions/{id}and reads backagent.messageevents viaGET /v1/sessions/{id}/events?types[]=agent.messagewhen the session goesidle. The agent's response carries a{"error": ..., "ignore": ...}envelope the babysitter parses to decide what to do next.
The full integration lives in src/pr_babysitter/claude_cloud.py — only
spawn() and get() are called from the rest of the codebase.
By design only BerriAI/litellm and BerriAI/litellm-docs PR URLs are
accepted; everything else is rejected at the input prompt.