The Coding Agent Template is a deployable Next.js 15 app from Vercel Labs that builds AI-powered coding agents, letting users run Claude Code, OpenAI Codex CLI, GitHub Copilot CLI, Cursor CLI, Google Gemini CLI, or opencode inside Vercel Sandboxes to automatically complete coding tasks on GitHub repositories.
What is the Coding Agent Template?
The Coding Agent Template is a publicly available web application that pairs a Next.js frontend with Vercel Sandbox execution. Users sign in with GitHub or Vercel OAuth, enter a repository URL and a natural-language task, and the template spins up an isolated sandbox where the selected CLI coding agent edits the code, commits the changes, and pushes them to a new branch. The project is maintained in the Vercel Labs GitHub organization and uses Neon Postgres with Drizzle ORM for storage, Vercel AI Gateway for model routing, and AI SDK 5 for branch-name generation and agent integration.
Key Features
- Multi-agent execution — trigger tasks with Claude Code, OpenAI Codex CLI, GitHub Copilot CLI, Cursor CLI, Google Gemini CLI, or opencode directly from the UI.
- Vercel Sandbox isolation — each task runs in its own sandbox with a configurable lifetime from 5 minutes up to 5 hours; the Keep Alive toggle decides whether the sandbox shuts down on completion or stays up for follow-ups.
- User authentication and multi-tenancy — sign in with GitHub or Vercel OAuth; every user has isolated tasks, connectors, and per-user API keys, and GitHub users get repository access through their own OAuth token.
- AI-generated Git branches — branch names like
feature/add-user-auth-K3mP9nare produced by AI SDK 5 + AI Gateway using Next.js 15's non-blockingafter()hook, with a timestamp fallback if generation fails. - Task dashboard — track progress with real-time logs, manage tasks from a sidebar, and rely on soft deletes (a
deletedAtcolumn) instead of permanent removal. - MCP server connectors — attach MCP servers to Claude Code through a Connectors tab; OAuth-protected servers require an
ENCRYPTION_KEY. - Full stack included — Next.js 15, React 19, Tailwind CSS, shadcn/ui, Drizzle ORM, PostgreSQL via Neon, Next Auth, and Vercel AI Gateway are all wired together.
Who is it for?
The template suits developers who want a self-hosted AI coding agent UI without building the plumbing themselves. Platform engineers can deploy it as an internal tool where team members authenticate with GitHub and run sandboxed code changes. SaaS founders can fork it to resell AI coding as a product. Maintainers of open-source projects can use it to automate branch creation for dependency bumps, documentation, and bug fixes.
What can you do with the Coding Agent Template?
- Automate repository chores — point the agent at a repo and ask for "Update all project dependencies" or "Document REST API endpoints"; the template creates a descriptive branch and pushes the commit.
- Iterate on code — enable Keep Alive after a task finishes, then send follow-up messages to refine the work while the sandbox remains active until the timeout expires.
- Test web apps after edits — with Keep Alive on, a dev server (for example
npm run dev) starts automatically in the background so you can inspect the running app before the sandbox expires. - Offer coding agents to end users — let each user sign in with their own GitHub account, store their own API keys, and run tasks without sharing a global token.
How does the Coding Agent Template work?
A task flows through six stages: the user creates a task with a repository URL and prompt; the template stores it in Postgres; AI Gateway generates a branch name via a non-blocking after() call; Vercel Sandbox provisions an isolated environment with the repo; the chosen agent analyzes the prompt and makes edits; and finally Git operations commit and push to the generated branch. After that the sandbox either shuts down immediately (Keep Alive off) or stays alive for follow-up messages (Keep Alive on).
FAQ
Is the Coding Agent Template free?
The template is available on GitHub and can be cloned at no cost, but running it requires your own Vercel account, a Neon Postgres database, and API keys for the agents you use (Anthropic, OpenAI, Cursor, Gemini, or AI Gateway), which generate usage-based charges.
Which coding agents are supported?
The template supports Claude Code, OpenAI's Codex CLI, GitHub Copilot CLI, Cursor CLI, Google Gemini CLI, and opencode. You can select the agent per task, and users can override global API keys with their own in their profile settings.
What environment variables are required?
Deployment needs POSTGRES_URL, Vercel sandbox credentials (SANDBOX_VERCEL_TOKEN, SANDBOX_VERCEL_TEAM_ID, SANDBOX_VERCEL_PROJECT_ID), JWE_SECRET for session encryption, and ENCRYPTION_KEY for encrypting user tokens. At least one OAuth provider (GitHub or Vercel) must also be configured.
Can the sandbox keep running after a task completes?
Yes, if the Keep Alive setting is on. The sandbox stays alive until the maximum duration timeout (default 5 hours, configurable per deployment) so you can send follow-up messages or interact with a running dev server. With Keep Alive off, the sandbox shuts down immediately after changes are pushed.
Does MCP server support work with all agents?
No, MCP server connectors currently work only with the Claude Code agent. You add servers through the Connectors tab by providing a name, base URL, and optional OAuth credentials; using OAuth requires ENCRYPTION_KEY to be set.








