01MEMORY
A large archive, organised
MESA keeps your documents as searchable passages, so the model gets the relevant part, not the whole archive.
Only what matters reaches the model.
See the architecture →OPEN SOURCE · v0.9.3 ALPHA
MESA turns large, scattered document collections into lasting memory for your AI. When a question comes in, it finds what matters, picks the current version and hands it to your model as the right context.
FROM DOCUMENTS TO YOUR MODEL
YOUR DOCUMENTS
policies/contracts/2026/product-notes.mdsupport-tickets/meeting-notes.txtregulations/training/faq.mdMany files, many versions, different teams.
MESA
CONTEXT FOR YOUR MODEL
How many days do customers have to return a product?
policies/returns.txt · v2support-guide.md · v5policies/returns.txt · v2Your model writes the answer from this context.
Illustrative flow, not a live query. See a recorded real run →
THE PROBLEM
A language model only knows what is in front of it. A whole archive does not fit into a prompt, so something has to pick the right passages every time.
01MEMORY
MESA keeps your documents as searchable passages, so the model gets the relevant part, not the whole archive.
Only what matters reaches the model.
See the architecture →02REVISION
When a document changes, searches return the new version once it is processed. The old one stays in history.
MESA numbers every revision.
See it in the example →03SOURCE
Your assistant can show which document and which passage supports what it says.
MESA returns the passage and its document.
How search works →WHAT MESA DOES
Many applications, agents and teams can share one memory. MESA keeps it organised, current and limited to what each of them may read.
Documents are accepted first and processed in the background. Nothing half-written reaches search.
SQLite · LanceDB · KùzuMeaning, exact words, extracted facts and relationships are searched together and combined into one ranking.
vector · BM25 · assertion · graphEach workspace, dataset and agent sees only what it is allowed to. Eligibility is checked before ranking.
tenant · workspace · dataset · agentEvery change becomes a new revision. Search uses the current one; the history stays.
revision · COMMITTEDResults are trimmed to a token budget before they reach the model, with their sources attached.
token budget · evidenceThe CLI, Python SDK, HTTP API and MCP all reach the same memory.
CLI · SDK · HTTP · MCPGood to know: your own model writes the answer. MESA gives it the right text.
YOUR FIRST SUCCESSFUL SEARCH
Install the package and start the server. Word search works without any model account.
pip install mesa-memory==0.9.3
mesa startPython 3.11–3.13 · Linux / macOS · Windows with WSL or Docker
Call MESA from your code. Pick the path that fits your stack.
The legal example adds Turkish legal data and a legal workspace. Both are optional and still in development.
WHERE IT FITS
Wherever large document collections have to feed AI reliably. These are fitting scenarios, not customer references.
Case files, contracts, legislation and court decisions in one memory; every answer points to its passage. MESA Data and MESA Law are being built for this and are still in development.
Procedures, policies and notes from many departments, searched by assistants that only see what each team may read.
Product documents and past tickets give support assistants the current answer, not last year’s.
Regulations and internal rules change; revision history shows which version an answer relied on.
Reports and papers stay searchable by meaning and by exact terms, with the source of every finding.
Agents keep what they learned across sessions and restarts, kept apart per agent and workspace.
THE PROJECTS
BEFORE YOU TRY IT
GET STARTED
$ pip install mesa-memory==0.9.3·Open source · Apache 2.0