An autonomous AI DevOps agent built with Next.js, Gemini 3 Flash, and the Vercel AI SDK. It monitors your Vercel deployments, scans for security issues, manages incidents, raises GitHub PRs for fixes, responds to Slack slash commands, and runs automated checks on a schedule.
- List all Vercel projects and recent deployments in real time
- Trigger new deployments to production or preview
- Cancel in-progress deployments
- Rollback —
/devops rollback <project-name>instantly rolls back to the last successful production deployment - View deployment logs and error summaries
- Scan project configs and
vercel.jsonfor misconfigurations - Detect exposed secrets and insecure headers
- Log security events with severity classification (low / medium / high / critical)
- Env var drift detection — compare environment variable keys between two projects and surface missing or extra vars
- Create, update, and resolve incidents with severity levels
- Correlate incidents across multiple projects
- Link incidents to the PRs that fix them
- View all open incidents on the dashboard
- Create fix branches, commit changes, and open pull requests automatically
- Label agent-raised PRs with
agent-fixandautomated - Search repository code for patterns and vulnerabilities
- Stale PR cleanup — syncs all open PRs against GitHub, marks merged/closed ones in the database
- Use
/devops <request>in any Slack channel to interact with the agent - Receive alerts for critical incidents and deployment failures
- Get notified when the agent raises a PR
- Weekly digest — posts every Saturday at 5pm EST: deployments, incidents resolved, PRs raised, security findings
- Deployment failure detection — finds new failed deployments and creates incidents, deduped so you only get alerted once per failure
- Uptime checks — pings every monitored project URL; creates a critical incident and Slack alert if a project is unreachable
- All monitoring runs automatically every hour via Vercel Cron
- Framework — Next.js 16 (App Router)
- AI — Google Gemini 3 Flash via
@ai-sdk/google - AI SDK — Vercel AI SDK v6 (
streamText,generateText,useChat,stepCountIs) - Database — Supabase (PostgreSQL)
- Deployment — Vercel
- UI — Tailwind CSS + Shadcn UI
git clone https://github.com/RonitGandhi/v0-ai-dev-ops-agent
cd v0-ai-dev-ops-agent
pnpm installCreate a .env.local file in the root:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Google AI (Gemini)
GOOGLE_GENERATIVE_AI_API_KEY=your_google_ai_key
# GitHub
GITHUB_TOKEN=your_github_pat
# Vercel
VERCEL_TOKEN=your_vercel_token
# Slack (ZeroToAgent app)
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...
SLACK_VERIFICATION_TOKEN=your_verification_token
SLACK_BOT_TOKEN=xoxb-...
# Cron security
CRON_SECRET=your_random_secret
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000pnpm devOpen http://localhost:3000.
./deploy.shPrints all env vars, builds the app, and deploys to Vercel production.
- Go to api.slack.com/apps → your app
- Slash Commands →
/devops→ set Request URL to:https://v0-ai-dev-ops-agent.vercel.app/api/slack - Install App → Reinstall to workspace
/devops scan all projects for security issues
/devops show me all open incidents
/devops check deployment failures and raise PRs
/devops rollback financial-planner
/devops sync all open PR statuses
/devops check env var drift between financial-planner and chatbot
/devops list all open pull requests
| Job | Schedule | What it does |
|---|---|---|
| Monitor | Every hour | Deployment failure checks + uptime pings for all projects |
| Weekly Digest | Saturday 5pm EST | Posts a weekly summary to Slack |
app/
├── (dashboard)/ # Main UI pages
│ ├── page.tsx # Overview / command center
│ ├── agent/ # AI chat interface
│ ├── deployments/ # Vercel deployments
│ ├── incidents/ # Incident tracker
│ ├── pull-requests/ # Agent-raised PRs
│ └── security/ # Security scan results
├── api/
│ ├── agent/ # Streaming chat endpoint
│ ├── slack/ # Slack slash command handler
│ ├── monitor/ # Hourly cron — uptime + deployment checks
│ ├── digest/ # Weekly Slack digest
│ └── conversations/ # Chat session persistence (24hr)
lib/
├── agent/tools/
│ ├── deployment-tools.ts # Vercel API — list, deploy, rollback, env drift
│ ├── github-tools.ts # GitHub API — branches, commits, PRs, stale sync
│ ├── security-tools.ts # Incident management, security event logging
│ └── slack-tools.ts # Slack alerts and notifications
└── vercel.ts # Vercel API utilities