memory

Maintains long-term facts and searchable event history across agent sessions.

8|2|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/luojiaaoo/xpeech --skill memory-luojiaaoo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: memory
Source: https://github.com/luojiaaoo/xpeech/tree/main/xpeech/agent/skills/buildin/memory
Command: npx skills add https://github.com/luojiaaoo/xpeech --skill memory-luojiaaoo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents lose context between sessions, forcing users to repeat preferences, project details, and past decisions. This Skill provides a persistent two-layer memory system so important facts and event history survive across conversations. ## Core Features & Use Cases - Long-Term Fact Storage: Records user preferences, project context, and relationships in MEMORY.md, which is always loaded into the agent's context. - Searchable Event Log: Appends timestamped entries to HISTORY.md and retrieves them with grep-style searches or in-memory filtering, scaled to file size. - Auto-Consolidation: Automatically summarizes old conversations into HISTORY.md and extracts long-term facts into MEMORY.md when sessions grow large. - Use Case: A user mentions "I prefer dark mode" and "Alice is the project lead" in one session; weeks later the agent recalls both facts without being reminded. ## Quick Start Ask the agent to remember a fact such as "remember that our API uses OAuth2" and later ask it to search history for when that decision was made.

Frequently Asked Questions about memory

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

FAQPage Schema
How do I give an AI agent persistent memory across sessions?▼

Store long-term facts in a MEMORY.md file that is always loaded into the agent's context, and log events to an append-only HISTORY.md. The agent writes important facts immediately when users state preferences or project details.

How to search an agent's conversation history efficiently?▼

For small history files, read the file and search in memory. For large or long-lived HISTORY.md files, use targeted command-line search such as grep -i "keyword" memory/HISTORY.md to avoid loading everything into context.

What is the difference between long-term memory and event history for agents?▼

Long-term memory holds distilled facts like preferences and relationships that are always in context. Event history is an append-only log of timestamped entries that stays out of context and is searched on demand.

Does agent memory require manual consolidation of old conversations?▼

No. When a session grows large, old conversations are automatically summarized and appended to HISTORY.md, and long-term facts are extracted into MEMORY.md without manual management.

When should an agent write facts to long-term memory?▼

Write immediately when users state preferences, project context, or relationships, such as "I prefer dark mode" or "Alice is the project lead". Use file editing tools to update MEMORY.md as soon as the fact is mentioned.