界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

core-memory-api

core-memory-api

【数据与研究】Use M-flow public Python APIs and mflow CLI for core memory workflows, data management, manual ingestion, and troubleshooting.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: core-memory-api description: "Use M-flow public Python APIs and mflow CLI for core memory workflows, data management, manual ingestion, and troubleshooting." disable-model-invocation: true metadata: disco-role: operating license: Apache 2.0

Core Memory API

Use this sub-skill when a task needs the public m_flow Python package or the mflow CLI for core memory operations: add data, memorize it into graph memory, query/search it, run one-step ingest, manage datasets/data, update/delete/prune, manual graph insertion, or process-local configuration.

Route first

Operating model

M-flow's in-process API is asynchronous. Treat add() as raw data registration, memorize() as memory-graph construction, and query()/search() as retrieval over already memorized data. ingest() is the convenience API that performs add() then memorize() and returns an IngestResult status object.

Prefer stable dataset names such as project_notes_2026q1; pass the same name to add/ingest, memorize, and query. Use created_at when importing historical content so later retrieval can preserve temporal intent. Use run_in_background only when the caller can poll or otherwise wait before querying. Never call delete, update, datasets.delete_dataset, or prune without an explicit scope and confirmation from the user.

Safe bundled checker

Run the bundled smoke checker in dry-run mode before live examples:

python scripts/core_workflow_smoke.py --help
python scripts/core_workflow_smoke.py

It only imports m_flow, checks public exports/config visibility, reports whether an LLM credential appears configured, and prints a guarded plan. Live DB writes require an explicit flag:

python scripts/core_workflow_smoke.py --run-live --dataset-name skill_smoke_core

Live mode calls add(), memorize(), and query() and may create local graph, vector, relational, and file-storage data for the selected dataset.

我的收藏