mem0-dynamic-graph-memory

mem0-dynamic-graph-memory is a skill for Claude Code, Codex from topprismdata/cultivating-ml-agent. It costs 69 tokens per session (897 once invoked), scanned A, original, MIT.

A method for turning text into a knowledge graph—a collection of concepts and the relationships between them—by finding entities and connections automatically.

In plain words
What is it for?
Use it to extract concepts and relationships from papers, Kaggle writeups, or other text, and to build or improve entity-aware memory.
Why use it?
It reduces the need to define every connection by hand and helps memory systems represent ideas found in papers and discussions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to extract concepts and relationships from papers, Kaggle writeups, or other text, and to build or improve entity-aware memory.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/topprismdata/cultivating-ml-agent/mem0-dynamic-graph-memory
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add topprismdata/cultivating-ml-agent --skill mem0-dynamic-graph-memory
Clone the repo
git clone --depth 1 https://github.com/topprismdata/cultivating-ml-agent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mem0-dynamic-graph-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/mem0-dynamic-graph-memory/github.svg)](https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/mem0-dynamic-graph-memory)
Your own site
<a href="https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/mem0-dynamic-graph-memory"><img src="https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/mem0-dynamic-graph-memory/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mem0-dynamic-graph-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/mem0-dynamic-graph-memory"><img src="https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/mem0-dynamic-graph-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 897 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.00897
Opus 5 $0.00034 $0.00449
Sonnet 5 $0.00014 $0.00179
Haiku 4.5 $0.00007 $0.00090

Measured 9d ago against content hash fbc51fad42f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

mem0-dynamic-graph-memory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/examples/mem0-dynamic-graph-memory/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mem0 Dynamic Graph Memory (Entity-Relation Extraction)

Context

Static OKF stores predefined edges. Mem0/Letta (2025) extract entities + relations dynamically from text. agy suggested upgrading our existing EntityRelationExtractor as P2: enables automatic concept discovery instead of manual OKF curation.

The core insight: knowledge graphs are useful only if they reflect real relationships, and those relationships must be extracted, not hardcoded.

Guidance

Extract from Paper/Discussion

from framework.src.memory.entity_extraction import EntityRelationExtractor

ext = EntityRelationExtractor()
text = """
LightGBM uses histogram-based gradient boosting.
XGBoost improves LightGBM with second-order gradients.
CatBoost handles categorical features natively, unlike LightGBM.
We evaluated F1 score on Spaceship Titanic.
Walk-forward validation prevents data leakage in time series.
"""

entities, relations = ext.extract(text)
# → 8 entities (techniques, metrics, competitions, concepts)
# → relations: "XGBoost improves LightGBM", etc.

for e in entities:
    print(f"{e.type}: {e.name} ({e.mentions} mentions)")
for r in relations:
    print(f"{r.source} --{r.relation}--> {r.target}")

With LLM Enhancement

def my_llm(prompt: str) -> str:
    return openai_client.chat.completions.create(...).choices[0].message.content

ext = EntityRelationExtractor(llm_call=my_llm)
entities, relations = ext.extract(text)
# → 规则抽取 + LLM 抽取合并去重

Integrate with OKF Index

# 已存在 OKFIndex,可叠加 entity edges
from framework.src.memory.okf_index import OKFIndex
from framework.src.memory.entity_extraction import EntityRelationExtractor

okf = OKFIndex(okf_dir="docs/ml-agent-memory")
okf.build()

ext = EntityRelationExtractor()
entities, relations = ext.extract(paper_abstract)

# 把 entity edges 添加到 OKF 图
for e in entities:
    okf.items[f"entity:{e.name.lower()}"] = MemoryItem(
        id=f"entity:{e.name.lower()}",
        content=f"{e.type}: {e.name}",
        type="entity",
        importance=0.6,
    )

Read the full file on GitHub · 108 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 108 lines · 69 tokens per session scan A fbc51fad42f1

Subscribe to this mod's changes

mem0-dynamic-graph-memory is a skill published in the GitHub repository topprismdata/cultivating-ml-agent (5 stars, last pushed 11d ago), licensed MIT. It adds 69 tokens to every session and 897 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

install-openviking-memory

Install and configure the OpenViking long-term memory plugin for OpenClaw via natural conversation. Once installed, the plugin automatically captures facts from chats and recalls relevant context before each reply (auto-capture + auto-recall, cross-session). Covers prerequisites, install through OpenClaw's plugin…

volcengine/OpenViking · 191 tokens

code-runner

Execute Python code snippets in a sandboxed environment. Supports data analysis, visualization, and quick scripts.

fuyuxiang/echo-agent · 24 tokens

setup-open-index

Install and configure Open Index as the read/write context layer for a domain-specialized agent. Use when setting up a legal, marketing, customer support, sales, infrastructure, or other domain agent with Open Index over MCP.

DrDroidLab/open-index · 48 tokens

edit-brain

How to add or edit knowledge in this brain — define doctypes, add or update entities, and correlate them with relationships. Use whenever the user asks to add/update knowledge, define a concept, record a learning, or link two things in the brain.

DrDroidLab/open-index · 55 tokens

Weights & Biases

Track ML experiments with automatic logging, visualize training in real-time, optimize hyperparameters with sweeps, and manage model registry with W&B - collaborative MLOps platform.

agentic-in/elephant-agent · 38 tokens

llama.cpp

Run LLM inference with llama.cpp on CPU, Apple Silicon, AMD/Intel GPUs, or NVIDIA — plus GGUF model conversion and quantization (2–8 bit with K-quants and imatrix). Covers CLI, Python bindings, OpenAI-compatible server, and Ollama/LM Studio integration. Use for edge deployment, M1/M2/M3/M4 Macs, CUDA-less…

agentic-in/elephant-agent · 90 tokens