Skip to main content

What is Satori?

Satori is a memory layer for AI applications that enables your agents to remember information across conversations. Built on semantic search with vector embeddings, Satori automatically stores and retrieves relevant context to make your AI more personalized and context-aware.

Key Features

Semantic Search

Find relevant memories using natural language queries powered by vector embeddings

Multi-Tenant Isolation

Built-in tenant isolation ensures your users’ data stays completely separate

AI SDK Integration

Drop-in tools for Vercel AI SDK with automatic memory management

Type-Safe API

End-to-end type safety with tRPC from your backend to frontend

How It Works

1

User sends a message

Your application receives input from the user
2

Fetch relevant context

Satori searches for relevant memories using semantic similarity
3

LLM processes with context

The AI model receives the message along with relevant memories
4

Save new information

The LLM uses tools to save important information for future conversations

Installation

npm install @satori/tools ai

Quick Example

import { streamText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { memoryTools, getMemoryContext } from '@satori/tools';

// Create memory tools for a user
const tools = memoryTools({
  apiKey: process.env.SATORI_API_KEY!,
  baseUrl: 'https://api.satori.dev',
  userId: 'user-123',
});

// Pre-fetch relevant memories
const context = await getMemoryContext(
  {
    apiKey: process.env.SATORI_API_KEY!,
    baseUrl: 'https://api.satori.dev',
    userId: 'user-123',
  },
  userMessage
);

// Stream with memory
const result = await streamText({
  model: openai('gpt-4o'),
  system: `You are a helpful assistant with memory.
  
What you know about this user:
${context}

Use add_memory to save important information.`,
  messages,
  tools,
});
The LLM automatically decides when to save memories using the add_memory tool. You don’t need to manually parse or store information.

Use Cases

Build assistants that remember user preferences, work context, and conversation history to provide increasingly personalized responses over time.
Enable support agents to access previous interactions, known issues, and customer preferences without asking repetitive questions.
Create tutors that track student progress, learning style preferences, and areas of difficulty to adapt teaching approaches.
Build tools that remember project context, team preferences, and historical decisions to provide better recommendations.

Why Satori?

Simple Integration

Works seamlessly with Vercel AI SDK and other frameworks

Production Ready

Built on PostgreSQL with pgvector for reliable, scalable storage

Developer First

Type-safe API, great DX, and comprehensive documentation

Next Steps