memory

Maintain persistent tiered cognitive memory with relevance-scored retrieval and token budgets.

Updated Mar 11, 2026
One-click install
npx skills add https://github.com/selfagency/agentsy --skill memory-selfagency
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: memory
Source: https://github.com/selfagency/agentsy/tree/main/packages/memory/skill
Command: npx skills add https://github.com/selfagency/agentsy --skill memory-selfagency

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Long-running agents lose important context, waste context-window tokens, and struggle to consistently remember preferences, facts, and tool outcomes across sessions.

Core Features & Use Cases

  • Persistent tiered cognitive memory: Ingest events into sensory-to-long-term tiers with promotion, decay/demotion, and token budget enforcement.
  • Cross-tier recall and retrieval: Query memories by relevance (including cross-tier search) and list/search within specific tiers for targeted grounding.
  • Consolidation via awaken cycles: Consolidate queued/pending events, apply decay, and maintain healthier long-horizon knowledge (including persona attributes and a lightweight knowledge graph).

Quick Start

Run the memory MCP server to initialize and operate persistent agent memory for your workflow.

Frequently Asked Questions about memory

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

FAQPage Schema
How do I persist agent memory across sessions so context isn't lost?

Persistent agent memory is maintained by ingesting events into sensory-to-long-term cognitive tiers with promotion, decay, and token budget enforcement, enabling context retention and recall across sessions.

What's the best way to manage token budgeting for agent memory retrieval?

Agent memory token budgeting is managed through tiered recall with pending queues and awaken cycles, which consolidate queued events, apply decay, and enforce token limits to maintain healthier long-horizon knowledge without overflowing the context window.

How does tiered cognitive memory recall work for AI agents?

Tiered cognitive memory recall works by allowing agents to query memories by relevance across sensory-to-long-term tiers, including cross-tier search and targeted listing within specific tiers, applying token budgets to manage retrieval scope.

Can I use an MCP server to maintain a knowledge graph for agent orchestration?

Yes, the memory MCP server initializes persistent cognitive memory that includes lightweight knowledge-graph queries and persona storage, supporting agent orchestration by capturing episodic events from tool calls and responses for contextual grounding.

Why does my agent lose important context and waste context-window tokens over time?

Agents lose context and waste tokens because they lack persistent memory consolidation; applying tiered cognitive memory with awaken cycles, decay, and relevance-scored retrieval prevents context loss and optimizes token usage across long-running sessions.

When do I need tiered memory consolidation for long-running agents?

Tiered memory consolidation is needed when long-running agents must retain preferences, facts, and tool outcomes across sessions, requiring awaken/sleep lifecycle management and decay to maintain relevant long-horizon knowledge within token budgets.