# Lev Memory

> Contract surface for Lev's 4-slot memory model (working, episodic, semantic, procedural) with pluggable providers.

- Skill: `lev-os/lev-memory` (Agent Skill)
- Install (CLI): `npx skillmds@latest add lev-os/lev-memory`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lev-os/lev-memory/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: lev-os (https://skillmd.com/u/lev-os)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/lev-os/lev-memory

---


# lev-memory

Contract surface for Lev's 4-slot memory model (working, episodic, semantic, procedural) with pluggable providers.

Symmetric peer to /lev-find and /lev-index on the retrieval side. Treats /cm
(CASS wrapper) and /cass-memory as backend providers under a single write/model
contract. Absorbs hm-04 (memory-provider composition) from hermes. Fixes the
skill-graph taxonomy asymmetry: 5 retrieval skills, 0 first-class write.

## Quick Start

```bash
lev exec --flow lev-memory
```

## Source of Truth

- dna/skills/lev-memory.intent.yaml
- dna/core/memory.dna.yaml
- core/domain/src (memory port types — when they land)

## Steps

1. Resolve slot: working | episodic | semantic | procedural
2. Select provider: built-in (default) or registered plugin (e.g. cm/cass, notion)
3. Validate write against slot schema (type, size, TTL constraints)
4. Execute write through provider adapter
5. Emit memory.{slot}.write LevEvent on core/event-bus
6. Apply promotion rules: working → episodic on dwell-time; episodic → semantic on frequency
7. Enforce eviction: per-slot TTL, LRU under pressure

## Done Condition

- Criteria: All 4 slots addressable through one contract AND ≥2 providers wired AND promotion rules documented and tested
- Metric: slot_working_addressable
- Metric: slot_episodic_addressable
- Metric: slot_semantic_addressable
- Metric: slot_procedural_addressable
- Metric: provider_count_ge_2
- Metric: promotion_rules_documented
- Metric: eviction_rules_enforced

<!-- Generated by flowmind compile --target=skill from lev-memory.flow.yaml -->
