rdf-memory

Persist and query RDF knowledge graphs across sessions using an Oxigraph-backed store.

Updated May 12, 2026
One-click install
npx skills add https://github.com/angelo-v/pi-kit --skill rdf-memory-angelo-v
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rdf-memory
Source: https://github.com/angelo-v/pi-kit/tree/main/packages/linked-data/skills/rdf-memory
Command: npx skills add https://github.com/angelo-v/pi-kit --skill rdf-memory-angelo-v

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Agent memory normally disappears when a session ends. This Skill stores facts as RDF quads in named graphs backed by Oxigraph, so knowledge bases survive restarts and can be queried with SPARQL at any time. ## Core Features & Use Cases - Persistent fact recording: Write memory chunks with automatic datetime stamping, mandatory source attribution, and RDF-star per-fact annotations such as confidence levels. - SPARQL querying and updates: Run SELECT, ASK, CONSTRUCT, DESCRIBE queries and SPARQL Update deletions against named graphs, scoped by topic, type, or subject IRI. - Schema discovery before querying: List stores and inspect which types and predicates actually exist before writing queries, avoiding wrong class or property IRIs. - Use Case: Build a project knowledge base incrementally — record decisions, people, and entities as they come up in conversation, then recall them weeks later with scoped SPARQL queries. ## Quick Start Ask the agent to remember a fact, for example: "Remember that Alice is 30 and knows Bob in the project-memory store."

Frequently Asked Questions about rdf-memory

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

FAQPage Schema
How do I store facts that persist across agent sessions?▼

Use the rdf_memory_record tool with a store name, source, topic, and Turtle-formatted facts. Datetimes are stamped automatically, and data is flushed to disk after every write so it survives session restarts.

How do I query a persistent RDF knowledge graph with SPARQL?▼

First list stores with rdf_memory_stores, then run rdf_schema_overview to see actual types and predicates. Every query must include a GRAPH clause scoped by topic, type, or subject IRI, plus a LIMIT for unpredictable result sizes.

Why does my SPARQL query return no results?▼

Queries without a GRAPH clause always return empty because all data lives in named graphs and the default graph is empty. Also verify the store name with rdf_memory_stores and check actual stored types via the chunk index.

Does the store support per-fact provenance and confidence annotations?▼

Yes, RDF-star annotations attach metadata like confidence (high, medium, low, inferred) and source to individual triples. These annotations survive the N-Quads round-trip used for persistence.

How do I delete facts from the RDF memory store?▼

Use rdf_memory_update with a SPARQL DELETE...WHERE statement targeting the fact in its named graph, or rdf_memory_drop to clear an entire store or chunk graph. Remove the chunk's meta entry separately to keep the index consistent.