mem0-cli

Manage AI agent memories via command-line interface with JSON outputs.

62.9k|7.3k|Updated Jun 20, 2023
One-click install
npx skills add https://github.com/mem0ai/mem0 --skill mem0-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mem0-cli
Source: https://github.com/mem0ai/mem0/tree/main/skills/mem0-cli
Command: npx skills add https://github.com/mem0ai/mem0 --skill mem0-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Managing memories for AI agents and workflows from a terminal can be slow and error-prone; this skill provides a dedicated CLI to add, search, list, get, update, and import memories, plus manage configuration and entities.

Core Features & Use Cases

  • Add, search, list, get, update, and delete memories from scripts, pipelines, or interactive sessions.
  • Support agent-ready, structured JSON outputs for easy consumption by LLMs and automation.
  • Manage init, config, status, and entity workflows in a unified, auditable CLI.

Quick Start

Install the Mem0 CLI, run mem0 init to configure your API key and defaults, then try mem0 add "Remember this" --user-id alice.

Frequently Asked Questions about mem0-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage AI agent memories from the command line?

You can manage AI agent memories from the command line using a dedicated CLI to add, search, list, update, and delete entries across users, agents, apps, and runs with consistent text or JSON outputs for automation.

Can I use memory management commands in CI/CD pipelines and automation scripts?

Yes, memory management commands support automation in scripts and pipelines by providing structured JSON envelopes and predictable operations, allowing safe integration into agent loops and CI/CD workflows without manual intervention.

What are the requirements to run the Mem0 CLI for agent memory control?

Running the Mem0 CLI for agent memory control requires Node.js 18+ or Python 3.10+, plus an initial configuration via `mem0 init` to set up your API key and default settings before adding or searching memories.

How do I add and search memories for specific users via a terminal?

To add and search memories for specific users via a terminal, use commands like `mem0 add "text" --user-id alice`, leveraging explicit-id resolution to target specific users, agents, or runs.

Does the CLI output structured JSON for LLM agent loops to consume?

Yes, the CLI outputs structured JSON envelopes designed for machine consumption, enabling LLMs and agent loops to safely parse memory search results, updates, and deletions in automated workflows.

What is the best way to configure memory entities and settings before adding data?

The best way to configure memory entities and settings before adding data is running `mem0 init` to define your API key and defaults, then using the unified CLI to manage configuration, status, and entity workflows auditably.