Self-hosted background agents for your GitHub repos. Connect GitHub, choose a repo and branch, describe the work, and Kill The Backlog runs an agent in a cloud sandbox until it can preview the app, push commits, and open a draft PR.
Kill The Backlog is built for the "ship it from a prompt" loop: every session gets an isolated E2B VM, a cloned working tree, opencode running headless, hosted VS Code access through code-server, realtime session updates in the browser, automatic commits, draft PR creation, and optional live app previews.
- Starts coding sessions from a GitHub repo, base branch, model, and prompt.
- Runs opencode headless inside a per-session E2B sandbox.
- Streams agent messages, reasoning, tool calls, todos, and errors back to the session page in realtime.
- Accepts follow-up prompts in the same session and supports aborting a running turn.
- Commits sandbox changes on idle, pushes a
ktb/<sessionId>branch, and opens a draft PR on the first commit. - Keeps the session available after idle by pausing the E2B sandbox instead of deleting it.
- Exposes a hosted VS Code instance for each bootstrapped session so you can inspect or manually edit the sandbox working tree.
- Optionally starts a target repo preview app from
.kill-the-backlog/preview.sh, shows preview status/logs, and links to the public E2B preview URL.
Run locally with Docker in under 5 minutes. You'll need Docker and Node.js 22+ to build the E2B sandbox template.
git clone https://github.com/Kill-The-Backlog/Kill-The-Backlog.git
cd Kill-The-Backlog
cp .env.example .env- Go to Settings > Developer settings > OAuth Apps > New OAuth App.
- Fill in:
- Application name:
Kill The Backlogor anything you like. - Homepage URL:
http://localhost:3000. - Authorization callback URL:
http://localhost:3000/auth/github/callback.
- Application name:
- Click Register application.
- Copy the Client ID and generate a Client secret.
- Paste both into
.env:
GITHUB_OAUTH_CLIENT_ID=your_client_id
GITHUB_OAUTH_CLIENT_SECRET=your_client_secretEach session boots an E2B sandbox running opencode headless, with Anthropic as the model provider. Add both keys to .env:
ANTHROPIC_API_KEY=your_key
E2B_API_KEY=your_keyBoth services have free tiers that are enough to try things out. E2B_TEMPLATE_NAME is already set to e2b-template-dev in .env.example; you'll publish a template under that name in the next step.
Sessions launch from a custom E2B template with opencode and code-server pre-installed. Publish it once to your E2B account:
corepack enable pnpm
pnpm install
pnpm tools:e2b-template e2b:build:devThis takes a few minutes the first time. It tags the template as e2b-template-dev, matching E2B_TEMPLATE_NAME.
docker compose upThe first run builds the app image and may take a few minutes. Once you see Server is running on http://localhost:3000, open http://localhost:3000 and sign in with GitHub.
Target repositories can opt into live previews by adding this executable script:
.kill-the-backlog/preview.shKill The Backlog runs the script from the cloned repo root after the sandbox finishes bootstrapping. The script should start the app on KTB_PREVIEW_PORT, which is currently 5173.
#!/usr/bin/env bash
set -euo pipefail
corepack enable pnpm
pnpm install
pnpm dev --host 0.0.0.0 --port "$KTB_PREVIEW_PORT"Preview behavior:
- If
.kill-the-backlog/preview.shis missing, the session shows "Preview not configured". - If the script starts and
http://127.0.0.1:5173/responds before the timeout, the session shows "Preview ready" and links tohttps://5173-<sandboxId>.e2b.app. - The session details panel shows preview status, stdout/stderr logs, and a restart action.
- Restart stops the previous preview process when possible, clears the old error, and queues the preview worker again.
- Preview logs are stored on the session and capped to the newest 200 entries.
Each bootstrapped session starts code-server on port 8080 against the cloned repo path. The session details panel shows an "Open VS Code" action that authenticates through Kill The Backlog and opens https://8080-<sandboxId>.e2b.app.
This project uses Devbox for system-level dependencies: Node.js 22, PostgreSQL 18, Valkey, nginx, mkcert, and the local service runner.
devbox shell
./setup-devbox.shCreate a GitHub OAuth App with callback URL https://ktb.localhost/auth/github/callback and add the credentials to .env. A GitHub OAuth App only allows one callback URL, so register a second app if you already created one for the Docker quick start.
Infrastructure variables for the local database, Redis-compatible queue, Zero cache, and origins are set by process-compose.yaml.
If you did not already publish the E2B sandbox template during the quick start, do it now:
devbox run -- 'pnpm tools:e2b-template e2b:build:dev'devbox services upThis starts nginx with HTTPS, PostgreSQL, Valkey, the main app, Zero cache, and the marketing site. Open https://ktb.localhost.
Useful commands:
devbox run -- 'pnpm apps:main typecheck'
devbox run -- 'pnpm apps:main lint'
devbox run -- 'pnpm packages:db build'
devbox run -- 'pnpm prisma migrate dev --name your_migration_name'
devbox run -- 'pnpm tools:e2b-template e2b:build:dev'| Component | Role |
|---|---|
apps/main |
React Router 7 + Express app. Hosts GitHub OAuth, session UI, API routes, Zero endpoints, and BullMQ workers. |
apps/www |
Astro marketing site. |
packages/db |
Prisma migrations, generated Kysely types, generated Zero schema, and shared DB helpers. |
tools/e2b-template |
E2B template that installs opencode and code-server for per-session agents and hosted editing. |
| PostgreSQL | Source of truth for users, GitHub accounts, sessions, messages, previews, and preferences. |
| Valkey | Redis-compatible backing store for BullMQ queues. |
| Zero cache | Realtime sync layer between PostgreSQL and the browser. |
| E2B sandboxes | Per-session VMs that hold the cloned repo, opencode state, hosted editor, git branch, and optional preview. |
See docs/deploying.md for deploying to GKE Autopilot with werf.
