Memory Architecture

Supabase Event Memory & Audit Ledgers

Smriti’s BYODB (Bring Your Own Database) integration lets you extract structured, bi-temporal SVO events and write them directly into your Supabase project. Zero cloud lock-in. 100% native PostgreSQL queries.

Read the Docs Back to Home
O(1)
Connection Retrieval
S-V-O
Extraction Engine
Dual
pgvector Architecture
∞
Context Retention
The Problem

Standard Supabase audit tables create unstructured JSON sludge. Tracking multi-agent state, CRM updates, or strict chronological event sequencing fails because simple row diffs do not support causal querying.

The Smriti Solution

Smriti sits as a pipeline before your database. You send unstructured text or raw events, Smriti extracts the precise Subject-Verb-Object (SVO) causal structure, and writes a fully indexed, bi-temporal memory timeline natively into your own Supabase.

How It Works with Supabase Integration

Pass your X-Supabase-Url header in the API call. Smriti runs the language extraction model and instantly pipes the structured records into the Supabase pooler URL. You own the data, the schema, and the vectors.

# Install Smriti pip install smriti # Initialize with supabase from smriti import SmritiMemory memory = SmritiMemory( backend="pgvector", mode="dual", # semantic + episodic svo_extraction=True # auto S-V-O tagging ) # Store any interaction memory.store("User bought flowers on Tuesday") # Retrieve with causal context result = memory.recall("why did we argue on Friday?") # Returns: Tuesday → flowers → context → Friday

Smriti vs Standard Row Auditing

Feature Standard Row Auditing Smriti
Long-term memory Partial Full timeline
Causal context (A caused B) No S-V-O graph
Cross-session retention Session only Persistent
Encrypted memory blocks No Block-level
Query speed O(n) scan O(1) via index

Why standard Supabase audit logs break under scale

When building an agentic AI app, CRM, or complex operational system, relying on raw Supabase PostgreSQL row-level audit logs becomes unscalable. These logs typically store before/after JSON blobs. If you need to query 'why did this agent change this state?', you are forced to parse unstructured JSON in real-time. Smriti’s SVO extraction resolves this by creating a highly structured, queryable semantic layer on top of your existing Supabase database.

The Bring Your Own Database (BYODB) Advantage

Data privacy and vendor lock-in are the primary roadblocks for enterprise AI adoption. Smriti’s Supabase BYODB feature eliminates this entirely. Because Smriti writes directly to your PostgreSQL database, your users' temporal memory and vector embeddings never reside in our cloud. You retain full HIPAA, SOC2, and GDPR compliance effortlessly by keeping all event data within your own Supabase infrastructure.

Setting up the Smriti Supabase Integration

Setup takes two minutes. First, run the provided Smriti migration script in your Supabase SQL editor to create the necessary bi-temporal tables and pgvector indexes. Second, add the X-Supabase-Url header (using the Session Pooler connection string) to your Smriti API or MCP Server requests. Instantly, all memory ingestion and temporal querying will utilize your database.