For the complete documentation index, see llms.txt. This page is also available as Markdown.

Memory & RAG

Give AI memory across conversations, isolate it per user, and ground answers in your own documents with embeddings, vector stores, and RAG.

💭 Memory

Memory lets an AI keep context across turns. BoxLang AI ships more than 20 memory types, and every one supports multi-tenant isolation with userId and conversationId.

Kind
Types
Use it for

Conversation

Windowed, Summary, Session, File, Cache, JDBC

Chat history and context

Vector

BoxVector, Chroma, Postgres, MySQL, OpenSearch, TypeSense, Pinecone, Qdrant, Weaviate, Milvus

Semantic search and RAG

Hybrid

Recent plus semantic

Best of both

Isolate memory per user and per conversation:

chat = aiMemory(
    memory: "window",
    key: createUUID(),
    userId: "user123",
    conversationId: "support-ticket-456",
    config: { maxMessages: 10 }
)

Multi-tenant isolation is built in, so one customer's conversation never leaks into another's.

📚 RAG

Retrieval-Augmented Generation grounds answers in your own documents. It reduces hallucinations, keeps knowledge current without retraining, and tracks which sources informed an answer.

A complete RAG system in a few lines:

📥 Document Loaders

Load content from text, Markdown, HTML, CSV, JSON, XML, PDF, logs, HTTP, feeds, SQL queries, whole directories, and web crawlers. Loaders chunk documents and send them straight to memory.

🔍 Go Deeper

Last updated

Was this helpful?