MemoshelfMemoshelf
Menu

Memoshelf playbooks

Best ways to give AI agents long-term memory (2026)

Long-term memory means your agent still knows something tomorrow, in a new chat, that it learned today. There are five common ways to get it, and the right one depends on how many agents you run, how many places they run from, and who needs to read what they remember. A plain file is often enough. Memoshelf is ours, and it is listed below with the same honesty as the rest.

What "long-term memory" means in plain words

Every chat starts empty. Long-term memory is anything written down outside the chat that the agent reads before it starts work and adds to before it stops. The memory is only as good as those two habits: read first, write last.

There are two kinds of thing worth remembering. Rules: how you like things done, what never to do. Facts: what happened, what was decided, where the files are. Most options below hold both; they differ in who can read them and from where.

Option 1: a notes or rules file in the project

A text or markdown file your agent reads at the start of a session. Costs nothing, lives with the code, and you edit it yourself.

Fits: one agent, one machine, you in the loop. Strains: several agents or machines keep their own copies and they drift; nothing records which agent changed what. More in the notes-file playbook linked below.

Option 2: the assistant's built-in memory

Many assistants remember things about you across chats on their own. Nothing to set up and it is often good.

Fits: one assistant, used by one person. Strains: it stays inside that one app; a second assistant, or an agent running on a schedule, cannot read it, and you cannot easily see or export all of it. More in the built-in memory playbook linked below.

Option 3: a vector database you run yourself

You store pieces of text as numbers that capture meaning, then ask for the pieces closest in meaning to a question. This is how most "chat with your documents" tools work.

Fits: a developer with a large body of text and a need for meaning-based recall. Strains: you host and tune it, you write the code that decides what to store and when to read, and the result is a search index, not a readable log of what your agents did. Costs range from free self-hosted to a monthly bill.

Option 4: an open-source memory library

Code libraries that give an agent a memory layer, usually a mix of a database and a meaning-based index, with the read-first and write-last habits built in.

Fits: a developer building an agent in code who wants memory as part of that code. Strains: you host it, you keep it updated, and each library has its own shape, so two agents built on different stacks rarely share one memory. Check each project's own page for what it does today.

Option 5: a shared notebook (Memoshelf, ours)

A notebook outside any one app. Each agent gets a lane; every agent you connect reads the same notes, the same pinned "How we work" page, and a run log of what each agent did. Keyword and full-text search, not meaning-match. Export as JSON and markdown from the account page. No code to write: sign in, name the agent, add the connector once.

Fits: a person or small team running a few agents across different apps or machines who wants to read what they remember. Strains: it is not a meaning-based index, so a large document library is a better fit for option 3 or 4; it saves notes, not files.

Which one fits you

Notes fileBuilt-in memoryVector databaseMemory libraryShared notebook (ours)
One agent, one machineYesYesMore than you needMore than you needYes
Several agentsCopies driftNo, one app onlyIf you wire each oneIf each uses the same libraryYes, same lane
Several machines or appsCopies driftNoYes, you host itYes, you host itYes
Who can read the logWhoever opens the fileMostly the assistantWhoever writes a queryWhoever writes a queryYou, on the account page; every agent in the lane
Meaning-based recallNoSomeYesUsuallyNo, keyword search
Code to writeNoneNoneYesYesNone
CostFreeIncludedFree to self-host, or a billFree to self-host, or a billFree tier, paid plans on /pricing

Start with the simplest row that says Yes. Move down only when you feel the strain described above.

Set up the shared notebook for any assistant that can add a custom connector

  1. Sign in to Memoshelf with your email (free plan, no card).
  2. Add Memoshelf to your assistant as a custom connector at https://memoshelf.com/mcp and sign in when asked; pick a name for that agent. That name is its lane.
  3. Paste the block below into the agent's rules or the start of a task.
  4. Open the account page to read what every agent wrote.

Copy this into your AI

Start each session by calling what_happened_last for my lane (lane=YOUR-AI-NAME), and read the pinned "How we work" page it returns before you start work. Before the session ends, call store_note with what you did and what is next, tagged lane:YOUR-AI-NAME.

Check it worked: Start a new chat in a different assistant connected to the same lane and ask: "What did we do last time?" It should answer from your notes.

Start with the Free tier: no card, ever.

New here? Quickstart

Related: