Guides
Build it right, the first time.
Practical, opinionated walkthroughs of the patterns we use in production. Each guide ships full code and points at the things that bite.
OrmAI with Drizzle
Drizzle is the ORM of choice for teams who want type safety without code generation. Here's how to wrap it with OrmAI's policy engine.
OrmAI with Prisma
Wrap your Prisma client with OrmAI's policy engine. Field-level redaction, tenant scoping, and audit logs over Prisma — without changing your schema.
Production checklist for agent + database systems
The 30 things to verify before letting your agent talk to a real database. Compiled from incidents, audits, and three years of shipping.
OrmAI as an MCP server for Claude
Expose OrmAI's policy-enforced tools as a Model Context Protocol server. Drop it into Claude Desktop, Cursor, or any MCP client.
OrmAI with the Vercel AI SDK
Expose OrmAI tools to the Vercel AI SDK so your Next.js / Hono / Sveltekit agent has type-safe, policy-enforced database access.
OrmAI with LangGraph
Wire OrmAI tools into a LangGraph state machine so each node has scoped, audited database access.
Write operations with approval gates
How to let an agent mutate state without losing your nerve. Reason-required writes, two-person approvals, dry runs, and rollback by design.
Query budgets and runaway agents
Bound how much your agent can scan, return, mutate, and spend per minute. The patterns that keep one curious prompt from melting your database.
Audit logs you'll actually trust
What to log, where to put it, and how to query it when the security team asks 'what did the agent do?'
Field-level redaction for PII
Stop your agent from ever seeing what it shouldn't. Mask, hash, or deny columns at the policy level — without touching application code.
Multi-tenant isolation for AI agents
How to enforce tenant scoping for every read and write your AI agent makes — and why doing it any other way leaks data.
Quickstart: OrmAI with FastAPI and SQLAlchemy
Stand up a policy-enforced agent database layer in 5 minutes. SQLAlchemy models, FastAPI endpoints, OrmAI policy, and a working tool call you can hand to Claude or GPT.