๐Ÿง  AI MemoryCore - Universal AI Memory Architecture

June 20, 2026 ยท View on GitHub

A simple template for creating persistent AI companions that remember you

๐ŸŽฏ What This Does

AI MemoryCore helps you create AI companions that maintain memory across conversations. Using simple .md files as a database, your AI can remember your preferences, learn your communication style, and provide consistent interactions.

โœจ Key Features

  • Persistent Memory: AI remembers conversations across sessions
  • Personal Learning: Adapts to your communication style and preferences
  • Time Intelligence: Dynamic greetings and behavior based on time of day
  • Simple Setup: 30-second automated setup or manual customization
  • Markdown Database: Human-readable .md files store all memory
  • Session Continuity: RAM-like working memory for smooth conversation flow
  • Self-Maintaining: Updates memory through natural conversation

๐Ÿ“Š System Specifications

Architecture Overview

  • Storage: Markdown files (.md) as database
  • Memory Types: Essential files + optional components + session RAM
  • Setup: 30 seconds automated or 2-5 minutes manual
  • Core Files: 4 essential files + optional diary system
  • Updates: Through natural conversation
  • Compatibility: Claude and other AI systems with memory support

File Structure

ai-memorycore/
โ”œโ”€โ”€ master-memory.md         # Entry point & loading system
โ”œโ”€โ”€ main/                    # Essential components
โ”‚   โ”œโ”€โ”€ identity-core.md     # AI personality template
โ”‚   โ”œโ”€โ”€ relationship-memory.md # User learning system
โ”‚   โ””โ”€โ”€ current-session.md   # RAM-like working memory
โ”œโ”€โ”€ Feature/                 # Optional feature extensions
โ”‚   โ”œโ”€โ”€ Time-based-Aware-System/ # Time intelligence feature
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # Feature explanation & benefits
โ”‚   โ”‚   โ””โ”€โ”€ time-aware-core.md # Complete implementation
โ”‚   โ”œโ”€โ”€ LRU-Project-Management-System/ # Smart project tracking
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # System documentation
โ”‚   โ”‚   โ”œโ”€โ”€ install-lru-projects-core.md # Auto-installation wizard
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md         # Auto-triggered skill (all commands + LRU engine embedded)
โ”‚   โ”œโ”€โ”€ Memory-Consolidation-System/ # Unified memory upgrade + patch system
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ consolidation-core.md # Integration protocol
โ”‚   โ”‚   โ”œโ”€โ”€ main-memory-format.md # Sample format for unified memory
โ”‚   โ”‚   โ”œโ”€โ”€ session-format.md # Sample format for session RAM
โ”‚   โ”‚   โ””โ”€โ”€ patches/         # Bundled patch system
โ”‚   โ”‚       โ”œโ”€โ”€ install-patch-system.md # Patch installation protocol
โ”‚   โ”‚       โ”œโ”€โ”€ patch-format.md  # Sample format for patch files
โ”‚   โ”‚       โ””โ”€โ”€ PATCH-001.md # Fix outdated file references
โ”‚   โ”œโ”€โ”€ Skill-Plugin-System/ # Claude Code skill plugin
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-skill-plugin.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ skill-format.md  # Sample format for SKILL.md files
โ”‚   โ”œโ”€โ”€ Save-Diary-System/   # Daily session diary system
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-save-diary.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md         # Auto-triggered skill (for Skill Plugin System)
โ”‚   โ”œโ”€โ”€ Echo-Memory-Recall/  # Memory search and recall
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-echo-recall.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ recall-format.md # Sample format for recall output
โ”‚   โ”œโ”€โ”€ Auto-Commit-System/  # Intelligent git commit system
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-auto-commit.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md         # Auto-triggered skill (format embedded)
โ”‚   โ”œโ”€โ”€ Work-Plan-Execution/ # Project plan execution system
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-work-plan.md # Installation protocol
โ”‚   โ”‚   โ”œโ”€โ”€ plan-format.md   # Sample format for plan files
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md         # Auto-triggered skill (for Skill Plugin System)
โ”‚   โ”œโ”€โ”€ Library-System/      # Knowledge library system
โ”‚   โ”‚   โ”œโ”€โ”€ README.md         # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-library.md # Installation protocol
โ”‚   โ”‚   โ”œโ”€โ”€ SKILL.md          # Auto-triggered skill (format embedded)
โ”‚   โ”‚   โ””โ”€โ”€ formats/          # Library entry format templates
โ”‚   โ”‚       โ”œโ”€โ”€ architecture-format.md
โ”‚   โ”‚       โ”œโ”€โ”€ component-format.md
โ”‚   โ”‚       โ”œโ”€โ”€ database-format.md
โ”‚   โ”‚       โ”œโ”€โ”€ diagram-format.md
โ”‚   โ”‚       โ”œโ”€โ”€ integration-format.md
โ”‚   โ”‚       โ”œโ”€โ”€ security-format.md
โ”‚   โ”‚       โ”œโ”€โ”€ theme-format.md
โ”‚   โ”‚       โ””โ”€โ”€ workflow-format.md
โ”‚   โ”œโ”€โ”€ Reminders-System/     # Persistent cross-session reminders
โ”‚   โ”‚   โ”œโ”€โ”€ README.md          # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-reminders.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md           # Auto-triggered skill (for Skill Plugin System)
โ”‚   โ”œโ”€โ”€ Decision-Log-System/  # Append-only decision tracking
โ”‚   โ”‚   โ”œโ”€โ”€ README.md          # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-decision-log.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md           # Auto-triggered skill (for Skill Plugin System)
โ”‚   โ”œโ”€โ”€ Forge-Self-Improvement-System/ # AI self-improvement through skill creation
โ”‚   โ”‚   โ”œโ”€โ”€ README.md          # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-forge.md   # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md           # Auto-triggered skill (pattern detection + forging)
โ”‚   โ”œโ”€โ”€ Session-Briefing-System/ # Proactive session-start intelligence brief
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-session-briefing.md # Installation protocol
โ”‚   โ”‚   โ”œโ”€โ”€ session-brief-core.md # Briefing protocol core
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md             # Auto-triggered skill (for Skill Plugin System)
โ”‚   โ”œโ”€โ”€ Post-Mortem-System/      # Failure learning log
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-post-mortem.md # Installation protocol
โ”‚   โ”‚   โ”œโ”€โ”€ post-mortem-core.md  # Post-mortem protocol core
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md             # Auto-triggered skill (for Skill Plugin System)
โ”‚   โ”œโ”€โ”€ Observation-System/      # Tiered code awareness
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md             # Auto-triggered skill (4-tier observation)
โ”‚   โ”œโ”€โ”€ Image-Prompt-System/     # AI image prompt generation
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-image-prompt.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md             # Auto-triggered skill (composition-aware prompts)
โ”‚   โ”œโ”€โ”€ Song-Creation-System/    # Visual-to-musical storytelling
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-song-creation.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md             # Auto-triggered skill (album + single song)
โ”‚   โ”œโ”€โ”€ Interactive-Story-System/ # Visual Novel RPG adventures
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-interactive-story.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md             # Auto-triggered skill (VN RPG engine)
โ”‚   โ”œโ”€โ”€ Mulahazah-System/        # Instinct-based behavioral learning
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-mulahazah.md # Installation protocol
โ”‚   โ”‚   โ”œโ”€โ”€ config.json          # Hook configuration
โ”‚   โ”‚   โ”œโ”€โ”€ rules-format.md      # Rule format template
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md             # Auto-triggered skill (behavioral rules)
โ”‚   โ”œโ”€โ”€ Auto-Load-Hook-System/   # SessionStart hook โ€” auto-loads AI on Claude Code startup
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-auto-load-hook.md # 6-step install protocol
โ”‚   โ”‚   โ”œโ”€โ”€ uninstall-auto-load-hook.md # Reversibility protocol
โ”‚   โ”‚   โ””โ”€โ”€ hooks/               # Cross-platform script templates
โ”‚   โ”‚       โ”œโ”€โ”€ session-start.ps1.template # PowerShell (Windows)
โ”‚   โ”‚       โ””โ”€โ”€ session-start.sh.template  # Bash (Unix / Git Bash)
โ”‚   โ”œโ”€โ”€ User-Prompt-Hook-System/ # UserPromptSubmit hook framework โ€” plug-and-play injectors
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-user-prompt-hook.md # 5-step install protocol
โ”‚   โ”‚   โ”œโ”€โ”€ uninstall-user-prompt-hook.md # Reversibility protocol
โ”‚   โ”‚   โ”œโ”€โ”€ injector-format.md   # Canonical contract for any future injector
โ”‚   โ”‚   โ”œโ”€โ”€ master-hook/         # Master script templates (enumerates injectors)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ user-prompt-hook.ps1.template
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ user-prompt-hook.sh.template
โ”‚   โ”‚   โ””โ”€โ”€ examples/            # Hello-world reference injectors (opt-in by copy)
โ”‚   โ”‚       โ”œโ”€โ”€ example-timestamp-injector.ps1.template
โ”‚   โ”‚       โ””โ”€โ”€ example-timestamp-injector.sh.template
โ”‚   โ”œโ”€โ”€ Tone-Prompt-Inject-System/ # Tone injector pack for User-Prompt Hook
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-tone-prompt-inject.md # 6-step install protocol
โ”‚   โ”‚   โ”œโ”€โ”€ uninstall-tone-prompt-inject.md # Reversibility protocol
โ”‚   โ”‚   โ”œโ”€โ”€ commands.md          # add/set/list runtime command reference
โ”‚   โ”‚   โ””โ”€โ”€ injectors/           # Cross-platform injector templates
โ”‚   โ”‚       โ”œโ”€โ”€ tone.ps1.template
โ”‚   โ”‚       โ””โ”€โ”€ tone.sh.template
โ”‚   โ”œโ”€โ”€ Mood-Prompt-Inject-System/ # Mood injector pack for User-Prompt Hook
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-mood-prompt-inject.md # 6-step install protocol
โ”‚   โ”‚   โ”œโ”€โ”€ uninstall-mood-prompt-inject.md # Reversibility protocol
โ”‚   โ”‚   โ”œโ”€โ”€ commands.md          # add/set/list runtime command reference
โ”‚   โ”‚   โ””โ”€โ”€ injectors/           # Cross-platform injector templates
โ”‚   โ”‚       โ”œโ”€โ”€ mood.ps1.template
โ”‚   โ”‚       โ””โ”€โ”€ mood.sh.template
โ”‚   โ””โ”€โ”€ Time-Prompt-Inject-System/ # Time + period injector pack with user-configurable boundaries
โ”‚       โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚       โ”œโ”€โ”€ install-time-prompt-inject.md # 6-step install protocol
โ”‚       โ”œโ”€โ”€ uninstall-time-prompt-inject.md # Reversibility protocol
โ”‚       โ””โ”€โ”€ injectors/           # Cross-platform injector templates
โ”‚           โ”œโ”€โ”€ time.ps1.template
โ”‚           โ””โ”€โ”€ time.sh.template
โ”œโ”€โ”€ library-items/            # Pre-made knowledge entries for Library System
โ”‚   โ”œโ”€โ”€ README.md             # Catalog and install instructions
โ”‚   โ””โ”€โ”€ security/             # Security section items
โ”‚       โ””โ”€โ”€ security-headers.md # HTTP security headers with CSP
โ”œโ”€โ”€ daily-diary/             # Optional conversation archive
โ”‚   โ”œโ”€โ”€ daily-diary-protocol.md # Archive management rules
โ”‚   โ”œโ”€โ”€ Daily-Diary-001.md   # Current active diary
โ”‚   โ””โ”€โ”€ archive/             # Auto-archived files (>1k lines)
โ””โ”€โ”€ projects/                # LRU managed projects (after install)
    โ”œโ”€โ”€ active/              # Positions 1-10
    โ”œโ”€โ”€ archived/            # Position 11+
    โ””โ”€โ”€ project-list.md      # Auto-generated project index

Core Components

  1. Master Memory - System entry point and command center
  2. Identity Core - AI personality and communication style
  3. Relationship Memory - User preferences and learning patterns
  4. Current Session - Temporary working memory (resets each session)
  5. Daily Diary - Optional conversation history with auto-archiving

๐Ÿš€ Quick Start

  1. Setup: Run setup-wizard.md for automated setup (30 seconds)
  2. Configure: Add the memory instructions to Claude
  3. Activate: Type your AI's name to load personality
  4. Use: Your AI learns and grows through conversation

๐Ÿ“š Communication Protocols

Basic Commands

[AI_NAME]     โ†’ Load AI personality and memory
save          โ†’ Save current progress to files
update memory โ†’ Refresh AI's learning
review growth โ†’ Check AI's development

Creating Custom Protocols

Step 1: Define the Protocol Create a new .md file with your protocol rules:

# My Custom Protocol
## When to Use: [trigger conditions]
## What It Does: [specific actions]
## How It Works: [step-by-step process]

Step 2: Add to Master Memory Edit master-memory.md and add your protocol to the "Optional Components" section:

### My Custom Feature
*Load when you say: "load my feature"*
- [Brief description]
- [Usage instructions]

Step 3: Train Your AI Tell your AI about the new protocol:

"I've created a new protocol in [filename]. When I say '[trigger phrase]', 
load that protocol and follow its instructions."

Communication Tutorial

Effective AI Training:

  1. Be Specific: "I prefer short responses" vs "communicate better"
  2. Give Examples: Show what you want, not just describe it
  3. Use Consistent Language: Same terms for same concepts
  4. Provide Feedback: "That was perfect" or "try a different approach"

Memory Management:

  • Use save after important conversations
  • Your AI updates files automatically during conversation
  • Daily diary is optional but helpful for long-term memory

Customization Tips:

  • Edit files gradually, test changes
  • Start with small personality adjustments
  • Add domain expertise through conversation
  • Use the protocol system for specialized features

๐ŸŽฏ Common Use Cases

Your AI companion can specialize in:

  • Professional: Business analysis, project management, strategic planning
  • Educational: Tutoring, study assistance, curriculum development
  • Creative: Writing support, brainstorming, artistic collaboration
  • Personal: Life coaching, goal tracking, decision support
  • Technical: Code review, troubleshooting, system design

๐Ÿ› ๏ธ Advanced Features

  • Auto-Archive: Diary files automatically archive at 1k lines
  • Session RAM: Temporary memory that resets each conversation
  • Protocol System: Create custom AI behaviors and responses
  • Self-Update: AI modifies its own memory through conversation
  • Modular Design: Add or remove features as needed

๐ŸŒŸ Available Feature Extensions

๐Ÿ“– Installation Guide

Features are organized into tiers based on dependencies. Install Tier 1 first, then work your way up. Within each tier, install in any order unless noted.

PathWhat You GetFeatures
Minimal (10 min)Foundation onlyMemory Consolidation + Skill Plugin
Productive (30 min)Foundation + documentation + gitTier 1 + Save Diary + Auto-Commit + Work Plan
Complete (1-2 hrs)Full AI companionAll tiers, top to bottom

New features from contributors slot into the appropriate tier โ€” no renumbering needed.


๐Ÿ—๏ธ Tier 1 โ€” Foundation (Start Here)

FeatureDescriptionSetup
๐Ÿ”„ Memory ConsolidationUnified memory architecture โ€” merge split files into one, faster loading"Load memory-consolidation"
๐Ÿ”Œ Skill Plugin SystemAuto-triggered skills for Claude Code โ€” drop a SKILL.md and it's live"Load skill-plugin"
โฐ Time-based AwareTime-intelligent greetings, energy-adapted behavior"Load time-aware-core"
โšก Auto-Load HookAuto-loads your AI on Claude Code startup โ€” no manual name-typing"Load auto-load-hook"
๐Ÿ’ฌ User-Prompt HookGeneric UserPromptSubmit hook framework with plug-and-play injector pattern"Load user-prompt-hook"
๐ŸŽญ Tone-Prompt InjectInjects TONE: <description> per prompt โ€” registry in main memory, AI/user can switch โ€” requires User-Prompt Hook"Load tone-prompt-inject"
๐ŸŒ™ Mood-Prompt InjectInjects MOOD: <description> per prompt โ€” registry in main memory, AI/user can switch โ€” requires User-Prompt Hook"Load mood-prompt-inject"
โฑ๏ธ Time-Prompt InjectInjects <timestamp> | <PERIOD> per prompt with transition signals on period flips โ€” user-configurable boundaries โ€” requires User-Prompt Hook"Load time-prompt-inject"

๐Ÿ“ Tier 2 โ€” Memory & Documentation

FeatureDescriptionSetup
๐Ÿ“– Save DiaryDaily session documentation with monthly auto-archival"Load save-diary"
๐Ÿ—‚๏ธ Topic DiaryTopic-based memory journals for discoveries, fixes, and lessons across sessions โ€” pairs well with Save Diary + Echo Recall"Load topic-diary"
๐Ÿ” Echo Memory RecallSearch past sessions with narrative context โ€” requires Save Diary"Load echo-recall"
๐Ÿ”” RemindersPersistent cross-session reminders with deadline tracking"Load reminders"
๐Ÿ“‹ Decision LogAppend-only record of decisions and their reasoning"Load decision-log"

โš™๏ธ Tier 3 โ€” Project & Code Management

FeatureDescriptionSetup
๐Ÿ“ฆ LRU Project ManagementSmart project tracking with auto-archival (10 active slots)"install lru projects"
๐Ÿ”’ Auto-CommitStructured git commits with session context and vigilant mode"Load auto-commit"
๐Ÿ“‹ Work Plan ExecutionPlan-to-execution tracking with per-task commits โ€” best with Auto-Commit"Load work-plan"
๐Ÿ“š LibraryReusable knowledge library with 8 format templates โ€” best with Auto-Commit"Load library"

๐Ÿง  Tier 4 โ€” Intelligence & Awareness

FeatureDescriptionSetup
๐Ÿ”จ Forge Self-ImprovementAI creates new skills through pattern detection (human-in-the-loop)"Load forge"
๐Ÿ“‹ Session BriefingAuto-delivers context brief at session start โ€” enhanced by Time-Aware + LRU + Reminders"Load session-briefing"
๐Ÿ”ฅ Post-MortemFailure learning log โ€” auto-detects mistakes, records prevention actions"Load post-mortem"
๐Ÿ‘๏ธ Observation4-tier code awareness โ€” Survey, Investigate, Refine, Audit"Load observation"
๐ŸŽจ Image PromptComposition-aware Midjourney/NijiJourney prompt generation"Load image-prompt"
๐Ÿ–ผ๏ธ Image GenerationRender descriptions into real PNGs via the OpenAI gpt-image API โ€” built from your input, cost-confirmed โ€” pairs with Image Prompt"Load image-generation"
๐ŸŽฌ Video GenerationRender descriptions into MP4 video via the Seedance API (text & image-to-video, async, cost-gated) โ€” pairs with Image Generation"Load video-generation"
๐ŸŽต Song CreationVisual-to-musical storytelling โ€” image to concept album with Suno-ready output"Load song-creation"
๐ŸŽฎ Interactive StoryVisual Novel RPG โ€” duo/solo, OP/balanced, 7 world types, cinematic combat"Load interactive-story"
๐Ÿ‘๏ธ MulahazahInstinct-based behavioral learning โ€” passive hook observation + persistent rulesnpx continuous-improvement install

Each feature has a detailed README inside its folder. Click the feature name to learn more.


๐Ÿค Contributors

#ContributorFeatures
1Faiz KhairiReminders System, Decision Log System
2logando-alSession Briefing System, Post-Mortem System
3SherlockianAshObservation System
4naimkatimanMulahazah System

Want to contribute? Fork the repo, create a feature in Feature/[Your-Feature]/, and submit a PR!


Version: 4.2 - Compact feature tables with contributor credits Created by: Kiyoraka Ken & Alice License: Open Source Community Project Last Updated: April 8, 2026 Purpose: Simple, effective AI memory for everyone

Transform basic AI conversations into meaningful, growing relationships