Skip to content
Agent Memory
Command

/cortexdb-import-memory

Import what Claude Code and Codex already remember into the CortexDB brain

From plugin
cortexdb
52913 skills13 commands1 MCP
> /plugin marketplace add liliang-cn/cortexdb
> /plugin install cortexdb@cortexdb

Command definition

cortexdb-import-memory.md
description: Import what Claude Code and Codex already remember into the CortexDB brain

Bring the user's existing agent memory into the brain, so `knowledge_memory_recall` finds it. Use the `import_agent_memory` MCP tool:

1. Call it with `dry_run: true` and tell the user what it found per source: Claude Code memory notes (`~/.claude/projects/*/memory/*.md`), `CLAUDE.md` / `AGENTS.md`, Codex's memories (`~/.codex/memories_1.sqlite`, `~/.codex/memories`). Add `sources: ["claude_memory", "instructions", "codex_memory", "claude_sessions", "codex_sessions"]` to also count past session transcripts (`since: "30d"` narrows them). 2. Run it for real with the same arguments. Past sessions are distilled by a model, a few per call (`max_sessions`, default 5): while the result says sessions are pending, call again. If it notes that no model is configured, tell the user to set `CORTEXDB_LLM_BASE_URL` / `CORTEXDB_LLM_MODEL` for the MCP server. 3. Report what was imported and into which brain (`brain` in the result).

Re-running is safe — ids are stable, so it refreshes rather than duplicates, and a distilled session is not read again. Without the MCP tool, the same import runs from a shell:

bin=$(ls -t ~/.claude/plugins/data/cortexdb-cortexdb/bin/cortexdb-mcp-* 2>/dev/null | head -1)
[ -n "$bin" ] || bin="${CORTEXDB_MCP_BIN:-cortexdb-mcp}"
"$bin" --import-agent-memory --dry-run            # count first
"$bin" --import-agent-memory [--sessions] [--since 30d] [--max N]

$ARGUMENTS

Read more
@liliang-cn
Ships withcortexdb

Memory your coding agents share. Tell Claude Code something once, and Codex, your other machines and next week's session already know it.

5293 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
529
Star history of liliang-cn/cortexdb on GitHub, a chart by star-history.com

Other commands on cortexdb.

More commands from other plugins.

mempalace-audit

mempalace-audit

Command

Score how well organized your memory palace is, then run a guided repair session — one decision at a time.

@mempalace@mempalaceInstall Command
plan-to-beads

plan-to-beads

Command

Convert a Claude Code plan file into beads epic + tasks for cross-session tracking.

beads8d29k
@gastownhall@gastownhallInstall Command