# Mindmemos CLI

Give an AI agent persistent, cross-session long-term memory through MindMemOS.

- Repository: https://github.com/mindscale-noah/MindMemOS (924 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add mindscale-noah/MindMemOS --skill mindmemos-cli -g -a claude-code -y`
Codex: `npx skills add mindscale-noah/MindMemOS --skill mindmemos-cli -g -a codex -y`
Cursor: `npx skills add mindscale-noah/MindMemOS --skill mindmemos-cli -g -a cursor -y`
Gemini CLI: `npx skills add mindscale-noah/MindMemOS --skill mindmemos-cli -g -a gemini-cli -y`

## Description

Give an AI agent persistent, cross-session long-term memory through MindMemOS. Covers installing and authenticating the mindmemos CLI, the full command interface (add / search / get / update / delete / feedback / dreaming) with parameters and examples, guidance on which capability to use when, plus a Python SDK example. To wire memory into a specific agent host (OpenClaw, DeepSeek Harness, Codex, Claude, etc.), see references/.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# MindMemOS CLI

MindMemOS is a long-term memory layer for AI agents. The `mindmemos` CLI is the
integration surface: every memory operation is a subcommand that prints either a
human-readable line or, with `--json`, stable machine-readable output. Any agent
or script can drive memory by shelling out to it.

To connect memory to a specific agent host (e.g. an editor or assistant that
supports plugins), the host calls this same CLI. Host-specific install guides
live under `references/`, see [Host integrations](#host-integrations).

---

## Install the CLI

The CLI ships as the Python package `mindmemos-sdk` and exposes a `mindmemos`
executable.

```bash
pip install mindmemos-sdk
# or, isolated so it's on PATH globally (recommended):
pipx install mindmemos-sdk
uv tool install mindmemos-sdk
```

Authenticate once. This writes a local config (API key, default user id, base URL). Operations that require a
user inherit the default user id, but `memory search` does not: omit `--user-id` for project-wide search or pass
it explicitly for user-scoped search.

```bash
mindmemos auth
# non-interactive:
mindmemos auth --api-key sk-... --user-id alice --base-url https://api.mindmemos.example.com
```

Verify:

```bash
mindmemos config show          # masked key, base_url, user_id
mindmemos memory search "test" # confirms connectivity with a project-wide search
```

---

## CLI interface

General shape: `mindmemos <group> <command> [args] [options]`.

- Memory commands do not accept a caller-provided request ID. The server generates
  `request_id` and includes it in command responses for tracing.
- `search` / `add` support `--json` for stable machine-readable output (what scripts and host integrations parse).
- Exit codes: `0` = success, `1` = API/config error, `2` = bad arguments. On non-zero exit the error text (including server stderr) is printed to stdout/stderr.

The rest: https://github.com/mindscale-noah/MindMemOS/blob/HEAD/skills/mindmemos-cli/SKILL.md
