# SubstrateDB > The realtime backend for agent-native apps. Build agent-native apps on one realtime backend for Postgres, auth, permissions, state, storage, workflows, and AI. ```sh npx @substratedb/cli@latest init ``` ## Links - [Home](/): Product overview, features, and pricing. - [Products](/#products): All twelve platform products. - [Permissions](/#permissions): Access control across every feature. - [What's Strata](/#strata): The unified querying layer for your app. - [Database in the frontend](/#frontend-database): Optimistic, realtime, offline-first reads and writes. - [Pricing](/#pricing): Plans, limits, and rates. - [Blog](/blog): Product updates and technical deep dives. - [Request early access](/waitlist) - [Dashboard](/dashboard) - [Agent view](/agents): This document served as a page. ## Substrate is one realtime backend for your database, auth, permissions, storage, workflows, and AI. ## Platform features And more... ### Database Every branch within a project is a fully provisioned Postgres database, isolated and ready to use. ### Authentication Add secure sign ups, logins, sessions, and access controls without building identity infrastructure. ### State Stores Store durable JSON key/value state with strongly consistent reads and writes. ### Object Stores Store and serve files, media, and application assets through S3-compatible object storage. ### Realtime Build multiplayer and collaborative experiences with live maps, streams, and presence. ### Workflows Run typed durable compute with retries, scheduling, and state that survives failures and restarts. ### Analytics Understand and shape product behavior with flags, cohorts, dashboards, and Web Vitals. ### AI Gateway Unified model routing, metering, and billing. ### Usage & Billing Meter usage, billing, and entitlements in real time. ### Machines Isolated compute, ready when your workloads need it. ### MCPs Give agents secure access to your tools and data. ### Observability Inspect logs, traces, and runtime health in one place. ## Permissions: RLS is dead. Database-only rules get complex fast. Substrate controls access across every feature and client. - Compose **reusable permission functions** that evaluate to true or false. - Query your database **at runtime** and make decisions from live application data. - Define create, read, update, and delete rules together with **one small, typed API**. - Apply **the same permission model** to object storage and every other Substrate feature. ## Strata is the unified querying layer for your app. One typed API spans every feature. Queryable surfaces: Database, Views, Object Stores, State Stores, Feature Flags, Cohorts, Notifications, Live Maps, Presence, Streams, Machines. ### Simple for humans, easy for agents. A small API surface is easy to learn, while reusable operations let humans and agents share the same logic everywhere. ```tsx // ⚡ Realtime task tracking // --------------------------- // Updates instantly. Works offline. "use client" import { useSubstrate } from "@substratedb/react" import { Tasks } from "@substratedb/generated/schema" import { TaskList } from "@/components/task-list" export default function TasksPage({ projectId }: { projectId: string }) { const substrate = useSubstrate() // 1. Read — live, offline, and permission-aware const { data: tasks = [] } = substrate .read({ from: Tasks() }) .where(Tasks().project().eq(projectId)) .use() // 2. Write — optimistic and automatically synced const addTask = (title: string) => substrate .write({ from: Tasks() }) .create({ project: projectId, title, ownerId: substrate.auth.user!.id }) .run() // 3. Render — ordinary React return } ``` ## The Strata developer experience ### Never leave your IDE. Define your schema, permissions, and workflows alongside your app. ### End-to-end type safety. Generated handles type every read, write, and result. ### Git for databases. Work in isolated Postgres branches. Review every change before you push. ## Plus a realtime database for the frontend. ### Optimistic updates Changes appear instantly. Substrate reconciles with the server and rolls back automatically if a write is rejected. ### Realtime by default Reads stay current across every client. No polling, refresh buttons, or subscription plumbing. ### Works offline Keep reading and writing without a connection. Everything syncs automatically when you’re back. ## Pricing: Never pauses. Designed to scale. Whether you’re building a side project or your next big thing, start with Substrate for free. Your projects never pause, commercial use is always allowed, and you can collaborate with your team before scaling to millions of users. ### All plans include - Databases - State Stores - Object Stores - Auth - Realtime - Workflows - AI Gateway - Analytics - Machines - Meters & Limits - MCPs - Unlimited MAUs - No per-row billing #### Free Everything you need to start building. - Monthly: $0 / month - Yearly: Custom - Projects: 2 projects - Branches: 2 branches / project - Database: 1 GB max - State Store: 1 store · 64 MB total - Object Store: 3 stores · 5 GB total - All platform features: - Database - Authentication - Object Store - State Store - Workflows - Realtime - AI Gateway - Analytics - Usage & Billing - Machines - MCPs - Observability #### Pro More capacity for growing products. - Monthly: $20 / month - Yearly: $16 / month ($192 billed yearly; saves 20%) - Projects: 5 projects - Branches: 5 branches / project - Database: 15 GB max - State Store: 5 stores · 2 GB total - Object Store: 10 stores · 100 GB total - Everything in Free, plus: - Pay-as-you-go usage - Encrypted columns at rest - Longer history and log retention #### Max Five times Pro capacity for demanding products. - Monthly: $100 / month - Yearly: $80 / month ($960 billed yearly; saves 20%) - Projects: 25 projects - Branches: 25 branches / project - Database: 75 GB max - State Store: 25 stores · 10 GB total - Object Store: 50 stores · 500 GB total - Everything in Pro, plus: - Five times Pro capacity - AI Gateway model policies - Longer workflow duration #### Enterprise Custom rates and limits for your organization. - Monthly: Custom - Yearly: Custom - Projects: Custom - Branches: Custom - Database: Custom - State Store: Custom - Object Store: Custom - Everything in Max, plus: - Dedicated support channel - One-to-one onboarding call - AI Gateway model policies - Step-up verification ## Build agent-native apps with Substrate. Request early access: /waitlist --- View: Human / | Machine /agents