memory

Store and retrieve long-term user context in an append-only JSONL memory file.

16|Updated Dec 28, 2025
One-click install
npx skills add https://github.com/Hongyu-yu/matsci-ai-skills --skill memory-hongyu-yu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: memory
Source: https://github.com/Hongyu-yu/matsci-ai-skills/tree/main/skills/memory
Command: npx skills add https://github.com/Hongyu-yu/matsci-ai-skills --skill memory-hongyu-yu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, and includes scripts (resource) components.

What problem does it solve?

This Skill provides a persistent, file-based memory for AI prompts, enabling context to be remembered across sessions without re-asking the user.

Core Features & Use Cases

  • Append-only JSONL storage in a single memory file, ensuring data integrity and auditability.
  • Two on-demand interfaces: memory_write to append new entries and memory_search to query recent context with a focus on recency.
  • Supports structured entries (ts, type, content, tags, meta) and enables rapid retrieval of relevant notes, facts, and tasks across long-running interactions.
  • Use Case: An AI assistant can recall last user preferences and past decisions to tailor responses in ongoing conversations.

Quick Start

Configure MEMORY_FILE if needed, then add an entry with memory_write and query it with memory_search.

Frequently Asked Questions about memory

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

FAQPage Schema
How do I keep long-term memory across chat sessions for an AI assistant?

You can keep long-term memory across chat sessions by using an append-only JSONL file to store and retrieve user context. This approach ensures data integrity while allowing the AI to recall past preferences and decisions in ongoing conversations without re-asking the user.

How do I append and search structured memory entries using bash and jq?

You can append and search structured memory entries using bash and jq by utilizing dedicated write and search interfaces. The write interface appends JSON entries with fields like ts, type, content, tags, and meta, while the search interface queries recent context with safe escaping via jq.

Do I need jq installed to use an append-only JSONL memory file for AI context?

Yes, you need jq installed to use this append-only JSONL memory file approach. jq is a required dependency for ensuring strict JSON formatting and safe escaping when writing to and searching the persistent memory file.

What is the best way to store persistent user context for AI agents without a database?

The best way to store persistent user context without a database is using an append-only JSONL memory file. It provides a lightweight, file-based solution for AI agents requiring persistent memory, context recall, and recent-event search across prompts.

Can I retrieve recent events and tasks from long-running AI interactions?

Yes, you can retrieve recent events and tasks from long-running AI interactions using the memory search interface. It queries the append-only JSONL memory file with a focus on recency, enabling rapid retrieval of relevant notes, facts, and past decisions.

Why does memory search focus on recency in an append-only JSONL file?

Memory search focuses on recency in an append-only JSONL file because it prioritizes the latest context for ongoing conversations. This ensures the AI assistant retrieves the most relevant recent notes and user preferences to tailor responses effectively.