core-memory-api
Use M-flow public Python APIs and mflow CLI for core memory workflows, data management, manual ingestion, and troubleshooting.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- core-memory-api
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use M-flow public Python APIs and mflow CLI for core memory workflows, data management, manual ingestion, and troubleshooting.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md9.6 KB
- 参考文档references/cli-reference.md5.8 KB
- 参考文档references/troubleshooting.md7.8 KB
- 参考文档references/workflows.md7.3 KB
- 脚本scripts/core_workflow_smoke.py6.9 KB
03 SKILL.md 正文
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
- Core
add -> memorize -> query/searchworkflows: read references/workflows.md. - Exact Python signatures, return shapes, exported names, and data-management APIs: read references/api-reference.md.
- CLI commands and flags: read references/cli-reference.md.
- Errors, credentials, invalid kwargs, empty results, or destructive-operation cautions: read references/troubleshooting.md.
- Loader internals, content routing, chunking, custom
Stagepipelines, andpreferred_loadersdetails belong in ../ingestion-pipelines/SKILL.md. - Retrieval scoring,
RecallModetuning, episodic display controls, Cypher, and storage/backend tuning belong in ../retrieval-graph-search/SKILL.md. - FastAPI, MCP, UI, Docker, auth service deployment, and server lifecycle belong in ../service-integrations/SKILL.md.
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.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).