0PricingLogin
AI Agents · Lesson

Semantic Memory (Vectorised Facts)

Free-floating facts the agent learned about the user or world, stored in a vector index.

What Is Semantic Memory?

Semantic memory holds free-floating facts the agent knows — about the user, the world, the company. Unlike episodic, there is no timestamp tied to a specific event.

Examples:

  • "The user's name is Alice."
  • "Alice prefers Celsius."
  • "The current pricing tier is Pro at $20/mo."

Storage Format

A vector store + structured metadata:

CREATE TABLE semantic_facts (
    id UUID PRIMARY KEY,
    user_id TEXT NOT NULL,
    fact TEXT NOT NULL,
    embedding vector(1536),
    source TEXT,                    -- 'extracted' / 'user-stated' / 'system'
    confidence REAL DEFAULT 1.0,
    created_at TIMESTAMPTZ DEFAULT NOW()
);

All lessons in this course

  1. Episodic Memory (Per-Session History)
  2. Semantic Memory (Vectorised Facts)
  3. Procedural Memory (Skill Library)
  4. Memory Decay and Garbage Collection
← Back to AI Agents