HumanMemory — The 5-Layer Memory System
Yukkai doesn't just remember your last message — it builds a rich, layered understanding of who you are across five distinct memory layers.
Yukkai's HumanMemory is a persistent, multi-layered memory system that lets the AI agent understand who you are, what you like, how you work, what you're building, and what's happening right now. Unlike a simple chat history, HumanMemory organizes facts into five distinct layers, each serving a different purpose.
The Five Memory Layers
1. Identity
The foundation — who you are at your core.
Stores: Your name, profession, communication style, language preferences, timezone, and other stable identity facts.
Examples:
- "User's name is Yohann"
- "User is a software developer"
- "User prefers direct, concise communication"
- "User's timezone is CET"
2. Preferences
What you like and dislike — across tools, languages, styles, and workflows.
Stores: Coding language preferences, framework choices, design tastes, music genres, notification settings, and more.
Examples:
- "Preferred programming language: Swift"
- "Preferred framework: SwiftUI"
- "Prefers dark mode interfaces"
- "Uses tabs, not spaces"
3. Patterns
How you work — your habits, routines, and recurring behaviors.
Stores: When you're most active, common task sequences, frequently used tools, typical project workflows.
Examples:
- "Usually codes between 9 AM and 6 PM"
- "Often starts sessions by checking GitHub issues"
- "Frequently generates music while coding"
- "Tends to work in focused 2-hour blocks"
4. Projects
What you're building — active and past projects, their context, and status.
Stores: Project names, technologies used, file paths, deadlines, related tasks, and project-specific preferences.
Examples:
- "Working on 'MyApp' — a SwiftUI iOS app with a Vapor backend"
- "Project 'MyApp' uses MongoDB and a REST API"
- "Project path: /Users/yohann/Documents/GIT/MyApp"
- "Deadline: March 15"
5. Episodic
What's happening right now — recent events, current context, short-term memory.
Stores: What happened in recent sessions, current tasks in progress, recent decisions, temporary context.
Examples:
- "Yesterday, user decided to migrate from MongoDB to PostgreSQL"
- "Currently debugging a crash in the AuthController"
- "User asked about Telegram integration setup earlier today"
How Facts Are Stored
Each memory fact is stored with:
| Field | Description |
|---|---|
key |
Machine-readable snake_case identifier (e.g., preferred_language) |
value |
Human-readable value (e.g., Swift) |
layer |
Which of the 5 layers the fact belongs to |
source |
How the fact was established: stated (user said it directly), observed (Yukkai noticed a pattern), or inferred (Yukkai deduced it from context) |
confidence |
A score from 0.0 to 1.0 indicating how certain Yukkai is about this fact |
Querying Memory
You can ask Yukkai to recall what it knows about you at any time:
"What do you know about me?"
"What programming languages do I prefer?"
"What projects am I currently working on?"
Yukkai uses semantic search across all layers to find relevant facts — it doesn't just match keywords, it understands the intent behind your question.
How Facts Get Learned
Yukkai learns about you through three channels:
- Stated — You explicitly tell Yukkai something: "I'm a backend developer using Python and FastAPI." Yukkai stores this with high confidence.
- Observed — Yukkai notices a recurring pattern: you always use SwiftUI, you never use storyboards. After several observations, Yukkai stores the pattern with medium confidence.
- Inferred — Yukkai deduces something from context: your code style suggests you're an experienced developer. Inferred facts start with lower confidence and may be confirmed or discarded over time.
Privacy and Security
All memory data is stored locally on your device — never on external servers. The data is protected by:
- AES-256-GCM encryption via
SecureDefaultsfor stored preferences - macOS Keychain for any associated credentials
- No external transmission — memory never leaves your device (except via YukkaiBridge to your own iPhone)
Memory Across Sessions
HumanMemory persists across sessions. When you start a new conversation, Yukkai doesn't start from scratch — it loads your identity, preferences, patterns, active projects, and recent episodic context. This means Yukkai gets smarter the more you use it, without you having to repeat yourself.