# mordn docs > Build and operate an AI agent inside your software product. ## Get started - [Introduction](https://mordn.com/docs): Build and operate an AI agent in your React or Next.js product with knowledge, memory, actions, conversations, files, and a complete integration surface. - [Quickstart](https://mordn.com/docs/quickstart): Add an authenticated AI assistant to your Next.js app. Run the handler in your deployment with mordn-hosted persistence and configuration. - [Quickstart: Vite + Supabase](https://mordn.com/docs/quickstart/vite): Add a production chat agent to a Vite React app with no server. One component, a publishable key, and the Supabase session your app already has. - [MCP server](https://mordn.com/docs/mcp): Connect your coding agent to mordn. It signs you in once, then creates agents, publishes config, mints keys, adds knowledge and hands you the install code — no dashboard round-trip. - [Hosted mode](https://mordn.com/docs/hosted-mode): Run the chat agent with no server route. Mount the widget with a browser-safe publishable key; mordn runs the handler and verifies your users from the token your auth provider already signs. - [Bring your own database](https://mordn.com/docs/quickstart/self-host): Run the same chat handler against your own Postgres and object storage instead of the hosted backend. - [Security model](https://mordn.com/docs/security): How @mordn/chat-widget keeps one user’s conversations and attachments private from another’s — and the one thing you must do to uphold it. - [Production launch checklist](https://mordn.com/docs/guides/production-readiness): A practical launch gate for identity, configuration, persistence, knowledge, feedback, observability, and rollback before exposing a mordn agent to real users. ## Guides - [Authentication](https://mordn.com/docs/guides/authentication): How to implement getChatUserId against your verified server session, why X-User-Id is not a trust boundary, and multi-tenant patterns. - [Persistence & history](https://mordn.com/docs/guides/persistence): How the user-bound store persists turns, computes conversation counts, loads history, and limits model context. - [Attachments](https://mordn.com/docs/guides/attachments): Enable uploads on both client and server, enforce MIME and size limits, and keep objects private. - [Streaming](https://mordn.com/docs/guides/streaming): How the handler streams, bounds tool loops, maps errors, and exposes post-turn telemetry. - [Theming](https://mordn.com/docs/guides/theming): Customize the widget with three required brand colors and choose popup, inline, or page layout. - [Models & tools](https://mordn.com/docs/guides/models-and-tools): Choose a Vercel AI SDK v6 model and build request-scoped tools with guaranteed cleanup. - [Build actions](https://mordn.com/docs/guides/build-actions): Let your chat agent perform real actions in your app — create records, update orders, search data — with copy-paste recipes an AI coding agent can implement in one pass. - [Knowledge / RAG](https://mordn.com/docs/guides/knowledge): Configure namespace-bound retrieval and admin-only ingestion with the shipped knowledge factories and source types. - [Memory](https://mordn.com/docs/guides/memory): Configure long-term memory, understand adapter-dependent tiers, and expose the built-in user-tier controls accurately. - [Per-turn context](https://mordn.com/docs/guides/context): Send live app state with every message via the context prop, and inject it server-side with getContext or trustClientContext — untrusted-by-default so the browser can never spoof authoritative background. - [MCP tools](https://mordn.com/docs/guides/mcp): Connect remote MCP servers per request and manage the current developer-owned hosted integration surface. - [Feedback](https://mordn.com/docs/guides/feedback): Wire answer ratings through the verified handler seam and read the shipped hosted summary response. - [Streaming reliability](https://mordn.com/docs/guides/streaming-reliability): Why stream errors are logged by default, how to keep a reverse proxy from buffering SSE, and how to prove a deployment streams incrementally with streamHealthCheck. - [AI UX extras](https://mordn.com/docs/guides/ai-ux): Starter prompts, server-first follow-ups, action-result cards, panel persistence, and tool approval. - [Action templates](https://mordn.com/docs/guides/action-templates): Build vertical assistants with action configs, reusable cards, forms, chips, template manifests, and a safe server-verified execution model. ## Backends - [Choosing a backend](https://mordn.com/docs/backends/overview): Choose persistence and attachment storage independently, with explicit factories bound to verified identity. - [Drizzle / Postgres](https://mordn.com/docs/backends/drizzle): Use the current Drizzle ChatStore schema and shared Postgres client. - [Supabase storage](https://mordn.com/docs/backends/supabase): Use a private Supabase bucket for user-namespaced attachments and short-lived signed URLs. - [Hosted](https://mordn.com/docs/backends/hosted): Use mordn-hosted persistence, storage, configuration, and feedback from a server-side API key. - [Custom store & adapter](https://mordn.com/docs/backends/custom): Implement ChatStore and StorageAdapter yourself — Prisma, DynamoDB, S3/R2, or any backend — while preserving the same security guarantees. ## API reference - [ChatWidget](https://mordn.com/docs/api/chat-widget): The shipped client contract for ChatWidget: transport, configuration, appearance, layouts, and extension points. - [createChatHandler](https://mordn.com/docs/api/create-chat-handler): The server router, its required runtime dependencies, hooks, limits, and cross-origin options. - [ChatStore](https://mordn.com/docs/api/chat-store): The user-bound persistence contract, its ownership invariants, pagination options, and usage record seam. - [StorageAdapter](https://mordn.com/docs/api/storage-adapter): The attachment-storage contract — private at rest, signed short-lived reads, and user-namespaced paths. - [Exports](https://mordn.com/docs/api/exports): Package entry points for the v0.13.0 client, server, persistence, storage, knowledge, memory, MCP, actions, and legacy surfaces. - [CLI](https://mordn.com/docs/api/cli): Scaffold a Next.js backend, ingest knowledge, inspect indexed sources, and run retrieval evaluations. - [Usage & Analytics API](https://mordn.com/docs/api/usage): The current hosted usage endpoints, filters, response envelopes, and server-only authentication model. ## Agent resources - [llms-full.txt](https://mordn.com/docs/llms-full.txt): The full Markdown of every page in one file. - [Page Markdown](https://mordn.com/docs/index.md): Append `.md` to any page URL to fetch that page as raw Markdown. - [agent-readability.json](https://mordn.com/docs/agent-readability.json): Manifest of every agent-facing artifact on this site. - [Sitemap](https://mordn.com/docs/sitemap.xml): Every indexable page URL with its last-modified date.