v0.0.5 — Phase 4: Memory & Intelligence

jason.woltje
Fri, 13 Mar 2026 13:57:07 +0000

Phase 4: Memory & Intelligence

@mosaic/memory

PreferencesRepo: user preference KV store (CRUD + upsert, categories)

InsightsRepo: knowledge store with pgvector embedding column (1536 dims)

Semantic search via cosine distance

Relevance decay for old insights

VectorStore + EmbeddingProvider interfaces for future abstraction

@mosaic/log

AgentLogsRepo: structured log ingest (single + batch)

Flexible query builder (session, level, category, tier, date range)

Tiered storage: hot (7d) → warm (30d) → cold (90d) → purge

Summarization Pipeline

SummarizationService: cheap LLM extracts insights from aging logs

CronService (node-cron): summarization every 6h, tier management daily

Job tracking via summarization_jobs table

Agent Integration

Memory tools injected into all agent sessions:

memory_search, memory_get_preferences, memory_save_preference, memory_save_insight

EmbeddingService (OpenAI-compatible, configurable)

Skill Management

SkillsService + SkillsController at /api/skills

CRUD + enable/disable toggle

Supports builtin/community/custom sources

Stats

5 new DB tables, 5 new API endpoint groups

All 18 packages: typecheck, lint, format clean

10 unit tests passing

PR feat(Phase 4): Memory & Intelligence — memory, log, summarization, skills (#91)

Milestones

Phase 0-3: ✓

Phase 4: Memory & Intelligence (v0.0.5) ✓

Phase 5: Remote Control (v0.0.6) — next