使用 Mem0 而不是重新播放整个对话来存储选择性的长期代理记忆
Use Mem0 when an agent should retain durable preferences, facts, and prior decisions as selective memory records instead of stuffing more transcript history back into every prompt.
Prerequisites
A Python or Node agent stack, the Mem0 package or API, and a workflow that can decide which facts should be stored and later retrieved as durable memory.
Installation
Use the upstream install or setup path that matches your environment:
- npm install -g @mem0/cli # or: pip install mem0-cli
- pip install mem0ai
- pip install mem0ai[nlp]
- npm install mem0ai
Requirements and caveats from upstream:
- | Setup | pip install mem0ai | docker compose up | Sign up at app.mem0.ai |
- python -m spacy download en_core_web_sm
- cd server && docker compose up -d # http://localhost:3000
Basic usage or getting-started notes:
- All benchmarks run on the same production-representative model stack. Single-pass retrieval (one call, no agentic loops).
- bash
- ### Self-Hosted Server
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/mem0ai/mem0/HEAD/README.md
Documentation
- https://docs.mem0.ai