gharibyan/agent-memory — explained in plain English
Analysis updated 2026-05-18
Add persistent, per-user memory to a chatbot without manually stuffing chat history into every prompt.
Store agent memory locally as JSON for prototypes, then switch to SQLite or Postgres with pgvector for production.
Cap how much stored memory context gets injected per call to control token costs.
Connect the same memory system to OpenAI, Anthropic, Gemini, xAI, or any OpenAI-compatible model provider.
| gharibyan/agent-memory | akaakshat246/ecoscore-browser-extension | andrelog99/dam | |
|---|---|---|---|
| Stars | 16 | 16 | 16 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | easy | hard | easy |
| Complexity | 3/5 | 3/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Defaults to local JSON storage with no setup, SQLite and Postgres/pgvector adapters need extra configuration for production use.
This is a TypeScript library called agent-memory-sdk, available as a single npm package, that adds persistent memory to AI agent applications. When you build a chatbot or AI assistant, one common problem is that the AI has no way to remember past conversations unless you manually paste the entire chat history into every new request. This library wraps your model calls so that memory is stored, recalled, and updated automatically, without you having to manage that history yourself. The memory system is organized into layers. User memory is tied to a specific person and persists across all their sessions. Thread memory covers a single conversation. Operation memory holds compact context for a specific task or workflow. You can set a budget to limit how much stored context gets injected into any one call, which keeps token costs under control. You can also turn off recall or learning for individual calls when you need a clean slate. For storing the memories, the library defaults to a local JSON file on disk, which is fine for prototypes. It also ships adapters for SQLite (a lightweight local database) and for Postgres with pgvector, which is a Postgres extension that enables vector search. The Postgres adapter handles its own database migrations automatically on first use, including creating the search index and relational tables. The library works with several AI model providers. Official adapters are included for OpenAI, Anthropic, Gemini, and xAI. There is also a generic helper for any provider that exposes an OpenAI-compatible chat API, so you can point it at custom or third-party model endpoints by supplying a base URL and API key. Internally the repository is split into multiple packages covering the core engine, each storage adapter, and each provider adapter, but all of those are compiled and bundled together into the single public npm package. End users install one package and get everything. The project is open source under the MIT license.
agent-memory-sdk is a TypeScript library that gives AI agents automatic, persistent memory scoped by user, thread, or task, so apps do not have to manually re-send full chat history.
Mainly JavaScript. The stack also includes TypeScript, Node.js, SQLite.
MIT license: free to use, modify, and distribute, including commercially, as long as the copyright notice is kept.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.