A template for building AI-powered coding agents that supports Claude Code, OpenAI's Codex CLI, Cursor CLI, and opencode with Vercel Sandbox to automatically execute coding tasks on your repositories.
Deploy Your Own
You can deploy your own version of the coding agent template to Vercel with one click:
Features
Multi-Agent Support: Choose from Claude Code, OpenAI Codex CLI, Cursor CLI, or opencode to execute coding tasks
Vercel Sandbox: Runs code in isolated, secure sandboxes (docs)
AI Gateway Integration: Built for seamless integration with Vercel AI Gateway for model routing and observability
AI-Generated Branch Names: Automatically generates descriptive Git branch names using AI SDK 5 + AI Gateway
Task Management: Track task progress with real-time updates
Persistent Storage: Tasks stored in Neon Postgres database
Git Integration: Automatically creates branches and commits changes
Modern UI: Clean, responsive interface built with Next.js and Tailwind CSS
Create a Task: Enter a repository URL and describe what you want the AI to do
Monitor Progress: Watch real-time logs as the agent works
Review Results: See the changes made and the branch created
Manage Tasks: View all your tasks in the sidebar with status updates
How It Works
Task Creation: When you submit a task, it's stored in the database
AI Branch Name Generation: AI SDK 5 + AI Gateway automatically generates a descriptive branch name based on your task (non-blocking using Next.js 15's after())
Sandbox Setup: A Vercel sandbox is created with your repository
Agent Execution: Your chosen coding agent (Claude Code, Codex CLI, Cursor CLI, or opencode) analyzes your prompt and makes changes
Git Operations: Changes are committed and pushed to the AI-generated branch
Cleanup: The sandbox is shut down to free resources
Environment Variables
Required
POSTGRES_URL: PostgreSQL connection string
ANTHROPIC_API_KEY: Claude API key
GITHUB_TOKEN: GitHub token for repository access
VERCEL_TEAM_ID: Vercel team ID for sandbox creation
VERCEL_PROJECT_ID: Vercel project ID for sandbox creation
VERCEL_TOKEN: Vercel API token for sandbox creation
AI_GATEWAY_API_KEY: AI Gateway API key for branch name generation and Codex agent support
Optional
CURSOR_API_KEY: Cursor agent API key
NPM_TOKEN: NPM token for private packages
AI Branch Name Generation
The system automatically generates descriptive Git branch names using AI SDK 5 and Vercel AI Gateway. This feature:
Non-blocking: Uses Next.js 15's after() function to generate names without delaying task creation
Descriptive: Creates meaningful branch names like feature/user-authentication-A1b2C3 or fix/memory-leak-parser-X9y8Z7
Conflict-free: Adds a 6-character alphanumeric hash to prevent naming conflicts
Fallback: Gracefully falls back to timestamp-based names if AI generation fails
Context-aware: Uses task description, repository name, and agent context for better names
Branch Name Examples
feature/add-user-auth-K3mP9n (for "Add user authentication with JWT")
fix/resolve-memory-leak-B7xQ2w (for "Fix memory leak in image processing")
chore/update-deps-M4nR8s (for "Update all project dependencies")
docs/api-endpoints-F9tL5v (for "Document REST API endpoints")
Tech Stack
Frontend: Next.js 15, React 19, Tailwind CSS
UI Components: shadcn/ui
Database: PostgreSQL with Drizzle ORM
AI SDK: AI SDK 5 with Vercel AI Gateway integration
AI Agents: Claude Code, OpenAI Codex CLI, Cursor CLI, opencode