Agent memory, from your terminal
Add, search, and manage memories directly from the terminal. Python or Node. Same CLI, same behavior.
$ mem0 init
$ mem0 init
███╗ ███╗███████╗███╗ ███╗ ██████╗ ██████╗██╗ ██╗
████╗ ████║██╔════╝████╗ ████║██╔═████╗ ██╔════╝██║ ██║
██╔████╔██║█████╗ ██╔████╔██║██║██╔██║ ██║ ██║ ██║
██║╚██╔╝██║██╔══╝ ██║╚██╔╝██║████╔╝██║ ██║ ██║ ██║
██║ ╚═╝ ██║███████╗██║ ╚═╝ ██║╚██████╔╝ ╚██████╗███████╗██║
╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝╚══════╝╚═╝
███╗ ███╗███████╗███╗ ███╗ ██████╗ ██████╗██╗ ██╗
████╗ ████║██╔════╝████╗ ████║██╔═████╗ ██╔════╝██║ ██║
██╔████╔██║█████╗ ██╔████╔██║██║██╔██║ ██║ ██║ ██║
██║╚██╔╝██║██╔══╝ ██║╚██╔╝██║████╔╝██║ ██║ ██║ ██║
██║ ╚═╝ ██║███████╗██║ ╚═╝ ██║╚██████╔╝ ╚██████╗███████╗██║
╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝╚══════╝╚═╝
✓ API key saved
✓ Default user: alice
$ mem0 add "Prefers dark mode and vim keybindings" --user-id alice
✓ Memory added (id: 7b3c1a2e)
$ mem0 search "What does Alice prefer?" --user-id alice
0.5ms Prefers dark mode and vim keybindings
✓ API key saved
✓ Default user: alice
$ mem0 add "Prefers dark mode and vim keybindings" --user-id alice
✓ Memory added (id: 7b3c1a2e)
$ mem0 search "What does Alice prefer?" --user-id alice
0.5ms Prefers dark mode and vim keybindings
Built for agents
Full command tree
Lists every command, flag, and description. Agents learn the interface on their own.
Full command tree
Lists every command, flag, and description. Agents learn the interface on their own.
Multiple output modes
Output in the format your code expects. Text or JSON.
Multiple output modes
Output in the format your code expects. Text or JSON.
Scoped to any entity
Scope memory to any user, session, or agent. No namespace collisions.
Scoped to any entity
Scope memory to any user, session, or agent. No namespace collisions.
Quick Reference
Command
Command
What it does
What it does
mem0 init
mem0 init
Interactive setup wizard for mem0 CLI.
Interactive setup wizard for mem0 CLI.
mem0 add
mem0 add
Add a memory from text, messages, file, or stdin.
Add a memory from text, messages, file, or stdin.
mem0 search
mem0 search
Query your memory store — semantic, keyword, or hybrid retrieval.
Query your memory store — semantic, keyword, or hybrid retrieval.
mem0 get
mem0 get
Get a specific memory by ID.
Get a specific memory by ID.
mem0 list
mem0 list
List memories with optional filters.
List memories with optional filters.
mem0 update
mem0 update
Update a memory's text or metadata.
Update a memory's text or metadata.
mem0 delete
mem0 delete
Delete a memory, all memories, or an entity.
Delete a memory, all memories, or an entity.
mem0 status
mem0 status
Check connectivity and authentication.
Check connectivity and authentication.
mem0 import
mem0 import
Import memories from a JSON file.
Import memories from a JSON file.
mem0 entity
mem0 entity
Manage entities
Manage entities
mem0 event
mem0 event
Inspect background processing events.
Inspect background processing events.
CLI