knowledge-graph-memory

Designs memory tiers, substrates, and hygiene rules for agent knowledge stores.

Updated Aug 2, 2026
One-click install
npx skills add https://github.com/dperussina/function2agent --skill knowledge-graph-memory-dperussina
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: knowledge-graph-memory
Source: https://github.com/dperussina/function2agent/tree/main/.cursor/skills/knowledge-graph-memory
Command: npx skills add https://github.com/dperussina/function2agent --skill knowledge-graph-memory-dperussina

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Agent memory systems fail in predictable ways: unbounded growth, stale facts, silent contradictions, and adversarial poisoning through write channels that prompt-injection defenses do not cover. This Skill provides the design rules for deciding which of the four memory tiers a component gets, what substrate holds each tier, and the hygiene and provenance requirements that keep a writable memory store from becoming an attack surface. ## Core Features & Use Cases - Four-tier memory assignment: Maps working, episodic, semantic, and procedural memory to lifetimes, substrates, and writers, with a default of working plus episodic scoped to the run. - Substrate guidance: Argues for files with YAML frontmatter over vector stores and graph databases, with hybrid retrieval and explicit lifecycle governance. - Security hygiene table: Pairs every failure mode (staleness, contradiction, unbounded growth, overfitting, poisoning) with a required mitigation, plus a non-negotiable checklist for any memory write path. - Use Case: When adding cross-session memory or a knowledge graph to a generated agent, use this Skill to decide what the agent should remember, where it lives, and what write-path controls are mandatory before shipping. ## Quick Start Ask the agent to design the memory layer for a new agent component, specifying which tiers it needs and what write-path controls apply.

Frequently Asked Questions about knowledge-graph-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add long-term memory to an AI agent?▼

Start with working and episodic memory scoped to the run, and add semantic or procedural memory only when a specific need is named. Use files with YAML frontmatter as the substrate, expose memory operations as tools the agent calls with task context, and require provenance on every record.

Should I use a vector store or files for agent memory?▼

Files are the recommended default substrate because they are inspectable, versionable, and legible to both the model and human curators. Reserve embeddings for genuinely unstructured, large corpora; agentic search with grep and glob over ground truth routinely beats embedding search on code.

What are the security risks of agent-writable memory?▼

Agent memory has four write channels including experience-to-procedure, and studies show agents that write memory aggressively are more exploitable, with sleeper attacks achieving high success rates. Existing prompt-injection defenses do not cover memory poisoning, so provenance, cross-record checks, and write-node restriction are required.

When should an agent's episodic memory become a permanent rule?▼

Promote an episodic observation to a heuristic only after k independent observations, never from a single occurrence, and require human approval since the rule then affects all runs. Durable memory should contain only facts that continue to constrain future reasoning.

Why do agent memory stores degrade over time?▼

Research shows organization erodes as stores grow and updates do not reliably land correctly, so agents cannot yet be trusted as their own librarians. Budget an explicit curation mechanism such as periodic human review, scheduled consolidation passes, or hard schema constraints.