Memory Configuration

Configure how memory is stored and retrieved to balance performance, persistence, and search quality.

In-Memory Storage

Best for development, testing, and short-term tasks. Enabled by default, fast, and requires no configuration — but data is lost on restart.

memory:
  type: "in_memory"

Vector Database Storage (LanceDB)

Best for production, long-term learning, and semantic search. Persists across restarts.

memory:
  type: "lancedb"
  db_dir: "/path/to/memory/database"
  collection_name: "memories"
  embedding_model: "text-embedding-v4"   # optional
  similarity_threshold: 0.8
ParameterDescription
db_dirRequired. Directory for LanceDB storage; created if missing.
collection_nameOptional (default memories). Agents can share or separate collections.
embedding_modelOptional. Embedding model for semantic search; falls back to configured embedding models.
similarity_thresholdOptional (default 1.0). 0.0–1.0; higher is stricter, lower retrieves more memories.

Text fallback

If embedding_model is not configured, the LanceDB memory store falls back to text-based search instead of semantic similarity.

Next Steps