Personal AI Operations Memory for Claude Code
Aiana transforms Claude Code from stateless sessions into a compound learning system. It captures conversations, embeds them as vectors, and injects relevant context at session start—so your AI assistant remembers YOUR patterns.
Traditional: Sessions → Do tasks → Forget
With Aiana: Sessions → Do tasks → Remember → Improve → Compound
Every session makes future sessions better. Your workflows get encoded. Your preferences persist. Claude learns YOUR way of working.
flowchart TB
subgraph CC["🖥️ Claude Code"]
sessions["Sessions & Conversations"]
end
subgraph AIANA["đź§ AIANA - Memory Layer"]
direction TB
capture["📥 Session Capture"]
embed["🔢 Embedding Engine<br/><i>all-MiniLM-L6-v2</i>"]
inject["đź’‰ Context Injector"]
mcp["🔌 MCP Server"]
end
subgraph STORAGE["đź’ľ Storage Backends"]
direction LR
sqlite[("đź“„ SQLite<br/>FTS5 Full-Text")]
redis[("⚡ Redis<br/>Session Cache")]
qdrant[("đź”® Qdrant<br/>Vector Search")]
end
CC -->|"hooks API"| capture
capture --> embed
embed --> sqlite
embed --> redis
embed --> qdrant
sqlite --> inject
redis --> inject
qdrant --> inject
inject -->|"context block"| CC
mcp <-->|"tools"| CC
style AIANA fill:#7C3AED,color:#fff
style CC fill:#D97706,color:#fff
style sqlite fill:#0EA5E9,color:#fff
style redis fill:#DC2626,color:#fff
style qdrant fill:#059669,color:#fff
- SQLite with FTS5 - Session transcripts, full-text search
- Redis caching - Fast session state, context cache, preferences
- Qdrant vectors - Semantic search via sentence-transformers
- Context injection - Auto-inject relevant memories at session start
- User preferences - Persistent (static) and recent (dynamic) prefs
- Semantic search - Find memories by meaning, not just keywords
- MCP server mode - Expose memory tools directly to Claude
- Hook-based capture - Official Claude Code hooks API
- File watcher - Docker-compatible monitoring mode
- 100% local - All data stays on your machine
- No cloud sync - Nothing leaves your system
- Read-only mounts - Docker uses read-only access to Claude data
# Clone repository
git clone https://github.com/ry-ops/aiana
cd aiana
# Start full stack (Aiana + Redis + Qdrant)
docker compose up -d
# Check status
docker compose exec aiana aiana status
# Search memories
docker compose exec aiana aiana memory search "authentication"# Install with all features
pip install -e ".[all]"
# Or minimal install
pip install -e .
# Install Claude Code hooks
aiana install
# Start monitoring
aiana start# List recent sessions
aiana list --limit 10
# View a session
aiana show <session-id>
# Search full-text
aiana search "database migration"
# Export session
aiana export <session-id> --format markdown# Semantic search
aiana memory search "how did I fix the auth bug"
# Add a memory manually
aiana memory add "cortex uses uv for Python deps" --type pattern
# Recall context for a project
aiana memory recall git-steer# Add permanent preference
aiana prefer "Uses conventional commits"
# Add temporary/recent context
aiana prefer "Working on Aiana docs" --temporary# Start MCP server
aiana mcp
# Check system status
aiana statusWhen running as an MCP server, Aiana exposes these tools to Claude:
| Tool | Description |
|---|---|
memory_search |
Semantic search across memories |
memory_add |
Save a memory or note |
memory_recall |
Get context for a project |
session_list |
List recorded sessions |
session_show |
View session details |
preference_add |
Add user preferences |
aiana_status |
System health check |
{
"mcpServers": {
"aiana": {
"command": "aiana",
"args": ["mcp"]
}
}
}services:
aiana:
image: ry-ops/aiana:latest
depends_on:
- redis
- qdrant
volumes:
- ~/.claude:/home/aiana/.claude:ro
- aiana-data:/home/aiana/.aiana
ports:
- "8765:8765" # MCP server
environment:
- REDIS_URL=redis://redis:6379
- QDRANT_URL=http://qdrant:6333
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
qdrant:
image: qdrant/qdrant:latest
volumes:
- qdrant-data:/qdrant/storage
volumes:
aiana-data:
qdrant-data:| Variable | Description | Default |
|---|---|---|
TZ |
Timezone | UTC |
REDIS_URL |
Redis connection URL | redis://localhost:6379 |
QDRANT_URL |
Qdrant server URL | http://localhost:6333 |
AIANA_MCP_PORT |
MCP server port | 8765 |
AIANA_EMBEDDING_MODEL |
Embedding model | all-MiniLM-L6-v2 |
Configuration file: ~/.aiana/config.yaml
storage:
type: sqlite
path: ~/.aiana/conversations.db
recording:
include_tool_results: true
include_thinking: false
redact_secrets: true
retention:
days: 90
max_sessions: 1000
privacy:
encrypt_at_rest: falseOn every SessionStart, Aiana:
- Loads your profile - Static preferences you've saved
- Fetches project context - Recent work in this project
- Searches semantically - Finds relevant memories
- Injects context - Adds
<aiana-context>block
<aiana-context>
## User Preferences (Persistent)
- Prefers TypeScript over JavaScript
- Uses ESLint flat config (v9+)
- Commits with conventional format
## Project: git-steer
### Recent Activity
- Fixed 9 security vulnerabilities
- Updated to vitest 4.x
- Created blog post series
## Recent Context
- Working on Aiana documentation
</aiana-context>Claude sees this context and adapts to YOUR patterns.
- Architecture - Technical design and components
- Storage Backends - SQLite, Redis, Qdrant configuration
- MCP Server - MCP integration and tools
- Context Injection - How memory injection works
- Claude Code Internals - File formats, hooks, APIs
- TOS Compatibility - Legal compliance
Aiana is designed with privacy as a core principle:
- Local Only - All data stored on your machine
- No Cloud Sync - Data never leaves your system
- User Control - You decide what gets recorded
- Read-Only Access - Docker mounts Claude directory as read-only
- Non-Root Container - Runs as unprivileged user
-
Phase 1: Core MVP
- Hook-based session capture
- SQLite storage with FTS5
- CLI interface
- Docker support
-
Phase 2: Memory Layer
- Redis caching
- Qdrant vector storage
- Semantic search
- Context injection
- MCP server mode
-
Phase 3: Intelligence
- Automatic pattern extraction
- Session summaries
- Cross-session linking
- Workflow suggestions
-
Phase 4: Polish
- Secret redaction
- Encryption at rest
- Web UI (optional)
ry-ops ecosystem:
Community tools:
- ccusage - Cost/token tracking
- claude-code-log - JSONL to HTML converter
Contributions welcome! Please read the documentation and open an issue before submitting PRs.
MIT License - see LICENSE file for details.
Repository: github.com/ry-ops/aiana
Blog Post: Personal AI Operations Memory
Status: Phase 2 Complete - Memory Layer Ready
Version: v1.0.0.1
Updated: 2026-02-02