> ## Documentation Index
> Fetch the complete documentation index at: https://agent-memory.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Memory types

> How records relate and when each is written

## Observations

Hooks post every prompt and tool call as an observation. Without an LLM key each is compressed synthetically (type, title, files, narrative). With a key the LLM writes richer titles, facts, and concepts.

## Memories

Saved explicitly through `memory_save`, the REST endpoint, or automatic distillation. A save that closely matches an existing memory supersedes it: the new record becomes v2 with a link to v1, and v1 leaves the search indexes while remaining in the version chain. A save that is similar but below the supersession threshold returns a `similarTo` hint so the caller can consolidate deliberately.

## Lessons

Rules the agent should keep applying. Confidence rises by reinforcement and decays weekly when unused; lessons that decay to the floor without reinforcement are retired. Recall is index-backed and ranks by relevance times confidence times recency.

## Crystals

One per session: narrative, key outcomes, files touched, lessons surfaced. Imported JSONL transcripts derive crystals and lessons automatically.
