cognitive-memory

Implements multi-store agent memory with decay scoring, reflection cycles, and audit logging.

3|1|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/PALabs-v1/AI_friend --skill cognitive-memory-palabs-v1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cognitive-memory
Source: https://github.com/PALabs-v1/AI_friend/tree/main/.agents/skills/cognitive-memory
Command: npx skills add https://github.com/PALabs-v1/AI_friend --skill cognitive-memory-palabs-v1

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? AI agents with flat-file or stateless memory lose context between sessions, cannot forget gracefully, and have no auditable record of what they learned. This Skill replaces basic memory with a cognitive architecture featuring episodic, semantic, procedural, and core memory stores. ## Core Features & Use Cases - Four Memory Stores: Episodic daily logs, a semantic knowledge graph with entities and relations, procedural workflow files, and a vault for pinned memories that never decay. - Decay-Based Forgetting: Relevance scores decay over time using a configurable half-life, reinforced by access counts, so stale memories fade instead of cluttering retrieval. - Reflection Engine: Sleep-time consolidation cycles that extract facts, rewrite core memory, and produce internal-monologue reflections with self-awareness tagging and a token reward system. - Multi-Agent Access & Audit Trail: Shared-read, gated-write model where sub-agents propose memories, plus git commits and audit.log tracking for every mutation. - Use Case: Set up a long-running personal AI assistant that remembers your preferences, consolidates daily conversations into a knowledge graph, and evolves its self-image over weeks of use. ## Quick Start Run the init_memory.sh script against my workspace directory, then enable memorySearch in my agent config and append the memory block template to AGENTS.md.

Frequently Asked Questions about cognitive-memory

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

FAQPage Schema
How do I set up persistent memory for an AI agent?

Run the init_memory.sh script with your workspace path to create the directory structure, copy templates, and initialize git tracking. Then enable memorySearch in your agent config and append the agents-memory-block template to AGENTS.md.

How does decay-based memory forgetting work?

Each memory gets a relevance score computed from base relevance, days since last access, access count, and a type weight. Scores below 0.05 are archived and hidden from search, while vault memories never decay.

Can multiple agents share the same memory stores?

Yes, the system uses a shared-read, gated-write model. All agents can read every store, but only the main agent writes directly; sub-agents submit proposals to pending-memories.md for review and commit.

Why is my agent memory not persisting between sessions?

Check that memorySearch.enabled is true in your config, verify MEMORY.md exists in the workspace, and restart the gateway. Also confirm the init script created the memory directory structure and git repository.

What triggers a memory reflection cycle?

Reflection runs when the user says reflect, on soft triggers like going to sleep after confirmation, or on a schedule. It never auto-runs without user approval and requires a token request step first.