Memory & State
Leif's persistent-state layers — self-document, bootstrap context, notes, checkpoints, tasks, projects, commitments — and when to reach for each.
Claude is stateless between sessions; Leif is not. Everything that needs to survive a conversation lives on the Leif side, in one of a handful of layers. Each layer has a different shape and a different job. Reaching for the wrong one (a note where a task belongs, a checkpoint where a living doc belongs) works, but it scatters state and makes it harder to find later.
This page is the map of those layers, from “read this every time” to “long-running structured work.”
Self-document
The single, authoritative description of Leif and its operating context. Read at session start, treated as read-only during normal work.
read_self— load the self-document
This is the one layer that is always consulted, not consulted on demand.
Bootstrap context (living docs)
Per-scope living documents that capture the durable state of a subsystem — the things that are true across sessions but specific to one area of work. Read the relevant scope before acting in that area; update it when the state changes.
bootstrap_context— load the living docs for a scopeupdate_bootstrap_context/update_bootstrap_context_tool— keep them current as state changes
Treat returned living docs as the source of truth for their scope.
Notes
Lightweight, free-form memory for facts and observations that don’t fit a more structured layer. Cheap to write, easy to search.
save_note— record a fact or observationget_recent_notes— pull the latest notessearch_notes— find notes by content
Checkpoints & progress
State for in-flight work — where a multi-step task left off, so it can resume cleanly in a later session instead of starting over.
save_progress— checkpoint the current state of a taskload_progress— resume from a saved checkpointcomplete_task— mark a checkpointed task donecleanup_old_checkpoints— prune stale checkpoints
Tasks
Discrete, trackable units of work with status and relationships. Use this when something needs to be remembered as a to-do rather than just noted.
create_task/capture_task— add a taskupdate_task/complete_leif_task— change status or close it outsearch_tasks/list_tasks/list_active_tasks— find taskslink_tasks/break_down_task— express dependencies and decompose work
Projects
The container layer above tasks — a named project with its own context, status, and active-project pointer. Use it to group related work and carry project-specific context across sessions.
create_project/get_project/list_projects— manage projectsset_active_project— set the working contextget_project_status/get_project_context/update_project_context— read and maintain per-project state
Commitments
Promises and obligations that need to surface again at the right time — follow-ups, deadlines, things owed to a person. Distinct from tasks in that they are time-aware and meant to resurface.
create_commitment/update_commitment/close_commitment— manage commitmentslist_commitments— review open commitmentscommitments_due_for_surfacing/mark_commitment_surfaced— surface the ones that are due and record that they were raised
Affect trends
A short-lived emotional-trajectory log maintained automatically by the memory synthesis cycle — no tool writes to it directly. Each extraction window is tagged with valence, energy, and recurring states; a 14-day trend line is injected into the user context so conversations can account for a two-week slump or a streak of wins instead of reading each message in isolation. Entries age out after 28 days, and the layer is read-only from the conversation side.
Disable with AFFECT_TRENDS_ENABLED=false. See
Personality & Emotional Range
for how the trend feeds tone adaptation.
Higher-level reads
Synthesized views over the layers above — useful for orienting at the start of a conversation or pulling history on a topic or person.
get_topic_overview— what’s known about a topicget_person_summary— context on a personconversation_analytics— patterns across past conversationssearch_past_conversations— find prior discussion
Related pages
- Architecture — where persistent state sits in the overall system
- Personality & Emotional Range — how styles, repair, and check-ins build on these layers
- Tools — the full Leif MCP tool catalog