[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72409":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":16,"starSnapshotCount":16,"syncStatus":39,"lastSyncTime":40,"discoverSource":41},72409,"memobase","memodb-io\u002Fmemobase","memodb-io","User Profile-Based Long-Term Memory for AI Chatbot Applications. ","https:\u002F\u002Fmemobase.io",null,"Python",2748,219,18,23,0,5,10,30,15,29.03,"Apache License 2.0",false,"main",[26,27,28,29,30,31,32,33,34,35],"ai-companion","ai-memory","chatgpt","llm-application","llm-memory","long-term-memory","memory","rag","retrieval","user-memory","2026-06-12 02:03:02","\u003Cdiv align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fmemobase.io\">\n    \u003Cpicture>\n      \u003Cimg alt=\"Memobase logo\" src=\".\u002Fassets\u002Fimages\u002Flogo.png\" width=\"80%\">\n    \u003C\u002Fpicture>\n  \u003C\u002Fa>\n  \u003Ch1>Memobase\u003C\u002Fh1>\n  \u003Cp>\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fmemobase\u002F\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fmemobase.svg\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@memobase\u002Fmemobase\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@memobase\u002Fmemobase.svg?logo=npm&logoColor=fff&style=flat&labelColor=2C2C2C&color=28CF8D\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fjsr.io\u002F@memobase\u002Fmemobase\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fjsr\u002Fv\u002F@memobase\u002Fmemobase.svg?logo=jsr&logoColor=fff&style=flat&labelColor=2C2C2C&color=28CF8D\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fmemodb-io\u002Fmemobase\u002Fsrc\u002Fclient\u002Fmemobase-go\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fgo-reference-blue?logo=go&logoColor=fff&style=flat&labelColor=2C2C2C&color=28CF8D\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\".\u002Fsrc\u002Fmcp\">\n       \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FMCP-Memobase-green\">\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n  \u003Cp>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmemodb-io\u002Fmemobase\u002Factions\u002Fworkflows\u002Fpublish.yaml\">\n      \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fmemodb-io\u002Fmemobase\u002Factions\u002Fworkflows\u002Fpublish.yaml\u002Fbadge.svg\">\n    \u003C\u002Fa>\n        \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Forgs\u002Fmemodb-io\u002Fpackages?repo_name=memobase\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Ftag\u002Fmemodb-io\u002Fmemobase\">\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n  \u003Cp>\n    \u003Ca href=\"https:\u002F\u002Fapp.memobase.io\u002Fplayground\">\n       \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FMemobase-Playground-blue\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FYdgwU4d9NB\">\n      \u003Cimg src=\"https:\u002F\u002Fdcbadge.limes.pink\u002Fapi\u002Fserver\u002FYdgwU4d9NB?style=flat\">\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\n\n\n## News\n\n- 🚀 Meet [Acontext](https:\u002F\u002Fgithub.com\u002Fmemodb-io\u002FAcontext), Context Data Platform that Improves your Agent with Experiences.\n\n\n\n\n\nMemobase is a **user profile-based memory system** designed to bring long-term user memory to your LLM applications. Whether you're building virtual companions, educational tools, or personalized assistants, Memobase empowers your AI to **remember**,  **understand**, and **evolve** with your users.\n\n\n\nMemobase offers the perfect balance for your product among various memory solutions. At Memobase, we focus on three key metrics simultaneously:\n\n- **Performance**: Although Memobase is not specifically designed for RAG\u002Fsearch tasks, it still achieves top-tier search performance in the LOCOMO benchmark.\n- **LLM Cost**: Memobase includes a built-in buffer for each user to batch-process their chats, allowing the overhead to be distributed efficiently. Additionally, we carefully design our prompts and workflows, ensuring there are no \"agents\" in the system that could lead to excessive costs.\n- **Latency**: Memobase works similarly to the memory system behind ChatGPT: for each user, there is always a user profile and event timeline available. This allows you to access the most important memories of a user without any pre-processing, but only few SQL operations, keeping online latency under 100ms.\n\n\n\nCheck out the profile [result](.\u002Fdocs\u002Fexperiments\u002F900-chats\u002Freadme.md) (compared with [mem0](https:\u002F\u002Fgithub.com\u002Fmem0ai\u002Fmem0)) from a 900-turns real-world chatting:\n\n\u003Cdetails>\n\u003Csummary>Partial Profile Output\u003C\u002Fsummary>\n\n\n\n```python\n{\n  \"basic_info\": {\n    \"language_spoken\": [\"English\", \"Korean\"],\n    \"name\": \"오*영\"\n  },\n  \"demographics\": {\n    \"marital_status\": \"married\"\n  },\n  \"education\": {\n    \"notes\": \"Had an English teacher who emphasized capitalization rules during school days\",\n    \"major\": \"국어국문학과 (Korean Language and Literature)\"\n  },\n  \"interest\": {\n    \"games\": \"User is interested in Cyberpunk 2077 and wants to create a game better than it\",\n    \"youtube_channels\": \"Kurzgesagt\",\n    ...\n  },\n  \"psychological\": {...},\n  \"work\": {\"working_industry\": ..., \"title\": ..., },\n  ...\n}\n```\n\n\u003C\u002Fdetails>\n\n## 🎉 Recent Updates\n- `0.0.40`: we updated the internal workflows in Memobase, reducing the number of LLM calls in a single run from approximately 3-10 times to a fixed 3 times, which reduces token costs by approximately 40-50%. (Consider updating your Memobase version!)\n- `0.0.37`: we added fine-grained event gist, enabling the detailed search on users' timeline. [Re-ran the LOCOMO benchmark](.\u002Fdocs\u002Fexperiments\u002Flocomo-benchmark) and we're SOTA!\n- `0.0.36`: we updated the search of `context` api, making the search take between 500~1000ms (depending on the embedding API you're using). Also, you can [pass a prompt template](https:\u002F\u002Fdocs.memobase.io\u002Fapi-reference\u002Fprompt\u002Fget_context#parameter-customize-context-prompt) to the `context` api to pack memories directly into prompt.\n\n\n\n## 📖 Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Core Features](#core-features)\n- [Get Started](#get-started)\n- [Step-by-step breakdown](#step-by-step-breakdown)\n  - [1. Make sure you're connected](#1-make-sure-youre-connected)\n  - [2. Manage Users](#2-manage-users)\n  - [3. Insert Data](#3-insert-data)\n  - [4. Get your Memory](#4-get-your-memory)\n  - [5. Integrate memory into your prompt](#5-integrate-memory-into-your-prompt)\n- [What's next?](#whats-next)\n- [Why\u002FWhere should I use Memobase?](#whywhere-should-i-use-memobase)\n  - [Remember the users](#remember-the-users)\n  - [User analysis and tracking](#user-analysis-and-tracking)\n  - [Sell something to your customers.](#sell-something-to-your-customers)\n- [Documentation](#documentation)\n- [Stay Updated](#stay-updated)\n- [Support](#support)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Core Features\n\n**🎯 Memory for User, not Agent**\n\nDefine and control exactly what user information your AI captures. \n\n📈 **SOTA**\n\nCheck out performance on [public benchmark](.\u002Fdocs\u002Fexperiments\u002Flocomo-benchmark) against mem0, langmem, zep...\n\n📅 **Time-aware Memory**\n\nMemobase has more than user profiles, it also records [user event](https:\u002F\u002Fdocs.memobase.io\u002Ffeatures\u002Fevent\u002Fevent). User event is essential to answer time-related question, see how we can [improve temporal memory much better](.\u002Fdocs\u002Fexperiments\u002Flocomo-benchmark\u002FREADME.md#Result) than other memory solutions.\n\n**🖼️ Controllable Memory**\n\nAmong all types of memory, only some may enhance your product experience. Memobase offers a flexible configuration for you to [design the profile](https:\u002F\u002Fdocs.memobase.io\u002Ffeatures\u002Fprofile\u002Fprofile).\n\n**🔌 Easy Integration**\n\nMinimal code changes to integrate with your existing LLM stack with [API](https:\u002F\u002Fdocs.memobase.io\u002Fapi-reference\u002Foverview), [Python](https:\u002F\u002Fpypi.org\u002Fproject\u002Fmemobase\u002F)\u002F[Node](.\u002Fsrc\u002Fclient\u002Fmemobase-ts\u002FREADME.md)\u002F[Go](.\u002Fsrc\u002Fclient\u002Fmemobase-go\u002FREADME.md) SDK.\n\n**⚡️ Batch-Process**:\n\nMemobase offers every user a buffer to batch processing the chats after the conversation. Fast & Cheap.\n\n**🚀 Production Ready**\n\nMemobase is building with FastAPI, Postgres and Redis, supporting request caching, authing, telemetry... [Fully dockerized](.\u002Fsrc\u002Fserver\u002Freadme.md).\n\n\n\n\u003Cdiv align=\"center\">\n    \u003Cpicture>\n      \u003Cimg alt=\"Memobase Workflow\" src=\".\u002Fassets\u002Fimages\u002Fstarter.png\" width=\"80%\">\n    \u003C\u002Fpicture>\n  \u003Cp>How Memobase works?\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n\n\n\n## Get Started\n\n> [!NOTE]\n>\n> Try [Memobase Playground](https:\u002F\u002Fapp.memobase.io\u002Fplayground) to see how profile-based memory works — no setup needed.\n> * **Visualize** how user profiles and memory events evolve over time.\n> * **Interact** with the memory mechanism directly.\n> * **Explore** key features and concepts in a live environment.\n> Watch the demo below — see how memory evolves around user profiles.\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Feb2eea30-48bc-4714-9706-e417ae1931df\n\n\n\n\n1. [Start your Memobase server locally](.\u002Fsrc\u002Fserver\u002Freadme.md). If you don't want to be bothered, Memobase Cloud provides [a free tier](https:\u002F\u002Fwww.memobase.io\u002Fen\u002Flogin) enough for your testing\n2. You should have the below two things to continue:\n   1. A project url. (local: `http:\u002F\u002Flocalhost:8019` , cloud `https:\u002F\u002Fapi.memobase.dev`)\n   2. A project token. (local: `secret` , cloud `sk-proj-xxxxxx`)\n3. Install the Python SDK: `pip install memobase`\n4. Below tutorial is for Python User. For other language and API, check [this](https:\u002F\u002Fdocs.memobase.io\u002Fquickstart).\n\n\n\n## Step-by-step breakdown\n\n> [!TIP]\n>\n> - You can just run this equivalent [quickstart script](.\u002Fassets\u002Fquickstart.py)\n>\n> - Or you can keep things super easy by using [OpenAI SDK with Memobase.](https:\u002F\u002Fdocs.memobase.io\u002Fpractices\u002Fopenai), [Ollama with Memobase](.\u002Fassets\u002Ftutorials\u002Follama+memobase).\n>\n> - Looking for [MCP](https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol)? Memobase-MCP is also [available](.\u002Fsrc\u002Fmcp)\n\n### 1. Make sure you're connected\n\n ```python\n from memobase import MemoBaseClient, ChatBlob\n \n client = MemoBaseClient(\n     project_url=PROJECT_URL,\n     api_key=PROJECT_TOKEN,\n )\n assert client.ping()\n ```\n\n### 2. Manage Users\n\n```python\nuid = client.add_user({\"any_key\": \"any_value\"})\nclient.update_user(uid, {\"any_key\": \"any_value2\"})\nu = client.get_user(uid)\nprint(u)\n\n# client.delete_user(uid)\n```\n\n### 3. Insert Data\n\n> In Memobase, all types of data are blobs for a user, which can be inserted, retrieved, and deleted:\n\n```python\nmessages = [\n  {\n      \"role\": \"user\",\n      \"content\": \"Hello, I'm Gus\",\n  },\n  {\n      \"role\": \"assistant\",\n      \"content\": \"Hi, nice to meet you, Gus!\",\n  }\n]\nbid = u.insert(ChatBlob(messages=messages))\nprint(u.get(bid)) # not found once you flush the memory.\n\n# u.delete(bid)\n```\n\n> By default, Memobase will remove the blobs once they're processed. This means that apart from the relevant memory, your data will not be stored with Memobase. You can persist the blobs by adjusting the [configuration file](https:\u002F\u002Fdocs.memobase.io\u002Ffeatures\u002Fcustomization\u002Ffull#storage-config).\n\n### 4. Get your Memory\n\n```python\nu.flush(sync=True)\n```\n> By default, Memobase will flush the buffer asynchronously. You can set `sync=True` to wait for the buffer to be processed.\n\nAnd what will you get?\n\n```python\nprint(u.profile(need_json=True))\n\n# results\n{\n  \"basic_info\": {\n    \"name\": {\n      \"content\": \"Gus\",\n      \"id\": ...,\n      \"created_at\": ...\n    }\n  }\n}\n```\n\n`u.profile()` will return structured profiles that are learned from this user, including `topic`, `sub_topic` and `content`. As you insert more blobs, the profile will become better.\n\n\u003Cdetails>\n\u003Csummary> Why need a flush?\u003C\u002Fsummary>\n\nIn Memobase, we don't memoize users in [hot path](https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fconcepts\u002Fmemory\u002F#writing-memories-in-the-hot-path). We use buffer zones for the recent inserted blobs.\n\nWhen the buffer zone becomes too large (e.g., 1024 tokens) or remains idle for an extended period (e.g., 1 hour), Memobase will flush the entire buffer into memory.  Alternatively, you can use `flush()` manually decide when to flush, such as when a chat session is closed in your app.\n\u003C\u002Fdetails>\n\n\n\n### 5. Integrate memory into your prompt\n\nMemobase has a `context` api to pack everything you need into a simple string, where you can insert it into your prompt directly:\n\n```python\nprint(u.context(max_token_size=500, prefer_topics=[\"basic_info\"]))\n```\n\nSomething like:\n\n```\n# Memory\nUnless the user has relevant queries, do not actively mention those memories in the conversation.\n## User Background:\n- basic_info:name: Gus\n...\n\n## Latest Events:\n...\n```\n\nCheckout the detail params [here](https:\u002F\u002Fdocs.memobase.io\u002Fapi-reference\u002Fprompt\u002Fget_context).\n\n## What's next?\n\n- **Run script**: Checkout the [quickstart script](.\u002Fassets\u002Fquickstart.py) for more details\n- **Design your profile!**: You may want to explore the [customization](https:\u002F\u002Fdocs.memobase.io\u002Ffeatures\u002Fprofile\u002Fprofile) of Memobase to make sure the system works as your expectation.\n- **Full-stack Chatbot with Memobase**: Check [Memobase-Playground](https:\u002F\u002Fgithub.com\u002Fmemodb-io\u002Fmemobase-playground). An open-source, full-stack template AI Chatbot with long-term memory. [live-demo](https:\u002F\u002Fapp.memobase.io\u002Fplayground)\n- **Web UI for Memobase**: Check [Memobase-Inspector](https:\u002F\u002Fgithub.com\u002Fmemodb-io\u002Fmemobase-inspector). An open-source UI for your Memobase project with user table, usage chart and test playground. [live-demo](https:\u002F\u002Fapp.memobase.io\u002Finspector)\n\n\n\n## Why\u002FWhere should I use Memobase?\n\n### Remember the users \n\nBy placing profiles into your AI (*e.g.* system prompt).\n\n\u003Cdetails>\n\u003Csummary>Demo\u003C\u002Fsummary>\n\n\n```python\nPROFILES = \"\\n\".join([p.describe for p in u.profile()])\n\nprint(PROFILES)\n# basic_info: name - Gus\n# basic_info: age - 25\n# ...\n# interest: foods - Mexican cuisine\n# psychological: goals - Build something that maybe useful\n# ...\n```\n\n\u003C\u002Fdetails>\n\n### User analysis and tracking\n\nToo much information is hidden in the conversations between users and AI, that's why you need a new data tracking method to record user preference and behavior.\n\n\u003Cdetails>\n\u003Csummary>Demo\u003C\u002Fsummary>\n\n\n```python\nPROFILES = u.profile()\n\ndef under_age_30(p):\n  return p.sub_topic == \"age\" and int(p.content) \u003C 30\n\ndef love_cat(p):\n  return p.topic == \"interest\" and p.sub_topic == \"pets\" and \"cat\" in p.content\n\nis_user_under_30 = (\n    len([p for p in profiles if under_age_30(p)]) > 0\n)\nis_user_love_cat = (\n  len([p for p in profiles if love_cat(p)]) > 0\n)                       \n...\n```\n\u003C\u002Fdetails>\n\n### Sell something to your customers.  \n\nNot everyone is looking for Grammarly, it's always nice to sell something your users might want. \n\n\u003Cdetails>\n\u003Csummary>Demo\u003C\u002Fsummary>\n\n\n```python\ndef pick_an_ad(profiles):\n  work_titles = [p for p in profiles if p.topic==\"work\" and p.sub_topic==\"title\"]\n  if not len(work_titles):\n    return None\n  wt = work_titles[0].content\n  if wt == \"Software Engineer\":\n    return \"Deep Learning Stuff\"\n  elif wt == \"some job\":\n    return \"some ads\"\n  ...\n```\n\u003C\u002Fdetails>\n\n\n\n## Documentation\n\nFor detailed usage instructions, visit the [documentation](https:\u002F\u002Fdocs.memobase.io\u002F). \n\n\n\n## Stay Updated\n\nStar Memobase on Github to support and receive instant notifications!\n\n![click_star](.\u002Fassets\u002Fimages\u002Fclick.gif)\n\n\n\n## Support\n\nJoin the community for support and discussions:\n\n-  [Join our Discord](https:\u002F\u002Fdiscord.gg\u002FYdgwU4d9NB) 👻 \n\n- [Follow us on Twitter](https:\u002F\u002Fx.com\u002Fmemobase_io) 𝕏 \n\nOr just [email us](mailto:contact@memobase.io) ❤️\n\n\n\n\n\n## Contribute\n\n- Check out our [Changelog](.\u002FChangelog.md) first, make sure the feature you want has not been developed or is currently being planned.:)\n- Go through [Contributing](.\u002FCONTRIBUTING.md) document to setup and contribute to Memobase.\n\n\n\n## License\n\nThis project is licensed under the Apache 2.0 License - see the [LICENSE](https:\u002F\u002Fgithub.com\u002Fmemodb-io\u002Fmemobase\u002Fblob\u002Fmain\u002FLICENSE) file for details.\n","Memobase是一个基于用户画像的长期记忆系统，专为AI聊天机器人应用程序设计。其核心功能包括使AI能够记住、理解和随着用户的互动而进化，适用于构建虚拟伴侣、教育工具或个性化助手等场景。技术上，Memobase在性能、大语言模型成本控制以及延迟方面达到了良好的平衡，特别适合需要高效处理用户对话历史的应用。它通过为每个用户提供内置缓存来批量处理聊天内容，有效分配开销，并精心设计提示和工作流程以避免额外的成本增加。此外，Memobase类似于ChatGPT背后的记忆系统，能即时访问用户的重要记忆，无需预处理。",2,"2026-06-11 03:41:55","high_star"]