Next.js Agent-First Features
Next.js 16.3+ is the first framework designed explicitly for AI-agent-driven development.
Key Features
AGENTS.md (auto-generated docs)
next devauto-writes version-matched docs pointers intoAGENTS.md- Agents read actual docs instead of guessing from training data
- Opt-out via
agentRules: falseinnext.config.ts
First-Party Skills (npx-installable)
Install via npx skills add vercel/next.js:
| Skill | Purpose |
|---|---|
next-dev-loop |
Full dev feedback loop: drive browser, read console, inspect React tree, follow network requests |
next-cache-components-adoption |
Incremental or direct adoption of Cache Components ("use cache") |
next-cache-components-optimizer |
Optimize routes for instant navigation by growing the static shell |
Agent Browser React Introspection
agent-browser v0.27+ can run React DevTools commands from CLI:
# Launch with React DevTools
agent-browser --enable react-devtools
# Inspect component tree
agent-browser react tree
agent-browser react inspect <fiber-id>
agent-browser react renders start
agent-browser react suspense --only-dynamic --json
Actionable Errors (Instant Insights)
Error overlay shows labeled fixes (Stream / Cache / Block) with a "Copy prompt" button that copies a paste-ready agent prompt.
Streamlined MCP Server
Two new tools: get_compilation_issues and compile_route — check compilation without full next build.
Turbopack Improvements (16.3)
- ~90% less memory (21.5GB → 2GB for vercel.com)
- ~2.3x faster cached builds
- Experimental Rust React Compiler (20-50% faster)
import.meta.globAPI support- ~15% faster dev cold start
Usage
When building or debugging Next.js projects with an AI agent:
- Enable AGENTS.md: Ensure
next devruns in the project so docs are auto-generated - Use next-dev-loop skill: Load it when you need browser-based verification
- Run agent-browser with React:
agent-browser --enable react-devtoolsfor component inspection - Copy actionable error prompts: Use the error overlay's "Copy prompt" button for instant fixes
- Cache Components optimizer: Run after building to optimize routes for instant nav
Pitfalls
- 16.3 is on
@previewnpm tag — stable expected in weeks - AGENTS.md is auto-overwritten each
next devrun — don't manually edit it - agent-browser React DevTools requires
--enable react-devtoolsflag