AI Skill Hub 强烈推荐:mem0 Agent工作流 是一款优质的AI工具。在 GitHub 上收获超过 55.5k 颗 Star,AI 综合评分 8.2 分,在同类工具中表现稳健。如果你正在寻找可靠的AI工具解决方案,这是一个值得深入了解的选择。
为AI智能体提供通用记忆层的开源框架。支持长期记忆管理、个性化学习和智能体状态持久化,适合构建具有连续学习能力的AI应用、聊天机器人和自主智能体系统的开发者。
mem0 Agent工作流 是一款基于 Python 开发的开源工具,专注于 AI智能体、记忆管理、工作流 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
为AI智能体提供通用记忆层的开源框架。支持长期记忆管理、个性化学习和智能体状态持久化,适合构建具有连续学习能力的AI应用、聊天机器人和自主智能体系统的开发者。
mem0 Agent工作流 是一款基于 Python 开发的开源工具,专注于 AI智能体、记忆管理、工作流 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:pip 安装(推荐)
pip install mem0
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install mem0
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/mem0ai/mem0
cd mem0
pip install -e .
# 验证安装
python -c "import mem0; print('安装成功')"
# 命令行使用
mem0 --help
# 基本用法
mem0 input_file -o output_file
# Python 代码中调用
import mem0
# 示例
result = mem0.process("input")
print(result)
# mem0 配置文件示例(config.yml) app: name: "mem0" debug: false log_level: "INFO" # 运行时指定配置文件 mem0 --config config.yml # 或通过环境变量配置 export MEM0_API_KEY="your-key" export MEM0_OUTPUT_DIR="./output"
<p align="center"> <a href="https://github.com/mem0ai/mem0"> <img src="docs/images/banner-sm.png" width="800px" alt="Mem0 - The Memory Layer for Personalized AI"> </a> </p> <p align="center" style="display: flex; justify-content: center; gap: 20px; align-items: center;"> <a href="https://trendshift.io/repositories/11194" target="blank"> <img src="https://trendshift.io/api/badge/repositories/11194" alt="mem0ai%2Fmem0 | Trendshift" width="250" height="55"/> </a> </p>
<p align="center"> <a href="https://mem0.ai">Learn more</a> · <a href="https://mem0.dev/DiG">Join Discord</a> · <a href="https://mem0.dev/demo">Demo</a> </p>
<p align="center"> <a href="https://mem0.dev/DiG"> <img src="https://img.shields.io/badge/Discord-%235865F2.svg?&logo=discord&logoColor=white" alt="Mem0 Discord"> </a> <a href="https://pepy.tech/project/mem0ai"> <img src="https://img.shields.io/pypi/dm/mem0ai" alt="Mem0 PyPI - Downloads"> </a> <a href="https://github.com/mem0ai/mem0"> <img src="https://img.shields.io/github/commit-activity/m/mem0ai/mem0?style=flat-square" alt="GitHub commit activity"> </a> <a href="https://pypi.org/project/mem0ai" target="blank"> <img src="https://img.shields.io/pypi/v/mem0ai?color=%2334D058&label=pypi%20package" alt="Package version"> </a> <a href="https://www.npmjs.com/package/mem0ai" target="blank"> <img src="https://img.shields.io/npm/v/mem0ai" alt="Npm package"> </a> <a href="https://www.ycombinator.com/companies/mem0"> <img src="https://img.shields.io/badge/Y%20Combinator-S24-orange?style=flat-square" alt="Y Combinator S24"> </a> </p>
<p align="center"> <a href="https://mem0.ai/research"><strong>📄 Benchmarking Mem0's token-efficient memory algorithm →</strong></a> </p>
Mem0 ("mem-zero") enhances AI assistants and agents with an intelligent memory layer, enabling personalized AI interactions. It remembers user preferences, adapts to individual needs, and continuously learns over time—ideal for customer support chatbots, AI assistants, and autonomous systems.
npm install -g @mem0/cli # or: pip install mem0-cli
pip install mem0ai
For enhanced hybrid search with BM25 keyword matching and entity extraction, install with NLP support:
pip install mem0ai[nlp]
python -m spacy download en_core_web_sm
Install sdk via npm:
npm install mem0ai
cd server && docker compose up -d # http://localhost:3000 ```
See the self-hosted docs for configuration.
Core Capabilities: - Multi-Level Memory: Seamlessly retains User, Session, and Agent state with adaptive personalization - Developer-Friendly: Intuitive API, cross-platform SDKs, and a fully managed service option
Applications: - AI Assistants: Consistent, context-rich conversations - Customer Support: Recall past tickets and user history for tailored help - Healthcare: Track patient preferences and history for personalized care - Productivity & Gaming: Adaptive workflows and environments based on user behavior
Mem0 requires an LLM to function, with gpt-5-mini from OpenAI as the default. However, it supports a variety of LLMs; for details, refer to our Supported LLMs documentation.
Mem0 uses text-embedding-3-small from OpenAI as the default embedding model. For best results with hybrid search (semantic + keyword + entity boosting), we recommend using at least Qwen 600M or a comparable embedding model. See Supported Embeddings for configuration details.
First step is to instantiate the memory:
from openai import OpenAI
from mem0 import Memory
openai_client = OpenAI()
memory = Memory()
def chat_with_memories(message: str, user_id: str = "default_user") -> str:
# Retrieve relevant memories
relevant_memories = memory.search(query=message, filters={"user_id": user_id}, top_k=3)
memories_str = "\n".join(f"- {entry['memory']}" for entry in relevant_memories["results"])
# Generate Assistant response
system_prompt = f"You are a helpful AI. Answer the question based on query and memories.\nUser Memories:\n{memories_str}"
messages = [{"role": "system", "content": system_prompt}, {"role": "user", "content": message}]
response = openai_client.chat.completions.create(model="gpt-5-mini", messages=messages)
assistant_response = response.choices[0].message.content
# Create new memories from the conversation
messages.append({"role": "assistant", "content": assistant_response})
memory.add(messages, user_id=user_id)
return assistant_response
def main():
print("Chat with AI (type 'exit' to quit)")
while True:
user_input = input("You: ").strip()
if user_input.lower() == 'exit':
print("Goodbye!")
break
print(f"AI: {chat_with_memories(user_input)}")
if __name__ == "__main__":
main()
For detailed integration steps, see the Quickstart and API Reference.
cd server && make bootstrap
mem0填补AI记忆层空白,架构设计优秀,社区活跃。通用性强,适合智能体生态建设,潜力大。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
总体来看,mem0 Agent工作流 是一款质量优秀的AI工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | mem0 |
| 原始描述 | 开源AI工作流:Universal memory layer for AI Agents。⭐55.5k · Python |
| Topics | AI智能体记忆管理工作流Python开源框架 |
| GitHub | https://github.com/mem0ai/mem0 |
| License | Apache-2.0 |
| 语言 | Python |
收录时间:2026-05-13 · 更新时间:2026-05-16 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。