
Memory for AI Agents: What Should You Choose?
Memory for AI agents is a layer that stores preferences, facts, and documents so the agent doesn't have to learn from scratch each session. Which one should you pick? If you want to add memory to your application as quickly as possible, Mem0 is the easy starting point: the mem0ai/mem0 repository has 68,363 stars, Apache-2.0 license (GitHub, read 04/11/2026). If you need an agent to understand each user over time and want to self-host, Honcho is worth trying. If you already have PostgreSQL, pgvector lets you build RAG yourself without adding a new service. A comparison of five choices: Mem0, Honcho, TencentDB Agent Memory, PageIndex and pgvector, across five criteria: memory type, self-hosting, price, difficulty and update level. Star counts and prices read 04/11/2026, subject to change.

Choose by the type of thing you need to remember: users, the experience of your agent team, or long documents. Diagram: OPCAIOS.
Quick comparison table of 5 memory tools for AI agents
The table below compares five memory tools for AI agents by best fit for your needs, starting price read 04/11/2026, self-hosting ability, Vietnamese support and difficulty. All five are open source and self-hostable; Mem0, Honcho and PageIndex also have cloud versions billed by usage.

Logos of the tools in this post, taken from each project's official page.
| Tool | Best for | Starting price (04/11/2026) | Self-host | Vietnamese | Difficulty |
|---|---|---|---|---|---|
| Mem0 | Adding user memory to your app quickly | Open source free; cloud has a Free tier | Yes (Apache-2.0) | Depends on which model you pick, not yet measured | Easy |
| Honcho | Agent understanding each user over time | 2 USD per million input tokens; free 5 USD credit | Yes (AGPL-3.0) | Depends on which model you pick, not yet measured | Medium |
| TencentDB Agent Memory | Shared memory for a team of coding agents | Open source free, you pay for the model | Yes (MIT) | Depends on which model you pick, not yet measured | Medium to hard |
| PageIndex | Q&A on long documents, needs page citations | Local free; cloud has 10 USD credit | Yes (MIT) | Depends on which model you pick, not yet measured | Medium |
| pgvector | Build RAG on your existing PostgreSQL | Free | Yes (PostgreSQL-style license) | Depends on embedding model; OPCAIOS uses multilingual model | Hard |
What criteria did we use to choose?
We chose five memory tools for AI agents by reading README files, licenses and repository data on GitHub, plus official pricing pages on 04/11/2026. OPCAIOS actually uses pgvector; the other four we haven't installed yet. Five criteria:
- Memory type: remembering users (preferences, facts), remembering work experience (skills, processes), or remembering documents (RAG). Read README.
- Self-hosting and license: can you run it on your own server, does the license have restrictions for service provision. Read LICENSE file.
- Price: open source version is free but still costs money to call models; cloud version charged by usage. Read pricing page.
- Difficulty: how many services need to run, do you need Docker, PostgreSQL, model API keys. Assessed from documentation, not yet measured.
- Update level: date of latest code push and star count on GitHub. Read via GitHub API.
Benchmarks in README files are all published by the projects themselves; we note this clearly and have not verified them.
Detailed review of each tool
Each memory tool for AI agent below has a definition, GitHub metrics read on 04/11/2026, homepage screenshot, strengths and limitations. Interface screenshots are only used when the project posts them in README or official documentation.
1. Mem0: best for quickly adding user memory to applications
Mem0 (pronounced "mem-zero") is a memory layer for AI assistants and agents, developed by Mem0 company (Y Combinator S24), Apache-2.0 license. According to GitHub (read on 04/11/2026), the mem0ai/mem0 repository has 68,363 stars, with the most recent code push on 30/10/2026. Mem0 stores memory at three levels: user, session, and agent. You have three ways to use it: Python or npm library to experiment, self-hosted server running with Docker Compose with a dashboard, or cloud platform. According to mem0.ai pricing page, the Free plan has no limit on end users, with the first 30 days offering 10,000 adds and 1,000 retrievals per month when using Mem0's model, or 50,000 adds and 10,000 retrievals when using your own model key; exceeding the limit is charged on a usage basis with a ceiling you set. README mentions LoCoMo score of 92.5 and LongMemEval 94.4 for the April 2026 algorithm; these are numbers published by Mem0 on the cloud platform, unverified, and README states the open-source version does not report identical numbers.

Mem0 homepage (mem0.ai), screenshot on 04/11/2026. Screenshot: OPCAIOS.

Mem0 interface. Image: GitHub mem0ai/mem0 README (docs/images folder).
Strengths: Quick installation via pip or npm. Largest community among the five tools. Has CLI, SDK and skills for coding agents.
Limitations: Advanced features like graph memory are in the Custom cloud plan. Free plan has broad scope only for the first 30 days. Benchmark is from the company.
2. Honcho: best when agents need to understand individual users over time
Honcho is a stateful agent memory infrastructure, developed by Plastic Labs, AGPL-3.0 license. According to GitHub (read on 04/11/2026), the plastic-labs/honcho repository has 7,932 stars, most recent code push on 03/11/2026, server at version 3.5.0. Instead of storing passages and retrieving them later, Honcho reasons from conversations and events to update a "mental model" of each entity: user, agent, group, project. You ask back in natural language or retrieve context to insert into model calls. Honcho has built-in integration with Claude Code, Cursor and any application supporting MCP. According to honcho.dev homepage, the cloud version charges 2 USD per million tokens fed in, context retrieval has no limit, each reasoning query costs from 0.001 to 0.50 USD depending on size; new accounts get 5 USD. Self-hosting requires Docker, or Python 3.13 or later, PostgreSQL with pgvector and a model API key.

Honcho homepage (honcho.dev), screenshot on 04/11/2026. Screenshot: OPCAIOS.
Strengths: Models users rather than just retrieving similar passages. Has cloud and self-host versions. Updates very frequently.
Limitations: AGPL-3.0 requires disclosure of code if you modify and provide as network service. Reasoning costs hard to predict. Concepts of peer, session need learning time.
Read more: What is Honcho?
3. TencentDB Agent Memory: best for shared memory of a coding agent team
TencentDB Agent Memory is a team-level memory center for AI agents released by Tencent Cloud, MIT license per LICENSE file. According to GitHub (read on 04/11/2026), the TencentCloud/TencentDB-Agent-Memory repository created on 07/04/2026, has 30,416 stars, code push on 04/11/2026. The tool turns conversations, documents and code into four types of reusable assets: Chat Memory (preferences, decisions), Skill (versioned processes), Wiki (linked documents) and CodeGraph (symbols, calls, influence paths in code). Connection is very clean: point an agent's address like Claude Code, Codex or Hermes to a Proxy, no plugins, hooks or MCP servers needed. Running requires three services (memory-core, memory-hub, proxy), Node.js from 22.16 and two model parameter sets. README mentions PersonaMem score increased from 48% to 76% when enabled; these are numbers published by Tencent, unverified.

TencentDB Agent Memory homepage (tencentcloud.github.io), screenshot on 04/11/2026. Screenshot: OPCAIOS.

TencentDB Agent Memory interface. Image: GitHub TencentCloud/TencentDB-Agent-Memory README.
Strengths: Remembers experience, documents and code, not just conversations. Connects via Proxy, no agent modification. Has private, team and restricted permissions.
Limitations: Must run three services. New project, changes rapidly, already has data migration tools between major versions. Proxy sits between agent and model so sees all content.
Read more: What is TencentDB Agent Memory?
4. PageIndex: best for question-answering long documents needing citations
PageIndex is a vector-free RAG tool, developed by Vectify AI, MIT license. According to GitHub (read on 04/11/2026), the VectifyAI/PageIndex repository has 39,975 stars, code push on 03/11/2026. Instead of splitting documents into chunks then retrieving by similarity, PageIndex builds a tree-shaped index for each document, then lets the model reason its way through the tree like someone reading and opening the right section of a long report. Retrieved results point to specific pages, suited for financial reports, legal texts, technical manuals. PageIndex is not conversation memory; it is document memory for agents. According to pageindex.ai/developer page, local version is free and uses your model key; cloud version gives 10 USD free, charges 0.01 USD per page when indexing and 0.001 USD per active page per month, first 1,000 pages free. The claim of "97% reduction in token costs" for Page Search API is published by Vectify AI, unverified.

PageIndex homepage (pageindex.ai), screenshot on 04/11/2026. Screenshot: OPCAIOS.
Strengths: No vector database or chunking needed. Returns retrieved results with page numbers. Free local version.
Limitations: Each question costs a model reasoning turn, slower and pricier than vector search for large repos. Suits long structured documents, poor for scattered notes. Does not store user preferences.
Read more: What is PageIndex?
5. pgvector: best when you want to build RAG yourself on existing PostgreSQL
pgvector is an open-source extension for PostgreSQL, adding vector data type and similarity search, licensed under PostgreSQL License per LICENSE file. According to GitHub (read on 04/11/2026), the pgvector/pgvector repository has 23,577 stars, code push on 03/11/2026, README instructs install of v0.8.7 for PostgreSQL 13 and later. pgvector supports exact and approximate search, single vectors, half precision, binary and sparse, plus many distance types like cosine, L2, dot product. The biggest advantage is storing vectors next to other data, using JOIN, ACID transactions and backups like any PostgreSQL table. pgvector remembers nothing by itself: you must write the document chunking step, create vectors with an embedding model, store and query them. Even Honcho needs PostgreSQL with pgvector when self-hosting. If unfamiliar with concepts, read the post on vector databases and embeddings first.

pgvector/pgvector GitHub page (github.com), screenshot on 04/11/2026. Screenshot: OPCAIOS.
Strengths: Free, adds no service if you already have PostgreSQL. Data lives in one place, easy to backup. Stable, updates regularly.
Limitations: Only storage layer, must write entire RAG pipeline yourself. Embedding model choice and chunking method strongly affect quality. Very large repos need index tuning.
Read more: What are vector databases and embeddings?
Which tool should you choose? By situation
Choose memory for your AI agent based on what you need the agent to remember, not by star ratings. The table below suggests tools by common situation, based on documents read on 04/11/2026; test on small data first before deploying to your real system.
| Situation | Suggestion | Reason |
|---|---|---|
| Customer care chatbot needs to remember each person's preferences | Mem0 | Per-user memory, quick setup, has a Free plan |
| Personal assistant needs to understand how the user changes over time | Honcho | Reasoning layer about each individual |
| Many coding agents work on one project together, want to share experience | TencentDB Agent Memory | Skill, Wiki, CodeGraph shared via Proxy |
| Contract Q&A, long reports need to point to page | PageIndex | Tree index, page retrieval |
| Already have PostgreSQL, want RAG on notes and blog posts | pgvector | No extra service, data in one place |
| New to this, using Claude Code alone | CLAUDE.md file and notes | Don't need a separate memory system yet |
Example (hypothetical): someone running an online course wants an assistant to answer students. First, they put the curriculum into pgvector to answer content questions. Next, they add Mem0 to remember which lesson each student is on. Finally, they measure if answers are correct before opening to students.
Risks and common notes
The main risk of AI agent memory is saving the wrong thing, saving too much, or leaking personal data. These five notes apply to all five tools.
- Personal data: user memory contains preferences, history, sometimes sensitive information. You need a policy to delete on request and limit who can read. Legal is reference only, not legal advice.
- Data goes through cloud model: even if you self-host, the extraction and reasoning steps still send content to the model provider you configure.
- Wrong memory spreads itself: a misremembered "fact" will be repeated in every session after. You need a way to view and fix memory.
- Prompt injection: stored documents or conversations may contain commands aimed at the agent; treat memory content as data.
- License and hidden cost: Honcho's AGPL-3.0 means you must publish code when you provide modified versions over the network; all tools cost money in model calls and server.
OPCAIOS experience
OPCAIOS uses real PostgreSQL with pgvector as a knowledge store for RAG, with a 384-dimension multilingual embedding model to find Vietnamese content. Our main knowledge store is still Obsidian; pgvector is the search layer for large documents. Agent-specific short-term memory is currently paused, so we have no results to compare with Mem0 or Honcho, and we haven't set up these two tools. Every day we run many Claude Code subagents in parallel; this post was written that way too; shared context is kept through instruction files and status notes instead of a separate memory system. Our lesson: with one operator, clear note files are often enough before you need a memory service. We haven't measured retrieval accuracy by numbers.
Read more: What is RAG?, What is context engineering?, What is CLAUDE.md?, Best second brain tools.
Frequently Asked Questions
How is memory for AI agents different from RAG?
RAG (Retrieval-Augmented Generation) is about finding relevant document passages and putting them into the prompt for the model. Memory for AI agents is broader: beyond documents, it stores user preferences, decisions made, work experience, and updates them over time. pgvector and PageIndex lean toward document RAG. Mem0 and Honcho lean toward user memory. TencentDB Agent Memory combines both, plus Skill and CodeGraph for coding agent teams. Many real systems use a combination: RAG for documents, a memory layer for users.
Which tool is best for beginners?
For someone new to building applications, Mem0 is the easiest starting point: install via pip or npm, has a free tier on the cloud and extensive documentation, according to README and pricing page read on 04/11/2026. If you only use Claude Code or Codex by itself and don't build applications, you may not need any tool yet: a CLAUDE.md or AGENTS.md file documenting project conventions, plus notes in Obsidian, is often enough. Only add a memory system when you see the agent repeating the same error because it forgot context.
Are there any free and self-hosted tools?
Yes, all five tools in the post are open source and can be self-hosted: Mem0 (Apache-2.0), Honcho (AGPL-3.0), TencentDB Agent Memory (MIT), PageIndex (MIT) and pgvector (PostgreSQL-style license), according to GitHub read on 04/11/2026. Free software doesn't mean free to run. You still pay for servers and for the models you use to extract, embed, and reason, unless you run models locally. Honcho and Mem0 need a model API key when self-hosted according to README.
Does memory for AI agents understand Vietnamese?
Vietnamese capability depends mainly on the language model and embedding model you configure, not the memory tool itself. We have not measured Vietnamese on Mem0, Honcho, TencentDB Agent Memory, or PageIndex. With pgvector, OPCAIOS uses a 384-dimensional multilingual embedding model to find Vietnamese content in the knowledge base, but have not measured accuracy numerically. When trying it, prepare 20 to 30 Vietnamese questions with known answers to self-check before trusting the results.
Are benchmarks in README trustworthy?
Benchmarks in README are numbers published by the projects themselves, so should only be read as an initial signal. Mem0 cites LoCoMo 92.5 and notes it is on a cloud platform with its own optimizations; TencentDB Agent Memory cites PersonaMem rising from 48% to 76%; PageIndex cites 97% token cost reduction. OPCAIOS has not verified these numbers. The best way is to try it on your own data and questions, measure the number of correct answers and cost per question. To learn how to build and test AI workflows like this, see OPCAIOS's AI application training course.
Source: GitHub and README from mem0ai/mem0, plastic-labs/honcho, TencentCloud/TencentDB-Agent-Memory, VectifyAI/PageIndex, pgvector/pgvector; mem0.ai/pricing, honcho.dev, pageindex.ai/developer (read on 04/11/2026). Not read/not verified: benchmarks published by projects, Mem0 custom tier cloud pricing, Honcho has no separate pricing page yet (price taken from homepage), Vietnamese capability of four tools other than pgvector; prices and star count may change. Experience is OPCAIOS's.
Translated from Vietnamese with AI. Read the original.
Want to apply this in your business?
Book a free 30-minute call (Vietnam time, in English or Vietnamese).


