๐ง 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 filesstore 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
- Master Memory - System entry point and command center
- Identity Core - AI personality and communication style
- Relationship Memory - User preferences and learning patterns
- Current Session - Temporary working memory (resets each session)
- Daily Diary - Optional conversation history with auto-archiving
๐ Quick Start
- Setup: Run
setup-wizard.mdfor automated setup (30 seconds) - Configure: Add the memory instructions to Claude
- Activate: Type your AI's name to load personality
- 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:
- Be Specific: "I prefer short responses" vs "communicate better"
- Give Examples: Show what you want, not just describe it
- Use Consistent Language: Same terms for same concepts
- Provide Feedback: "That was perfect" or "try a different approach"
Memory Management:
- Use
saveafter 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.
| Path | What You Get | Features |
|---|---|---|
| Minimal (10 min) | Foundation only | Memory Consolidation + Skill Plugin |
| Productive (30 min) | Foundation + documentation + git | Tier 1 + Save Diary + Auto-Commit + Work Plan |
| Complete (1-2 hrs) | Full AI companion | All tiers, top to bottom |
New features from contributors slot into the appropriate tier โ no renumbering needed.
๐๏ธ Tier 1 โ Foundation (Start Here)
| Feature | Description | Setup |
|---|---|---|
| ๐ Memory Consolidation | Unified memory architecture โ merge split files into one, faster loading | "Load memory-consolidation" |
| ๐ Skill Plugin System | Auto-triggered skills for Claude Code โ drop a SKILL.md and it's live | "Load skill-plugin" |
| โฐ Time-based Aware | Time-intelligent greetings, energy-adapted behavior | "Load time-aware-core" |
| โก Auto-Load Hook | Auto-loads your AI on Claude Code startup โ no manual name-typing | "Load auto-load-hook" |
| ๐ฌ User-Prompt Hook | Generic UserPromptSubmit hook framework with plug-and-play injector pattern | "Load user-prompt-hook" |
| ๐ญ Tone-Prompt Inject | Injects TONE: <description> per prompt โ registry in main memory, AI/user can switch โ requires User-Prompt Hook | "Load tone-prompt-inject" |
| ๐ Mood-Prompt Inject | Injects MOOD: <description> per prompt โ registry in main memory, AI/user can switch โ requires User-Prompt Hook | "Load mood-prompt-inject" |
| โฑ๏ธ Time-Prompt Inject | Injects <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
| Feature | Description | Setup |
|---|---|---|
| ๐ Save Diary | Daily session documentation with monthly auto-archival | "Load save-diary" |
| ๐๏ธ Topic Diary | Topic-based memory journals for discoveries, fixes, and lessons across sessions โ pairs well with Save Diary + Echo Recall | "Load topic-diary" |
| ๐ Echo Memory Recall | Search past sessions with narrative context โ requires Save Diary | "Load echo-recall" |
| ๐ Reminders | Persistent cross-session reminders with deadline tracking | "Load reminders" |
| ๐ Decision Log | Append-only record of decisions and their reasoning | "Load decision-log" |
โ๏ธ Tier 3 โ Project & Code Management
| Feature | Description | Setup |
|---|---|---|
| ๐ฆ LRU Project Management | Smart project tracking with auto-archival (10 active slots) | "install lru projects" |
| ๐ Auto-Commit | Structured git commits with session context and vigilant mode | "Load auto-commit" |
| ๐ Work Plan Execution | Plan-to-execution tracking with per-task commits โ best with Auto-Commit | "Load work-plan" |
| ๐ Library | Reusable knowledge library with 8 format templates โ best with Auto-Commit | "Load library" |
๐ง Tier 4 โ Intelligence & Awareness
| Feature | Description | Setup |
|---|---|---|
| ๐จ Forge Self-Improvement | AI creates new skills through pattern detection (human-in-the-loop) | "Load forge" |
| ๐ Session Briefing | Auto-delivers context brief at session start โ enhanced by Time-Aware + LRU + Reminders | "Load session-briefing" |
| ๐ฅ Post-Mortem | Failure learning log โ auto-detects mistakes, records prevention actions | "Load post-mortem" |
| ๐๏ธ Observation | 4-tier code awareness โ Survey, Investigate, Refine, Audit | "Load observation" |
| ๐จ Image Prompt | Composition-aware Midjourney/NijiJourney prompt generation | "Load image-prompt" |
| ๐ผ๏ธ Image Generation | Render descriptions into real PNGs via the OpenAI gpt-image API โ built from your input, cost-confirmed โ pairs with Image Prompt | "Load image-generation" |
| ๐ฌ Video Generation | Render descriptions into MP4 video via the Seedance API (text & image-to-video, async, cost-gated) โ pairs with Image Generation | "Load video-generation" |
| ๐ต Song Creation | Visual-to-musical storytelling โ image to concept album with Suno-ready output | "Load song-creation" |
| ๐ฎ Interactive Story | Visual Novel RPG โ duo/solo, OP/balanced, 7 world types, cinematic combat | "Load interactive-story" |
| ๐๏ธ Mulahazah | Instinct-based behavioral learning โ passive hook observation + persistent rules | npx continuous-improvement install |
Each feature has a detailed README inside its folder. Click the feature name to learn more.
๐ค Contributors
| # | Contributor | Features |
|---|---|---|
| 1 | Faiz Khairi | Reminders System, Decision Log System |
| 2 | logando-al | Session Briefing System, Post-Mortem System |
| 3 | SherlockianAsh | Observation System |
| 4 | naimkatiman | Mulahazah 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