Chatbot Memory on GitHub: Open-Source Repos (2026)

8 min read

A checked list of GitHub repos for chatbot memory: chat apps with built-in memory, memory libraries and templates, with license, stars, latest release and how each one remembers.

Chatbot memory on GitHub falls into three groups: chat apps you self-host that already remember users (Open WebUI, LibreChat, LobeHub, SillyTavern), memory libraries you add to your own bot (Mem0, Letta, Graphiti, Memobase, Hindsight and others), and templates that show the pattern in a few files. Licenses range from MIT to AGPL to custom terms, so check before you ship.

Every repo below was checked through the GitHub API on 25 October 2026 (stars, license, latest release). Stars are rounded and measure attention, not quality. For a deeper comparison of memory engines only, see open-source AI memory systems compared.

What is chatbot memory?

Chatbot memory is any mechanism that lets a chatbot use information from earlier conversations in a new one. Because language models are stateless, the app stores facts, summaries or past messages outside the model, then retrieves the relevant pieces and adds them to the prompt before each reply.

There are three common designs. A profile or key-value store keeps short facts like “prefers metric units.” Summaries compress old chat into a running note. Retrieval embeds past messages or facts and searches them by similarity. Most of the projects below combine two of these. The guide to adding memory to a chatbot walks through each design.

Self-hosted chat apps with built-in memory

These are full chat interfaces. You run them, connect a model, and memory is a setting.

RepoLicenseStarsLatest releaseHow memory works
open-webui/open-webuiOpen WebUI License (BSD-3 based, branding clause)~157,000v0.12.4, 25 Oct 2026Per-user memories in Settings > Personalization; models use add_memory, search_memories and related tools
LibreChat-AI/LibreChatMIT~46,300v0.8.8, 1 Oct 2026Key/value memory configured in librechat.yaml; a memory agent extracts entries, and since v0.8.8 agents can save memories inline and keep their own pool
lobehub/lobehubLobeHub Community License (Apache-2.0 plus conditions)~83,500v2.2.20, 18 Oct 2026Memory plugin per assistant; memories with tags and weights in a memory panel
SillyTavern/SillyTavernAGPL-3.0~34,9001.19.0, 14 Sep 2026Summarize extension, chat vectorization, Data Bank (RAG) and World Info lorebooks

Open WebUI. An admin enables memories globally (ENABLE_MEMORIES or the admin Features panel), and users manage entries under Settings > Personalization > Memory. Saved memories are injected into the system context by default, and models with native function calling can add, update, search and delete them through built-in tools. The memory docs warn that quality “depends heavily on the model.” Run 0.11.4 or later: before it, switching Memories off only hid the feature, and saved memories were still added to every chat’s system prompt (PR #30228). v0.12.1 (14 October) also gives automations the memory tools when the user has memory on. If you change embedding models, use v0.12.2 or later: reindexing memories used to send one embedding request per memory all at once, and rate-limited providers failed most of them with 429 errors; it now follows the embedding concurrency and batch settings. v0.12.3 fixed the Memory tool switching itself back off for a model that had turned it on (PR #32504). License note: clause 4 forbids removing Open WebUI branding in deployments with more than 50 users in a 30-day period, unless you have permission or an enterprise license.

LibreChat. Memory is off until you add a memory: block to librechat.yaml. You set a tokenLimit, allowed categories with validKeys, and an agent with a provider and model that reads recent messages and writes new entries. Per the LibreChat memory docs, it’s “a key/value store, not semantic search over conversation history,” and with personalize: true users can toggle it per chat.

Since v0.8.8 (1 October 2026), memory is also an agent capability. An agent with Memory turned on gets inline set_memory and delete_memory tools, so it can save a fact mid-reply instead of waiting for the post-turn memory agent (PR #13869). A “Keep memories separate for this agent” toggle gives that agent its own memory pool per user, so a coding agent and a support agent stop reading each other’s notes (PR #14084). Existing memories stay in the shared personal pool with no migration.

LobeHub (formerly LobeChat). Agent Memory is a built-in plugin you enable per assistant. It extracts key information into a structured memory base that you can search, edit and delete. v2.2.20 (18 October 2026) adds “distill from material”: paste text or pick a file, document or past conversation, and it proposes up to 20 rules for you to review before saving, each linked to the passage it came from (PR #20266). The license lets you run it commercially unmodified, but distributing a derivative work needs a commercial license.

SillyTavern. The roleplay favorite has no single memory feature. The Summarize extension keeps a running summary (the docs warn it can lose details or hallucinate). Chat vectorization pulls older, relevant messages back into the prompt. World Info inserts lore entries when keywords appear, or by vector similarity. See the SillyTavern docs.

Memory libraries for your own chatbot

If you’re writing the bot yourself, a library handles extraction, storage and retrieval. Stars and releases as of 25 October 2026, from the GitHub API.

RepoLicenseStarsLatest releaseMemory modelGood for
mem0ai/mem0Apache-2.0~67,800v2.2.1, 25 SepLLM-extracted facts per user, session or agent; hybrid searchDrop-in user memory for chat apps
vectorize-io/hindsightMIT~53,600v1.1.0, 21 OctRetain, recall and reflect over memory banks; facts consolidated into evidence-backed observations; every feature in the open-source serverLong-running assistants, coding agents, agents that learn
topoteretes/cogneeApache-2.0~32,700v1.6.6rc1, 23 OctKnowledge graph plus vectorsBots grounded in documents and chats
getzep/graphitiApache-2.0~32,200v0.31.2, 20 OctTemporal knowledge graph; facts have validity windowsFacts that change over time
supermemoryai/supermemoryMIT~31,400server-v0.0.9, 12 OctMemory, RAG and user profiles behind one APIMemory plus connectors
letta-ai/lettaApache-2.0~25,3000.16.8, 14 MayAgents that edit their own memory blocks (MemGPT design)Stateful agents; new work is in letta-code
plastic-labs/honchoAGPL-3.0~7,900v3.5.0, 30 OctModels users and agents (“peers”) over timeUser modeling, multi-party chats
memodb-io/memobaseApache-2.0~2,900none on GitHub; last push 11 JanUser profiles and event timelinesChatbots that need fast profile reads
langchain-ai/langmemMIT~1,700none on GitHub; last push 2 OctMemory tools and background managerLangGraph chatbots

The release column is the quickest activity check. Letta’s letta server hasn’t tagged a release since May, and Memobase and LangMem publish none on GitHub, while Honcho v3.4.0 (22 October) added opt-in “working memory” briefs for its background dreamer, off by default, and v3.4.1 (27 October) fixed how wildcards inside filters match (details).

Memobase describes itself as “User Profile-Based Long-Term Memory for AI Chatbot Applications,” which makes it the most chatbot-specific of the group; its last push was January 2026, so check activity before relying on it. Hindsight is the pick when users stay for months: on the long-history BEAM test it scores 73.9 at 1M tokens and 64.1 at 10M, versus Mem0’s 64.1 and 48.6 (Mem0’s comparison, vendor-run), and its hindsight-litellm wrapper adds memory to an existing OpenAI or Anthropic client in two lines. It returns more context per recall than Mem0, so set max_tokens. Letta’s older letta repo holds most of its stars, but the project’s current development is the Letta Code harness; the Letta guide explains the change.

Templates and research code

Smaller repos that are useful to read:

Minimal chatbot memory loop in Python

This is the pattern from Mem0’s README: search memories before the reply, save the exchange after. It uses Mem0’s default OpenAI models, so set OPENAI_API_KEY.

 1from openai import OpenAI
 2from mem0 import Memory
 3
 4client = OpenAI()
 5memory = Memory()
 6
 7def chat(message: str, user_id: str) -> str:
 8    # 1. Recall: find memories relevant to this message
 9    found = memory.search(query=message, filters={"user_id": user_id}, top_k=3)
10    notes = "\n".join(f"- {m['memory']}" for m in found["results"])
11
12    # 2. Respond with the memories in the system prompt
13    messages = [
14        {"role": "system", "content": f"You are a helpful assistant.\nUser memories:\n{notes}"},
15        {"role": "user", "content": message},
16    ]
17    reply = client.chat.completions.create(model="gpt-5-mini", messages=messages)
18    answer = reply.choices[0].message.content
19
20    # 3. Retain: extract and store new facts from this exchange
21    messages.append({"role": "assistant", "content": answer})
22    memory.add(messages, user_id=user_id)
23    return answer
24
25print(chat("I'm vegetarian and live in Lisbon.", user_id="ana"))
26print(chat("Suggest a dinner spot near me.", user_id="ana"))

Swap in any library from the table and the shape stays the same: recall, respond, retain.

How to choose a chatbot memory repo

  1. Need a chat UI today? Start with Open WebUI or LibreChat; both are self-hosted and have per-user memory.
  2. Building roleplay or fiction? SillyTavern’s summaries and lorebooks fit better than fact extraction.
  3. Writing your own bot? Use a library. Mem0 is the most common starting point; Graphiti suits facts that change; Hindsight suits long histories and agents that learn from experience, and Letta suits agents that manage their own memory.
  4. Check the license against how you’ll ship. AGPL and custom licenses matter if you host it for others.
  5. Check activity. Look at the last push date and open issues, not just stars.
  6. Test on your own chats before committing; the LLM memory comparison lists published benchmark results and their caveats.