# Patterna > Patterna is a multi-tenant recommendation service. Your backend asks for a slate per surface and gets item ids with a reason per slot; it reports what users saw and tapped. Every surface runs a sticky holdout and the ledger reports the difference with a 95% interval. Three consent modes; non_profiled stores no user id. Never send personal data. - API base: https://api.patterna.nl/v1 (Bearer key; the tenant comes from the key) - OpenAPI contract: https://staging.patterna.nl/docs/openapi.yaml (binding: if a page disagrees, the page is wrong) - Full documentation in one file: https://staging.patterna.nl/docs/llms-full.txt ## Guides - [Go live in six steps](https://staging.patterna.nl/docs/raw/go-live-in-six-steps.md): The setup checklist in six steps, from connecting a data source to a live surface with a holdout and the first readable ledger row. - [Run a holdout](https://staging.patterna.nl/docs/raw/run-a-holdout.md): Start a holdout on a surface, size it with the readable sample, keep it valid until it can be read, and end it. - [Read a ledger row](https://staging.patterna.nl/docs/raw/read-a-ledger-row.md): A field-by-field walkthrough of one ledger row: rates, difference, interval, slates and units, readable flag, SRM and revenue. - [Fix a tag and approve a health claim](https://staging.patterna.nl/docs/raw/fix-a-tag.md): Edit an item's tags in Catalog and approve LLM-proposed health-claim tags under the two-person rule. - [Roll back a flow](https://staging.patterna.nl/docs/raw/roll-back-a-flow.md): Roll a surface back by activating an earlier flow version with a note, or switch Patterna off on your side instantly. - [Handle a deletion request](https://staging.patterna.nl/docs/raw/handle-a-deletion-request.md): Delete or export one user's data by random id and follow both timestamps until rows and models are clean. - [Rotate keys and the signing secret](https://staging.patterna.nl/docs/raw/rotate-keys-and-signing-secret.md): Replace a scoped API key without downtime, sign events with the pss_ secret string (with a test vector), and rotate the secret. - [Integrate with your AI agent](https://staging.patterna.nl/docs/raw/agents/integrate-with-your-ai-agent.md): Step-by-step brief for a coding agent: create keys, load the catalog, set consent, recommend, report interactions, send events and verify with the trace. ## Concepts - [What Patterna is](https://staging.patterna.nl/docs/raw/what-is-patterna.md): Patterna is a multi-tenant recommendation service that proves its lift with a holdout, gives a reason for every slot and works without a user id. - [What the engine uses, and what it refuses](https://staging.patterna.nl/docs/raw/signals.md): The full list of signals: request context, catalog attributes, events with their weights, the nightly artifacts, what is refused, and the rule for what a reason may say. - [Consent modes](https://staging.patterna.nl/docs/raw/consent-modes.md): The three consent modes personalized, cohort and non_profiled, and what each stores, learns from and never stores. - [Proof and the ledger](https://staging.patterna.nl/docs/raw/proof-and-the-ledger.md): How the sticky holdout, intention to treat, user-clustered intervals, the SRM check and the readable flag make the ledger the only proof. - [Exploration and propensities](https://staging.patterna.nl/docs/raw/exploration-and-propensities.md): Plackett-Luce exploration with exact per-position propensities, caps inside the sampler, and SNIPS estimates of a flow on logged traffic. - [Timeouts and what counts in the ledger](https://staging.patterna.nl/docs/raw/timeouts-and-the-ledger.md): The serve budgets (150 ms in the SDK, 120 ms in the engine), the deadline and abandonment, and a table of which slates count in the ledger and the fallback rate. - [The twin](https://staging.patterna.nl/docs/raw/the-twin.md): The twin is a tenant simulator for example data and what-if curves at three truth scales; it is never proof. - [Reasons](https://staging.patterna.nl/docs/raw/reasons.md): Every slot carries a reason key and a sentence per locale, said only when it is true; overrides by reason key or generator kind, placeholders, pairs_with, more_about_tag and recommended. - [Surfaces and flows](https://staging.patterna.nl/docs/raw/surfaces-and-flows.md): Surfaces move through shadow, testers, live and off; flows are versioned configs that you activate and roll back by activating an older version. - [Data we never store](https://staging.patterna.nl/docs/raw/data-we-never-store.md): The PII Patterna never stores, the allowlists that enforce it, retention per data class, and how deletion and export work. - [Identity across connectors](https://staging.patterna.nl/docs/raw/identity-across-connectors.md): How user ids stay random across the backend, PostHog, GA4, Shopify and imports: minting, hashing, session ids, assignment_unit and deletion. ## Connectors - [Backend API](https://staging.patterna.nl/docs/raw/connector-backend-api.md): Call Patterna directly from your backend: the three key scopes, a curl for each, and event signing. - [SDK TypeScript](https://staging.patterna.nl/docs/raw/connector-sdk-typescript.md): The TypeScript SDK for backends and Expo apps: client, backend proxy, offline queue, consent gate, fallback and signing. - [SDK Go](https://staging.patterna.nl/docs/raw/connector-sdk-go.md): The Go SDK for a backend request path: timeouts, circuit breaker, fallback, async reports, abandonment, the admin package, and the shape of a backend drop-in. - [PostHog](https://staging.patterna.nl/docs/raw/connector-posthog.md): Point a PostHog HTTP destination at Patterna; see which events map to what and which fields are dropped. - [Google Analytics 4](https://staging.patterna.nl/docs/raw/connector-ga4.md): Read GA4 events from the BigQuery export with a viewer service account under the same privacy rules as PostHog. - [Shopify](https://staging.patterna.nl/docs/raw/connector-shopify.md): Bring Shopify products in from the public storefront feed or a read-only Admin API token, order history as co-purchase aggregates, HMAC-verified webhooks, and the shop link parameter. - [Quiz CSV](https://staging.patterna.nl/docs/raw/connector-quiz-csv.md): Map quiz answers to taxonomy tags by random user id with a TOML mapping; only mapped columns are read, never health values. ## API - [API overview](https://staging.patterna.nl/docs/raw/api-overview.md): Base URL, scopes, error codes, idempotency, rate limits and request ids for the Patterna API. - [Serve scope](https://staging.patterna.nl/docs/raw/api-serve.md): Annotated requests and responses for recommendations and interactions under the serve scope. - [Ingest scope](https://staging.patterna.nl/docs/raw/api-ingest.md): Annotated requests and responses for events, catalog items, tags, status and webhooks under the ingest scope. - [Admin scope](https://staging.patterna.nl/docs/raw/api-admin.md): Annotated requests and responses for users, surfaces, flows, experiments, the ledger, exports, keys and audit under the admin scope. ## Reference - [Event types](https://staging.patterna.nl/docs/raw/reference-event-types.md): Every canonical event type with its envelope, props, learner weight, where else it acts and who sends it. - [Flow config reference](https://staging.patterna.nl/docs/raw/reference-flow-config.md): Every flow config field with its default and valid range, what each generator reads, and the validation errors. - [Reason keys](https://staging.patterna.nl/docs/raw/reference-reason-keys.md): Every reason key, its default sentence per locale, how flow overrides are keyed, and the placeholders serve fills. - [Error codes](https://staging.patterna.nl/docs/raw/reference-error-codes.md): Stable error codes from the API, the SDKs and the panel, with status and what to do. - [Glossary](https://staging.patterna.nl/docs/raw/glossary.md): Short definitions of the terms used across Patterna's docs, panel and API. - [Changelog](https://staging.patterna.nl/docs/raw/changelog.md): What changed in Patterna, newest first: engine 0.3.3 (round 8: the next-item model, content retrieval, real-time sessions) and SDKs 0.4.1 are live. - [Status](https://staging.patterna.nl/docs/raw/status.md): What runs where, which versions are deployed, the job schedule, and what is built or not built. - [llms.txt](https://staging.patterna.nl/docs/raw/agents/llms.md): Compact machine-readable index of Patterna: what it is, the API in five lines, the rules, and a link to every page and the contract.