Skip to main content

Personal AI Operations Memory: Building a Learning System for Git-Ops

Ryan Dahlberg
Ryan Dahlberg
February 1, 2026 8 min read
Share:
Personal AI Operations Memory: Building a Learning System for Git-Ops

Origin Story: October 2025

I built the first version of Aiana back in October 2025. The initial MVP was straightforward: capture Claude Code sessions, store them in SQLite with FTS5, and provide a CLI to search through past conversations. It worked, but it was a passive archive—useful for looking things up, not for making Claude smarter.

Then I stumbled across claude-supermemory, and it re-sparked my imagination.


Aiana vs. claude-supermemory

Both projects aim to give Claude persistent memory. But they take fundamentally different approaches:

Aspectclaude-supermemoryAiana
StorageCloud-based (supermemory.ai)100% local (SQLite + Redis + Qdrant)
PrivacyData leaves your machineData never leaves your machine
SearchAPI-basedLocal embeddings (sentence-transformers)
Context InjectionMCP tool callsAutomatic SessionStart hook
IntegrationClaude queries when neededClaude always starts with context
InfrastructureSaaS dependencySelf-hosted, Docker Compose

Why Aiana leads:

  1. Privacy by default - Your conversation history, patterns, and preferences stay on your machine. No cloud sync, no API calls to third parties.

  2. Automatic context injection - You don’t ask for context; you start with it. Every session begins with relevant memories pre-loaded.

  3. Three-layer architecture - SQLite for persistence, Redis for speed, Qdrant for semantic intelligence. Each layer optimized for its purpose.

  4. Graceful degradation - No Redis? Falls back to SQLite caching. No Qdrant? Falls back to FTS search. Aiana works with any combination of backends.

  5. Git-ops native - Built specifically for the infrastructure-as-code workflow, not as a general-purpose memory layer.

Both projects prove the same thesis: stateless AI assistants are leaving value on the table. But Aiana keeps that value in YOUR hands.


The Problem: Stateless Sessions

Every Claude Code session starts fresh. You repeat yourself. You re-explain preferences. You re-discover solutions.

Session 1: "Fix security vulnerabilities in cortex"
  → Claude figures out: Python, uv, qdrant-client issues
  → Creates PR, done

Session 2: "Fix security vulnerabilities in cortex-docker"
  → Claude starts from scratch
  → Re-discovers: Python, uv, same patterns
  → Slower, repetitive

Session 47: Same patterns, still starting fresh

What if your AI assistant could learn YOUR patterns? Remember YOUR preferences? Compound its knowledge over time?


Phase 2: The Memory Layer

Today I enhanced Aiana with Redis, Qdrant, and context injection to transform it from a passive archive into an active learning system.

┌──────────────────────────────────────────────────────────────────┐
│                      AIANA (Phase 2: Memory Layer)                │
│                                                                   │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────────────┐   │
│  │   SQLite    │    │    Redis    │    │      Qdrant         │   │
│  │   (FTS5)    │    │   (Cache)   │    │  (Vector Search)    │   │
│  │             │    │             │    │                     │   │
│  │ - Sessions  │    │ - Hot data  │    │ - Embeddings        │   │
│  │ - Messages  │    │ - Rate lim  │    │ - Semantic search   │   │
│  │ - Full-text │    │ - Session   │    │ - Similar sessions  │   │
│  └─────────────┘    └─────────────┘    └─────────────────────┘   │
│                                                                   │
│  NEW Features:                                                    │
│  ├── Context Injection (SessionStart hook)                       │
│  ├── Semantic Search (Qdrant vectors)                            │
│  └── MCP Server Mode (expose to Claude)                          │
└──────────────────────────────────────────────────────────────────┘

What Changes

Before (Stateless)

Every session is an island. Knowledge evaporates.

After (Memory-Augmented)

Session 1: "Fix security vulnerabilities in cortex"
  → Claude figures out patterns
  → Aiana captures: "cortex uses uv, common issues with qdrant-client"
  → Qdrant embeds this knowledge

Session 2: "Fix security vulnerabilities in cortex-docker"
  → Aiana injects context:
    <aiana-context>
    ## Your Python Security Fix Pattern
    - Package manager: uv (not pip)
    - Lock file: uv.lock
    - Common vulnerabilities: qdrant-client, python-multipart
    - Workflow: security-fix.yml dispatches to Actions
    - You prefer: auto-create PR, run tests, no auto-merge
    </aiana-context>
  → Claude already knows the pattern
  → Faster, consistent, learns YOUR way

Session 47: Instant expertise in YOUR codebase

The Architecture

Three Storage Layers

SQLite (FTS5) - The foundation

  • Session transcripts
  • Message history
  • Full-text search

Redis - The speed layer

  • Active session state
  • Cached context (4-hour TTL)
  • User preferences (static + dynamic)
  • Rate limiting

Qdrant - The intelligence layer

  • Vector embeddings (sentence-transformers)
  • Semantic search across memories
  • Similarity matching for related sessions

Context Injection

On every SessionStart, Aiana:

  1. Fetches your profile (static preferences)
  2. Loads project-specific context
  3. Searches for semantically relevant memories
  4. Injects as <aiana-context> block
# Context gets injected automatically
<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 (esbuild, eslint)
- Updated to vitest 4.x
- Created blog post series

## Recent Context
- Working on Aiana enhancements
- Integrating Redis and Qdrant
</aiana-context>

MCP Server Mode

Aiana now exposes memory operations via MCP:

# Start as MCP server
aiana mcp

Available Tools

ToolPurpose
memory_searchSemantic search across memories
memory_addManually add memories/notes
memory_recallGet context for a project
session_listList recorded sessions
session_showView session details
preference_addAdd user preferences
aiana_statusSystem health check

Claude Desktop Integration

{
  "mcpServers": {
    "aiana": {
      "command": "aiana",
      "args": ["mcp"]
    }
  }
}

Now Claude can query your past sessions:

“What did I do to fix cortex last time?”

And Aiana will search semantically through your memories.


How This Compounds

Week 1

You: "How do I fix Python vulnerabilities?"
Aiana: No context, Claude figures it out

Week 4

You: "Fix vulns in my Python repos"
Aiana: "You use uv, prefer PRs, here's your pattern..."
→ 50% faster

Week 12

You: "Security sweep"
Aiana: "Running your standard security sweep pattern across
        30 repos. Last time you excluded archived repos and
        auto-skipped low severity. Same approach?"
→ 80% faster, YOUR workflow encoded

Cross-Tool Memory

Aiana isn’t just for git-steer. It’s for ALL your MCP servers:

┌─────────────────────────────────────────────────────────────┐
│                     AIANA (Memory Layer)                     │
│                                                              │
│  Remembers patterns from:                                    │
│  ├── git-steer sessions (repo patterns, security fixes)     │
│  ├── unifi-mcp sessions (network configs, troubleshooting)  │
│  ├── proxmox-mcp sessions (VM patterns, resource allocation)│
│  ├── k3s-mcp sessions (deployment patterns, helm configs)   │
│  └── cloudflare-mcp sessions (DNS patterns, worker configs) │
│                                                              │
│  Cross-pollinates knowledge:                                 │
│  "Last time you deployed to K3s, you also updated Cloudflare│
│   DNS and configured UniFi firewall rules. Want me to do    │
│   all three?"                                                │
└─────────────────────────────────────────────────────────────┘

Docker Deployment

The full stack runs with Docker Compose:

services:
  aiana:
    image: ry-ops/aiana:latest
    depends_on:
      - redis
      - qdrant
    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
# Start the stack
docker compose up -d

# Check status
docker compose exec aiana aiana status

CLI Commands

Memory Operations

# Search memories semantically
aiana memory search "security vulnerabilities"

# Add a manual memory
aiana memory add "cortex uses uv for Python dependencies" --type pattern

# Recall context for a project
aiana memory recall git-steer

Preferences

# Add permanent preference
aiana prefer "Uses conventional commits"

# Add temporary preference
aiana prefer "Working on Aiana enhancements" --temporary

The Git-Ops Lifestyle

This isn’t just about faster sessions. It’s about building a learning system:

Traditional: Tools → Do tasks → Forget
Your approach: Tools → Do tasks → Remember → Improve → Compound

Every git-steer command, every security fix, every deployment pattern gets:

  • Captured by session hooks
  • Embedded as vectors
  • Indexed for semantic search
  • Injected into future sessions

What’s Next

Short-term

  • Enhanced session summaries
  • Automatic pattern extraction
  • Cross-session linking

Medium-term

  • All MCP servers integrated with Aiana
  • Workflow suggestions based on history
  • Anomaly detection (“this is unusual for this repo”)

Long-term

  • Your entire ops workflow encoded
  • New projects inherit your patterns
  • Claude sessions feel like working with an experienced teammate

The Premise

You’re not just building tools. You’re building a learning system.

Infrastructure as code, operations as memory, improvement as default.

This is the git-ops lifestyle.


Repository: github.com/ry-ops/aiana

Stack: Python, Redis, Qdrant, sentence-transformers, MCP SDK

License: MIT


Part of the ry-ops ecosystem: git-steer | aiana | cortex

#Aiana #MCP #Redis #Qdrant #Vector Search #Claude #Memory #AI Ops #Privacy #Self-Hosted

Explore aiana on GitHub

Check out the source code, documentation, and contribute to the project.