prisma ยท Prisma Docs
Prisma AI SDK (with Next.js) (/docs/guides/integrations/ai-sdk)
The page provides guidance on integrating the Vercel AI SDK with Prisma ORM within a Next.js environment to facilitate AI-driven application development.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Prisma AI SDK (with Next.js) (/docs/guides/integrations/ai-sdk)
The page provides guidance on integrating the Vercel AI SDK with Prisma ORM within a Next.js environment to facilitate AI-driven application development.
When To Use
Use when you need to implement a workflow that combines Vercel AI SDK capabilities with Prisma ORM for data persistence in a Next.js application.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/prisma-ai-sdk-with-next-js-docs-guides-integrations-workflow-guide.md | A guide explaining how to integrate the Prisma AI SDK within a Next.js application. | Questions about a guide explaining how to integrate the Prisma AI SDK within a Next.js application. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs.bash | The bash command to initialize a new Next.js application for the Prisma AI SDK integration. | Exact payloads, commands, or snippets shown in The bash command to initialize a new Next.js application for the Prisma AI SDK integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-2.bash | A bash command to initialize a new Next.js application named ai-sdk-prisma using pnpm. | Exact payloads, commands, or snippets shown in A bash command to initialize a new Next.js application named ai-sdk-prisma using pnpm. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-3.bash | A bash command to initialize a new Next.js application named ai-sdk-prisma using yarn dlx. | Exact payloads, commands, or snippets shown in A bash command to initialize a new Next.js application named ai-sdk-prisma using yarn dlx. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-4.bash | A bash command to initialize a new Next.js application using bunx for the Prisma AI SDK integration. | Exact payloads, commands, or snippets shown in A bash command to initialize a new Next.js application using bunx for the Prisma AI SDK integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-5.bash | Bash commands to navigate to the ai-sdk-prisma directory for the Prisma AI SDK and Next.js integration guide. | Exact payloads, commands, or snippets shown in Bash commands to navigate to the ai-sdk-prisma directory for the Prisma AI SDK and Next.js integration guide. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-6.bash | Bash command to install prisma, tsx, and postgres type definitions for the Prisma AI SDK integration. | Exact payloads, commands, or snippets shown in Bash command to install prisma, tsx, and postgres type definitions for the Prisma AI SDK integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-7.bash | Bash command to install prisma, tsx, and postgres types as development dependencies for the Prisma AI SDK with Next.js integration. | Exact payloads, commands, or snippets shown in Bash command to install prisma, tsx, and postgres types as development dependencies for the Prisma AI SDK with Next.j... |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-8.bash | Bash commands to install prisma, tsx, and postgres types as development dependencies for the Prisma AI SDK with Next.js. | Exact payloads, commands, or snippets shown in Bash commands to install prisma, tsx, and postgres types as development dependencies for the Prisma AI SDK with Next.js. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-9.bash | Bash commands to install prisma, tsx, and postgres types using bun for the Prisma AI SDK integration. | Exact payloads, commands, or snippets shown in Bash commands to install prisma, tsx, and postgres types using bun for the Prisma AI SDK integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-10.bash | Bash command to install the Prisma client, PostgreSQL adapter, and dotenv dependencies for the Prisma AI SDK with Next.js. | Exact payloads, commands, or snippets shown in Bash command to install the Prisma client, PostgreSQL adapter, and dotenv dependencies for the Prisma AI SDK with Nex... |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-11.bash | A bash command to install the Prisma client, PostgreSQL adapter, dotenv, and pg packages required for the Prisma AI SDK with Next.js integration. | Exact payloads, commands, or snippets shown in A bash command to install the Prisma client, PostgreSQL adapter, dotenv, and pg packages required for the Prisma AI S... |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-12.bash | Bash commands to install the Prisma client, PostgreSQL adapter, and required dependencies for the AI SDK integration. | Exact payloads, commands, or snippets shown in Bash commands to install the Prisma client, PostgreSQL adapter, and required dependencies for the AI SDK integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-13.bash | A bash command to install the Prisma client, PostgreSQL adapter, dotenv, and pg using the bun package manager for a Next.js AI SDK integration. | Exact payloads, commands, or snippets shown in A bash command to install the Prisma client, PostgreSQL adapter, dotenv, and pg using the bun package manager for a N... |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-14.bash | The bash command to initialize Prisma with a custom output directory for use in a Next.js application. | Exact payloads, commands, or snippets shown in The bash command to initialize Prisma with a custom output directory for use in a Next.js application. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-15.bash | A bash command to initialize Prisma with a specific output directory for use with the AI SDK and Next.js. | Exact payloads, commands, or snippets shown in A bash command to initialize Prisma with a specific output directory for use with the AI SDK and Next.js. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-16.bash | A bash command to initialize Prisma with a specific output directory for use with the AI SDK and Next.js. | Exact payloads, commands, or snippets shown in A bash command to initialize Prisma with a specific output directory for use with the AI SDK and Next.js. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-17.bash | A bash command to initialize Prisma with a specific output directory using bunx. | Exact payloads, commands, or snippets shown in A bash command to initialize Prisma with a specific output directory using bunx. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-18.bash | A bash command to initialize a database using the npx create-db utility within a Prisma AI SDK and Next.js integration setup. | Exact payloads, commands, or snippets shown in A bash command to initialize a database using the npx create-db utility within a Prisma AI SDK and Next.js integratio... |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-19.bash | A bash command to initialize a database using the pnpm dlx create-db utility for the Prisma AI SDK integration. | Exact payloads, commands, or snippets shown in A bash command to initialize a database using the pnpm dlx create-db utility for the Prisma AI SDK integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-20.bash | A bash command to initialize the database using yarn dlx create-db for the Prisma AI SDK integration. | Exact payloads, commands, or snippets shown in A bash command to initialize the database using yarn dlx create-db for the Prisma AI SDK integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-21.bash | A bash command using bunx to execute the create-db utility for a Prisma AI SDK and Next.js integration. | Exact payloads, commands, or snippets shown in A bash command using bunx to execute the create-db utility for a Prisma AI SDK and Next.js integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs.prisma | A Prisma schema definition including Session and Message models for integrating the AI SDK with Next.js. | Exact payloads, commands, or snippets shown in A Prisma schema definition including Session and Message models for integrating the AI SDK with Next.js. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs.ts | A TypeScript configuration file using defineConfig to set up the Prisma schema and migration paths for a Next.js AI SDK integration. | Exact payloads, commands, or snippets shown in A TypeScript configuration file using defineConfig to set up the Prisma schema and migration paths for a Next.js AI S... |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-22.bash | A bash command to initialize the database schema using Prisma Migrate. | Exact payloads, commands, or snippets shown in A bash command to initialize the database schema using Prisma Migrate. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-23.bash | A bash command to initialize the database schema using pnpm dlx prisma migrate dev. | Exact payloads, commands, or snippets shown in A bash command to initialize the database schema using pnpm dlx prisma migrate dev. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-24.bash | A bash command to initialize the database schema using Prisma Migrate within a Next.js project. | Exact payloads, commands, or snippets shown in A bash command to initialize the database schema using Prisma Migrate within a Next.js project. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-25.bash | A bash command to initialize the database schema using bunx and prisma migrate dev. | Exact payloads, commands, or snippets shown in A bash command to initialize the database schema using bunx and prisma migrate dev. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-26.bash | The bash command used to generate the Prisma client for the AI SDK integration. | Exact payloads, commands, or snippets shown in The bash command used to generate the Prisma client for the AI SDK integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-27.bash | A bash command to generate the Prisma client using pnpm dlx. | Exact payloads, commands, or snippets shown in A bash command to generate the Prisma client using pnpm dlx. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-28.bash | A bash command to generate the Prisma client using yarn dlx. | Exact payloads, commands, or snippets shown in A bash command to generate the Prisma client using yarn dlx. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-29.bash | A bash command to generate the Prisma client using bunx with the bun runtime. | Exact payloads, commands, or snippets shown in A bash command to generate the Prisma client using bunx with the bun runtime. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-30.bash | Bash commands to initialize the project directory structure and create the prisma client file for a Next.js integration. | Exact payloads, commands, or snippets shown in Bash commands to initialize the project directory structure and create the prisma client file for a Next.js integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs.tsx | A TypeScript React component demonstrating the integration of the Prisma AI SDK within a Next.js application environment. | Exact payloads, commands, or snippets shown in A TypeScript React component demonstrating the integration of the Prisma AI SDK within a Next.js application environm... |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-31.bash | The bash command to install the necessary dependencies for using the Prisma AI SDK with Next.js, including ai, @ai-sdk/react, @ai-sdk/openai, and zod. | Exact payloads, commands, or snippets shown in The bash command to install the necessary dependencies for using the Prisma AI SDK with Next.js, including ai, @ai-sd... |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-32.bash | A bash command to install the necessary dependencies including ai, @ai-sdk/react, @ai-sdk/openai, and zod for the Prisma AI SDK integration. | Exact payloads, commands, or snippets shown in A bash command to install the necessary dependencies including ai, @ai-sdk/react, @ai-sdk/openai, and zod for the Pri... |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-33.bash | Bash commands to install the AI SDK, React AI SDK, OpenAI provider, and Zod using yarn. | Exact payloads, commands, or snippets shown in Bash commands to install the AI SDK, React AI SDK, OpenAI provider, and Zod using yarn. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-34.bash | A bash command to install the AI SDK, React AI SDK, OpenAI provider, and Zod using the Bun package manager. | Exact payloads, commands, or snippets shown in A bash command to install the AI SDK, React AI SDK, OpenAI provider, and Zod using the Bun package manager. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs.text | A text file containing the required environment variable configuration for the Prisma AI SDK integration with Next.js. | Exact payloads, commands, or snippets shown in A text file containing the required environment variable configuration for the Prisma AI SDK integration with Next.js. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-35.bash | Bash commands to create the directory structure and route files for a Next.js AI SDK integration. | Exact payloads, commands, or snippets shown in Bash commands to create the directory structure and route files for a Next.js AI SDK integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-2.tsx | A Next.js route handler implementation using the Prisma AI SDK and OpenAI to stream text responses. | Exact payloads, commands, or snippets shown in A Next.js route handler implementation using the Prisma AI SDK and OpenAI to stream text responses. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-3.tsx | A Next.js route handler implementation using the Prisma AI SDK and OpenAI to stream text responses. | Exact payloads, commands, or snippets shown in A Next.js route handler implementation using the Prisma AI SDK and OpenAI to stream text responses. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-36.bash | A bash command to create the lib/save-chat.ts file for the Prisma AI SDK integration with Next.js. | Exact payloads, commands, or snippets shown in A bash command to create the lib/save-chat.ts file for the Prisma AI SDK integration with Next.js. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-4.tsx | A TypeScript React component function demonstrating how to save chat messages using the Prisma AI SDK within a Next.js application. | Exact payloads, commands, or snippets shown in A TypeScript React component function demonstrating how to save chat messages using the Prisma AI SDK within a Next.j... |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-5.tsx | A TypeScript React component function demonstrating how to use Prisma to upsert a chat session when integrating with the AI SDK in a Next.js application. | Exact payloads, commands, or snippets shown in A TypeScript React component function demonstrating how to use Prisma to upsert a chat session when integrating with... |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-6.tsx | A TypeScript React component function demonstrating how to upsert a session and save chat messages to a database using the Prisma client. | Exact payloads, commands, or snippets shown in A TypeScript React component function demonstrating how to upsert a session and save chat messages to a database usin... |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-37.bash | Bash commands to create the directory structure and route file for a Next.js API route used with the Prisma AI SDK. | Exact payloads, commands, or snippets shown in Bash commands to create the directory structure and route file for a Next.js API route used with the Prisma AI SDK. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-7.tsx | A Next.js API route handler that fetches and formats chat messages from a Prisma database for use with the AI SDK. | Exact payloads, commands, or snippets shown in A Next.js API route handler that fetches and formats chat messages from a Prisma database for use with the AI SDK. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-8.tsx | A Next.js client component demonstrating the integration of the Prisma AI SDK within a page component. | Exact payloads, commands, or snippets shown in A Next.js client component demonstrating the integration of the Prisma AI SDK within a page component. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-9.tsx | A Next.js client component demonstrating the implementation of a chat interface using the Prisma AI SDK and the useChat hook. | Exact payloads, commands, or snippets shown in A Next.js client component demonstrating the implementation of a chat interface using the Prisma AI SDK and the useCh... |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-10.tsx | A Next.js client component implementing a chat interface using the Prisma AI SDK and a custom useChat hook. | Exact payloads, commands, or snippets shown in A Next.js client component implementing a chat interface using the Prisma AI SDK and a custom useChat hook. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-11.tsx | A Next.js client component implementing a chat interface using the Prisma AI SDK and a custom useChat hook. | Exact payloads, commands, or snippets shown in A Next.js client component implementing a chat interface using the Prisma AI SDK and a custom useChat hook. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-12.tsx | A Next.js client component implementing a chat interface using the Prisma AI SDK and a custom useChat hook. | Exact payloads, commands, or snippets shown in A Next.js client component implementing a chat interface using the Prisma AI SDK and a custom useChat hook. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-38.bash | The bash command used to start the development server for the Prisma AI SDK with Next.js integration. | Exact payloads, commands, or snippets shown in The bash command used to start the development server for the Prisma AI SDK with Next.js integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-39.bash | The bash command used to run the development server for the Prisma AI SDK with Next.js integration. | Exact payloads, commands, or snippets shown in The bash command used to run the development server for the Prisma AI SDK with Next.js integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-40.bash | The bash command used to start the development server for the Prisma AI SDK with Next.js integration. | Exact payloads, commands, or snippets shown in The bash command used to start the development server for the Prisma AI SDK with Next.js integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-41.bash | The bash command used to run the development server for the Prisma AI SDK with Next.js integration. | Exact payloads, commands, or snippets shown in The bash command used to run the development server for the Prisma AI SDK with Next.js integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-42.bash | A bash command to launch Prisma Studio for managing database data during AI SDK integration. | Exact payloads, commands, or snippets shown in A bash command to launch Prisma Studio for managing database data during AI SDK integration. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-43.bash | A bash command to run Prisma Studio using pnpm dlx. | Exact payloads, commands, or snippets shown in A bash command to run Prisma Studio using pnpm dlx. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-44.bash | A bash command to launch Prisma Studio using the yarn dlx runner. | Exact payloads, commands, or snippets shown in A bash command to launch Prisma Studio using the yarn dlx runner. |
examples/prisma-ai-sdk-with-next-js-docs-guides-integrations-prisma-ai-sdk-nextjs-45.bash | A bash command to run Prisma Studio using the Bun runtime for the Prisma AI SDK integration. | Exact payloads, commands, or snippets shown in A bash command to run Prisma Studio using the Bun runtime for the Prisma AI SDK integration. |
What This Skill Covers
-
- Datadog: Learn how to configure Datadog tracing for a Prisma ORM project. Capture spans for every query using the @prisma/instrumentation package, dd-trace...
- Main sections:
Related pages.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://www.prisma.io/docs/guides/integrations/ai-sdk