Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tuturuuu.com/llms.txt

Use this file to discover all available pages before exploring further.

Tuturuuu AI memory is backed by Supermemory through the server-only @tuturuuu/ai/memory boundary. Product routes must not call Supermemory from the browser and must not create product-specific memory stores.

Scope

Memory scope is always user + workspace. The shared helper builds a stable Supermemory containerTag from those two identifiers and stores product, surface, route, locale, timezone, conversation, and workspace metadata on each write. Default recall is cross-product within that user + workspace container. Use metadata filters only when a route needs a narrower product or surface view.

Runtime

Use withAiMemory for AI SDK calls when the route has a user and workspace. Use ingestAiMemoryEvent, buildAiMemoryContext, and the Mira-compatible tool executors for explicit memory reads and writes. Reads fail open by default, and writes are best effort. Keep SUPERMEMORY_FAIL_OPEN=true unless a product explicitly requires strict persistence. Required server-side env:
SUPERMEMORY_ENABLED=true
SUPERMEMORY_BASE_URL=http://supermemory:8787
SUPERMEMORY_API_KEY=...
SUPERMEMORY_TIMEOUT_MS=1500
SUPERMEMORY_FAIL_OPEN=true
SUPERMEMORY_IMAGE=...
SUPERMEMORY_DATABASE_URL=postgres://...
SUPERMEMORY_API_KEY is internal infrastructure configuration. Never expose it through browser-visible env vars or client responses.

User Controls

Workspace settings live behind:
GET/PATCH /api/v1/workspaces/:wsId/ai/memory/settings
GET /api/v1/workspaces/:wsId/ai/memory/items
DELETE /api/v1/workspaces/:wsId/ai/memory/items/:memoryId
POST /api/v1/workspaces/:wsId/ai/memory/export
The settings dialog exposes enable/disable, product toggles, search/list, delete, and export controls. API routes call private schema RPCs through the server-side Supabase admin client.

Migration

Legacy mira_memories rows are imported with the admin-only backfill endpoint:
POST /api/v1/admin/ai/memory/backfill-mira
Backfill is idempotent through stable customId values. Rows without a legacy workspace are imported into the user’s default or personal workspace and tagged with legacy_mira metadata.

Self-Hosting

The Docker fleet runs Supermemory as an internal support service. The Compose service wraps the official enterprise image through apps/supermemory/Dockerfile so the blue/green bake file can tag and refresh it alongside other support services. Supermemory’s enterprise self-hosting package is supplied by Supermemory and is documented around Cloudflare Workers. For the Docker fleet, set SUPERMEMORY_IMAGE to the approved enterprise image or an internal image built from that package. Do not fork or vendor the public OSS repository as the production source of truth. Connectors such as Google Drive, OneDrive, and Notion are disabled for the first rollout. Product ingestion should persist concise summaries only; do not ingest raw files or binaries unless the source is user-owned, enabled, and explicitly appropriate for memory.