5,877
stars
+0+2+34
748
forks
13
watchers
–
prs
–
issues
0
releases
–
discussions
README
Open Agents Open Agents is an open-source reference app for building and running background coding agents on Vercel. It includes the web UI, the agent runtime, sandbox orchestration, and the GitHub integration needed to go from prompt to code changes without keeping your laptop involved. The repo is meant to be forked and adapted, not treated as a black box. What it is Open Agents is a three-layer system: text Web - Agent workflow - Sandbox VM - The web app handles auth, sessions, chat, and streaming UI. - The agent runs as a durable workflow on Vercel. - The sandbox is the execution environment: filesystem, shell, git, dev servers, and preview ports. The key architectural decision: the agent is not the sandbox The agent does not run inside the VM. It runs outside the sandbox and interacts with it through tools like file reads, edits, search, and shell commands. That separation is the main point of the project: - agent execution is not tied to a single request lifecycle - sandbox lifecycle can hibernate and resume independently - model/provider choices and sandbox implementation can evolve separately - the VM stays a plain execution environment instead of becoming the control plane Current capabilities - chat-driven coding agent with file, search, shell, task, skill, and web tools - durable multi-step execution with Workflow SDK-backed runs, streaming, and cancellation - isolated Vercel sandboxes with snapshot-based resume - repo cloning and branch work inside the sandbox - optional auto-commit, push, and PR creation after a successful run - session sharing via read-only links - optional voice input via ElevenLabs transcription Runtime notes A few details that matter for understanding the current implementation: - Chat requests start a workflow run instead of executing the agent inline. - Each agent turn can continue across many persisted workflow steps. - Active runs can be resumed by reconnecting to the stream for the existing workflow. - Sandboxes expose ports 3000, 5173, 4321, and 8000, can optionally use a configured base snapshot, and hibernate after inactivity. - Auto-commit and auto-PR are supported, but they are preference-driven features, not always-on behavior. Environment variables See apps/web/.env.example for the full list. Summary: Minimum runtime env POSTGRES_URL= BETTER_AUTH_SECRET= Required for sign-in (Vercel OAuth) env NEXT_PUBLIC_VERCEL_APP_CLIENT_ID= VERCEL_APP_CLIENT_SECRET= Required for GitHub repo access, pushes, and PRs env NEXT_PUBLIC_GITHUB_CLIENT_ID= GITHUB_CLIENT_SECRET= GITHUB_APP_ID= GITHUB_APP_PRIVATE_KEY= NEXT_PUBLIC_GITHUB_APP_SLUG= GITHUB_WEBHOOK_SECRET= Optional env REDIS_URL= KV_URL= OPEN_AGENTS_RESOURCE_PROFILE= VERCEL_PROJECT_PRODUCTION_URL= NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL= VERCEL_SANDBOX_BASE_SNAPSHOT_ID= ELEVENLABS_API_KEY= - REDIS_URL / KV_URL: optional skills metadata cache (falls back to in-memory when not configured). - OPEN_AGENTS_RESOURCE_PROFILE: