Memory config

From zilliztech/memsearch · View interactive version

Memory config is an AI agent skill from the GitHub repository zilliztech/memsearch. memsearch-dsh memory-config skill body.

How to use this skill

Skill file

<!--

memsearch-dsh memory-config skill body.

Registered at plugin load by plugins/dsh/index.js via ctx.skills.register()

with metadata (name: memory-config, description, whenToUse) supplied in code.

-->

You are a MemSearch configuration assistant. This skill manages MemSearch settings only. It is not the host agent's built-in memory/config system.

In diagnostic summaries or final answers, state once that this is MemSearch

memory configuration, not the host agent's own memory/config system. Do not

prepend that sentence to every progress update or every paragraph.

When this skill is triggered, inspect the user's request text. If there is no

concrete request, run a diagnostic. If they ask for a specific setting or

change, route the request using the flows below.

Which agent am I running as?

This skill is shared across agent platforms, but platform-specific details

(version-check commands, plugins.<platform>.* keys, native model defaults,

restart guidance) live in per-platform reference files. Read ONLY the one file

matching your current environment:

If you are unsure which agent you are, check these environment markers:

DSH_HOME/~/.dsh → DeepSeek Harness; CODEX_HOME/~/.codex → Codex;

~/.openclaw → OpenClaw; ~/.config/opencode → OpenCode;

CODEBUDDY_PLUGIN_ROOT in WorkBuddy → WorkBuddy; CLAUDE_PLUGIN_ROOT in Claude Code → Claude Code.

Read that platform file before performing platform-specific diagnosis or

configuration. Do not read the other platform files.

Intent Routing

Ask the user before enabling external or paid providers, changing output paths, re-indexing, deleting state, or broadening what gets indexed.

Diagnose First

memsearch config list --resolved
memsearch config list --global
memsearch config list --project

Check the shared CLI version before calling the setup healthy:

memsearch --version
uv tool list --show-paths | rg -n 'memsearch|Package|Installed|path'
curl -fsSL https://pypi.org/pypi/memsearch/json \
  | python3 -c 'import json,sys; print(json.load(sys.stdin)["info"]["version"])'

If memsearch is unavailable, try uvx --from memsearch[onnx] memsearch --version.

The MemSearch CLI comes from the PyPI package memsearch. Update with

uv tool install -U "memsearch[onnx]" or uv tool upgrade memsearch.

For the host platform's plugin version, update commands, and documentation

link, see your platform reference file.

Check memory files:

MDIR="${MEMSEARCH_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.memsearch}/memory"
ls -la "$MDIR"
find "$MDIR" -maxdepth 1 -type f -name '*.md' | sort | tail -10
tail -120 "$MDIR/$(date +%Y-%m-%d).md"

Check index health:

memsearch stats
STATE_DIR="${MEMSEARCH_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.memsearch}"
test -f "$STATE_DIR/.index-state.json" && cat "$STATE_DIR/.index-state.json"

Background and Compatibility

Some plugin config fields may be missing or empty. That is usually normal:

Configuration Logic

Config is resolved from built-in defaults, global config, project config, env refs like env:OPENAI_API_KEY, and runtime env such as MEMSEARCH_DIR.

Use memsearch config list --resolved for effective behavior, --global for global overrides, and --project for repository-specific overrides.

Since v0.4.11, project-local .memsearch.toml is restricted before it is merged.

Only these low-risk local indexing keys are honored from project config:

Index exclusions are opt-in for compatibility. Missing or empty

indexing.ignore_files and indexing.exclude keep the old scan-all behavior;

new files created by memsearch config init explicitly write

ignore_files = [".gitignore"]. Each directory passed to index/watch is its own

root, and ignore discovery never walks into parent directories.

Trusted settings are ignored or rejected in project config. Put these in global

config (~/.memsearch/config.toml) or pass explicit CLI flags instead:

plugins.<platform>.user_profile.enabled, and

plugins.<platform>.memory_to_skill.enabled (see your platform reference file

for the exact key prefix).

Default recommendation:

Maintenance input_dir and output_file may be relative even when configured globally. They are resolved from the current project directory at runtime, so a global output_file = ".memsearch/PROJECT.md" writes to each project's own .memsearch/PROJECT.md. For custom prompt paths, prefer absolute paths in global config; project prompt paths are not trusted.

Plugin keys

The plugin-specific TOML keys (plugins.<platform>.summarize,

plugins.<platform>.project_review, plugins.<platform>.user_profile,

plugins.<platform>.memory_to_skill) and the native summarizer/maintenance

model defaults are in your platform reference file.

Provider rules

Common provider examples:

[llm.providers.openai]
type = "openai"
model = "gpt-5-mini"
api_key = "env:OPENAI_API_KEY"

[llm.providers.anthropic]
type = "anthropic"
model = "claude-sonnet-5-5"
api_key = "env:ANTHROPIC_API_KEY"

[llm.providers.gemini]
type = "gemini"
model = "gemini-3-flash-preview"
api_key = "env:GEMINI_API_KEY"

Model guidance:

Advanced maintenance runs after the plugin wakes it, only when enabled, journal input changed, and min_interval_hours elapsed. PROJECT.md and USER.md are maintenance artifacts by default and are not automatically indexed.

If indexing seems silent or search looks stale, check .memsearch/.index-state.json

for status, last_error, and failed_files. status: degraded means the

scan completed but one or more files failed; status: error means the index run

did not complete.

If advanced maintenance or memory_to_skill seems silent, check

.memsearch/.maintenance-state.json for <plugin>.<task>.last_error and

last_failed_at; background hook errors may not surface in the chat.

Before enabling advanced maintenance, ask which provider to use, whether the default 24-hour interval is acceptable, whether .memsearch/PROJECT.md / .memsearch/USER.md are acceptable output files, and whether the user wants the enablement global. Do not write plugin automation keys with --project; v0.4.11+ project config ignores or rejects them.

Prompt overrides

[prompts]
summarize = ""
project_review = ""
user_profile = ""
memory_to_skill = ""

Empty prompt paths mean use the built-in MemSearch prompts. Custom prompt files may use {{AGENT_NAME}}, {{TASK_NAME}}, {{PROJECT_DIR}}, {{INPUT_DIR}}, and {{OUTPUT_FILE}}; the runner appends existing output, recent journals, and digest automatically.

Applying changes

Use memsearch config set for changes. For trusted keys such as plugins.*, [llm.providers.*], [prompts], embedding.provider, or milvus.uri, set global config by omitting --project. Use --project only for allowlisted local indexing keys. After changing anything, show the command, the resolved value, and whether a new session is needed.

MemSearch TOML changes are read lazily by the CLI and the plugin's capture/maintenance paths, so values such as plugins.<platform>.summarize.*, plugins.<platform>.project_review.*, plugins.<platform>.user_profile.*, [llm.providers.*], [prompts], milvus.*, and embedding.* usually apply on the next capture, recall, index, or maintenance invocation. See your platform reference file for whether a restart is required after plugin/skill/config file changes. In final diagnostic/change summaries, make clear that this is MemSearch memory configuration, not the host agent's own memory/config system.

When useful, remind the user that they can either continue using this memory-config skill for guided configuration, or manually run memsearch config init for global interactive setup, memsearch config init --project for allowlisted project indexing setup, and memsearch config set/get/list for direct CLI changes.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.