How alok-yadav25/devpilot works
DevPilot is a web and CLI agent for investigating reproducible Python/pytest bugs. The main user workflow is to submit a public repository and bug report, reproduce the failure, investigate and propose a bounded patch, test it in a selected sandbox, then pause for exact-diff human review; only approval permits target-branch and draft-PR publication. The graph emphasizes the website-to-API workflow and its durable worker, while retaining replay and evaluation capabilities. Several backend routes and runner implementations are represented from the tree and README; their internal calls are not inferred where excerpts do not establish them.
Main entry points: graph.py Repair graph · service.py Run service · main.py FastAPI app · Workspace.tsx Workspace pages
Components 31
Workspace UI
- Workspace pages
frontend/src/pages/Workspace.tsx - New run form
frontend/src/pages/NewRun.tsx - Live run view
frontend/src/pages/LiveRun.tsx - UI primitives
frontend/src/components/ui/button.tsx - Connection dialog
frontend/src/components/ui/dialog.tsx - API client
frontend/src/lib/client.ts - Run API
frontend/src/lib/api.ts - Workspace state
frontend/src/lib/store.ts
API and persistence
- FastAPI app
backend/app/main.py - Run and event routes
backend/app/api/runs.py - Run service
backend/app/service.py - Run records
backend/app/db/models.py - Runtime settings
backend/app/config.py
Repair workflow
- Repair graph
backend/app/agent/graph.py - Graph state
backend/app/agent/state.py - Source retrieval
backend/app/agent/tools/retrieval.py - LLM integration
backend/app/agent/llm.py - Patch validation
backend/app/agent/tools/patches.py
Execution and integrations
- Repository checkout
backend/app/github/clone.py - Repository policy
backend/app/policy.py - Runner selection
backend/app/sandbox/factory.py - Actions sandbox
backend/app/sandbox/github_actions.py - Docker runner
backend/app/sandbox/docker_runner.py
Review and records
- Review gate
backend/app/service.py - Draft PR publication
backend/app/github/pr.py - Recorded replay API
backend/app/api/replays.py - Evaluation API
backend/app/api/eval.py - Walkthrough examples
frontend/src/lib/examples.ts
Other components
- Engineer
- GitHub sandbox
- Target GitHub
Connections 32
- Engineer → Workspace pages: opens
README.md - Workspace pages → New run form: starts runs
frontend/src/main.tsx - New run form → Run API: submits run
frontend/src/pages/NewRun.tsx - Run API → API client: sends requests
frontend/src/lib/api.ts - API client → FastAPI app: calls REST/SSE
README.md - FastAPI app → Run and event routes: mounts routes
backend/app/main.py - Run and event routes → Run service: dispatches runs
backend/app/api/runs.py - Run service → Run records: persists checkpoints
backend/app/service.py - Run service → Repair graph: runs workflow
backend/app/service.py - Repair graph → Graph state: updates state
backend/app/agent/graph.py - Repair graph → LLM integration: requests generation
backend/app/agent/graph.py - Repair graph → Source retrieval: locates source
backend/app/agent/graph.py - Repair graph → Patch validation: validates diff
backend/app/agent/graph.py - Repair graph → Repository checkout: checks out repository
backend/app/agent/graph.py - Repair graph → Repository policy: checks eligibility
backend/app/agent/graph.py - Run service → Runner selection: selects runner
backend/app/service.py - Runner selection → Actions sandbox: creates runner
backend/app/sandbox/factory.py - Runner selection → Docker runner: creates runner
backend/app/sandbox/factory.py - Actions sandbox → GitHub sandbox: dispatches jobs
README.md - Run service → Review gate: awaits approval
README.md - Engineer → Review gate: approves exact diff
README.md - Review gate → Draft PR publication: publishes after approval
README.md - Draft PR publication → Target GitHub: creates draft PR
README.md - Run service → Run records: stores run events
backend/app/service.py - FastAPI app → Runtime settings: configures runtime
backend/app/main.py - FastAPI app → Recorded replay API: mounts routes
backend/app/main.py - FastAPI app → Evaluation API: mounts routes
backend/app/main.py - Live run view → Run API: loads run data
frontend/src/pages/LiveRun.tsx - Live run view → UI primitives: renders controls
frontend/src/pages/LiveRun.tsx - Workspace pages → Workspace state: uses workspace state
- Workspace state → Walkthrough examples: advances walkthrough
frontend/src/lib/store.ts - Workspace pages → Connection dialog: connects worker