Skip to content

Documentation

Learn how to use MetaMemory

Everything you need to give your AI agents persistent, intelligent memory.

Getting Started

Installation

Set up MetaMemory in your project with npm, pnpm, or yarn. Walk through dependency installation, Prisma client generation, and initial database migration to get your environment production-ready in minutes.

Coming soon

Quick Start

Store your first memory and run an adaptive search in under 5 minutes. This hands-on tutorial covers creating memory entries, performing semantic searches, and observing how retrieval strategies adapt to your query patterns over time.

Coming soon

Configuration

Connect PostgreSQL, Pinecone, Redis, and optional Neo4j backends. Learn how to configure environment variables, tune cache TTLs, set embedding dimensions, and enable or disable optional services like graph-based memory relationships.

Coming soon

Core Concepts

Memory Engine

How memories are stored, indexed, and retrieved across sessions. Explore the layered architecture behind MemoryEngine, including CRUD orchestration, automatic vector embedding, emotional tagging, and graph relationship management.

Coming soon

Multi-Vector Encoding

Semantic, emotional, process, and context embeddings explained. Understand how each memory is encoded into multiple vector spaces simultaneously, enabling richer similarity matching and cross-dimensional retrieval that captures meaning beyond keywords.

Coming soon

Adaptive Retrieval

Thompson Sampling and UCB strategies that learn from usage. Dive into the multi-armed bandit framework that automatically selects the best search strategy for each query, balancing exploration of new approaches with exploitation of proven ones.

Coming soon

Emotional Intelligence

6 computational emotional states and real-time detection. Learn how MetaMemory tags memories with emotions like joy, sadness, anger, fear, surprise, and disgust, then uses these signals to surface contextually appropriate memories during retrieval.

Coming soon

Guides

LangChain Integration

Drop-in memory adapter for LangChain agents. This guide shows you how to replace default LangChain memory with MetaMemory using the custom BaseMemory adapter, giving your chains persistent, semantically searchable memory with zero architecture changes.

Coming soon

CrewAI Integration

Shared memory across CrewAI agent teams. Configure MetaMemory as the shared knowledge layer for your CrewAI crews, enabling agents to collaboratively build and query a common memory pool with role-based access and episode tracking.

Coming soon

Episode Tracking

Group related interactions into episodes with automatic consolidation. Learn how the EpisodeTracker groups conversation turns and memory operations into coherent episodes, tracks emotional arcs, and triggers automatic memory creation when episodes close.

Coming soon

Memory Consolidation

LLM-powered merging for 70% compression with semantic fidelity. Understand how the MemoryConsolidationService identifies redundant or overlapping memories and merges them using GPT-4, preserving key information while dramatically reducing storage and retrieval noise.

Coming soon

API Reference

Memory API

CRUD operations, search, and bulk management endpoints. Full reference for creating, reading, updating, and deleting memories, plus advanced search with filters for userId, emotion, time range, and configurable retrieval strategies.

Coming soon

Strategy API

Strategy selection, performance tracking, and optimization. Endpoints for querying active strategies, viewing historical performance metrics, triggering Bayesian parameter optimization, and manually overriding the multi-armed bandit selector.

Coming soon

Episode API

Episode lifecycle, emotional state tracking, and queries. Create, update, and close episodes programmatically. Query episodes by time range, emotional state, or participant, and retrieve the full memory trail associated with each episode.

Coming soon

Conversation API

Persistent chat context with message history and state. Manage long-running conversations with automatic context injection, message persistence, emotional state tracking per turn, and configurable context windows for token-efficient retrieval.

Coming soon