How to add an AI agent to an existing Next.js app—with streaming, auth, and persistent sessions
Embed a file-defined agent in an existing Next.js application while keeping the application's authentication, database, routes, and deployment boundaries.