# Prisma ORM

Prisma ORM 8 rewrites Prisma ORM in TypeScript. The schema-first workflow and model-first queries from earlier versions stay, but what changes is what your schema produces and how queries run. This page gives you the mental model, and the [quickstart](/guides/prisma-orm-2-prisma-orm-quickstart-postgresql) gets you to a running query.

:::callout{intent="note"}
Using Prisma ORM 7?

Prisma ORM 8 is the current release, as a release candidate. Prisma ORM 7 remains fully supported; its docs live at [/orm/v7](/guides/introduction-7-v7) and its setup paths at [/v7/getting-started](/guides/getting-started-2-getting-started).

For what release candidate means, when the final release is expected, and how to stay on version 7, see [Release status](/guides/prisma-orm-orm-release-status). For the Prisma ORM 8 name of every Prisma ORM 7 API, see [Coming from Prisma ORM 7](/guides/introduction-2-orm-coming-from-prisma-orm-7).
:::

## [Your schema becomes a contract](#your-schema-becomes-a-contract)

You still author models in a Prisma schema file (or in TypeScript), but instead of generating a client package, Prisma ORM emits the schema as a **contract**: a JSON document plus TypeScript types that your application, the migration tools, and coding agents all read. The contract is a plain artifact you can inspect and diff.

The workflow has three steps:

1. **Author your schema**: define your models in a Prisma schema (`.prisma`) or directly in TypeScript.
2. **Emit the contract**: a lightweight build step turns the schema into a deterministic JSON contract plus TypeScript types.
3. **Query with a composable DSL**: write queries inline against the typed contract. Each query compiles to a verifiable plan at runtime, with no hidden client methods.

## [What changed for developers](#what-changed-for-developers)

- **Better queries**: simpler nested queries, custom collection methods on your models, results you can iterate a record at a time, and a low-level type-safe SQL builder when you need raw control.
- **Extensible by design**: a minimal core exposed through a public SPI. Everything around it, including Postgres support itself, is an extension, so you can add databases, query builders, data types, and middleware.
- **Rethought migrations**: [graph-based migrations](/guides/migrations-the-migration-graph) that resolve branch conflicts automatically and make partial failures safe to retry, with both schema and data migrations written in TypeScript and validated against your contract.
- **AI-agent friendly**: the contract is machine-readable and each query produces an inspectable plan, which gives coding agents something concrete to check their work against. The installers also register agent skills for your editor's AI assistant.

### [Supported databases](#supported-databases)

Prisma ORM ships first-class support for **PostgreSQL** (the primary target), **MongoDB**, and **SQLite** (`@prisma/orm-sqlite`). **MySQL** support is planned next.

## [Get started](#get-started)

Scaffold a new project in one command:

::::tabs
:::tab{title="bun"}
```
bun create prisma@latest
```
:::

:::tab{title="pnpm"}
```bash
pnpm create prisma@latest
```
:::

:::tab{title="yarn"}
```bash
yarn create prisma@latest
```
:::

:::tab{title="npm"}
```bash
npm create prisma@latest
```

- [Quickstart with PostgreSQL](/guides/prisma-orm-2-prisma-orm-quickstart-postgresql): Scaffold a Prisma ORM app with PostgreSQL, seed it, and run your first query.

- [Add to an existing project](/guides/prisma-orm-2-prisma-orm-add-to-existing-project-postgresql): Add Prisma ORM to an existing app with the `orm init` command.

- [The full stack path](/guides/overview): Prisma ORM with Prisma Postgres and a Prisma Compute deploy, with guide and agent options.
:::
::::

[Quickstart with PostgreSQL Scaffold a Prisma ORM app with PostgreSQL, seed it, and run your first query.](/guides/prisma-orm-2-prisma-orm-quickstart-postgresql)[Add to an existing project Add Prisma ORM to an existing app with the `orm init` command.](/guides/prisma-orm-2-prisma-orm-add-to-existing-project-postgresql)[The full stack path Prisma ORM with Prisma Postgres and a Prisma Compute deploy, with guide and agent options.](/guides/overview)

## [Go deeper](#go-deeper)

[Learn the fundamentals Read, write, and relate data with the ORM, run transactions, and reach for advanced queries when you need them.](/guides/fundamentals-reading-data)[The data contract Learn how your schema becomes a verifiable contract, authored in PSL or TypeScript.](/guides/contract-authoring-the-data-contract)[CLI reference The contract, database, and migration commands in the Prisma ORM CLI.](/guides/reference-3-cli)[See your migrations in Studio Read your applied migration history in Prisma Studio: a visual diff, the executed SQL, and a schema diff per migration.](/guides/introduction-11-prisma-next)[Deploy the application Deploy your Prisma ORM app to Prisma Compute, next to your Prisma Postgres database.](/guides/start-prisma-compute-deploy)

## [Learn more about the design of Prisma ORM](#learn-more-about-the-design-of-prisma-orm)

The thinking behind Prisma ORM is documented on the [Prisma blog](https://www.prisma.io/blog). Start with these:

- **[The Next Evolution of Prisma ORM](https://www.prisma.io/blog/the-next-evolution-of-prisma-orm)**: why Prisma is being rebuilt, with a tour of the new query API, extensibility model, migrations, and AI-friendly design.
- **[Rethinking Database Migrations](https://www.prisma.io/blog/rethinking-database-migrations)**: how graph-based migrations replace timestamp ordering with schema state hashes.
- **[Prisma 8 Is \~90% As Fast as Raw PG](https://www.prisma.io/blog/prisma-next-performance-benchmark)**: benchmarks against the raw PostgreSQL driver.

The full series also covers [TypeScript migrations](https://www.prisma.io/blog/typescript-migrations-in-prisma-next), [data migrations](https://www.prisma.io/blog/data-migrations-in-prisma-next), [the extension API](https://www.prisma.io/blog/prisma-next-call-for-extension-authors), the [roadmap](https://www.prisma.io/blog/prisma-next-roadmap), and the [early-access launch](https://www.prisma.io/blog/prisma-next-early-access-write-your-contract-prompt-your-agent-ship-your-app). The source lives on [GitHub](https://github.com/prisma/orm).

## Related pages

- [Authentication & Tools](./authentication-tools-index.md)
- [Build](./build-index.md)
- [Changelog](../changelog.md)
- [Concepts](./concepts-index.md)
- [Console commands](./console-commands-index.md)
- [Contract Authoring](./contract-authoring-index.md)
- [Core Concepts](./core-concepts-index.md)
- [Data Modeling](./data-modeling-index.md)
- [Database](./database-index.md)
- [DB commands](./db-commands-index.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
