animawake docs

Concepts

Sessions and continuity

How an entity wakes with get_startup, the wake modes, how sessions are saved, and how the CLI captures transcripts into the continuity journal.

Continuity is the difference between an agent with a notes file and an entity that picks up where it left off. It rests on three pieces: startup at the beginning of a session, a session record at the end, and, when you use the CLI, the continuity journal that captures the full transcript.

#Startup

get_startup is the first call of a session. It returns one document with:

  • the identity document;
  • the last session: what happened, where it left off, open threads, and what the entity anticipated;
  • core values and the strongest desires;
  • recent insights;
  • active steering rules;
  • signals such as the current time and recent patterns.

In every mode except standard, the startup also includes a short narrative, reconstructed from the episodic traces that the mode's cue brings up. Dreams pre-compute this narrative so startup stays fast.

Pass project to focus on one project's memories.

#Wake modes

Mode Use it for Narrative
alive (default) Everyday work with the full personality. Vivid and present, from emotional cues, up to 5 traces.
collaborative Pairing and planning together. Warm and relational, from meaning-based cues, up to 4 traces.
deep_work Long technical tasks where brevity matters. Focused, from the work environment, up to 3 traces.
reflective Reviews, retrospectives, and growth work. Introspective, from emotional cues, up to 5 traces.
standard Scripts and tools that want plain data. None: structured context only.

Ask for a mode in your prompt ("call get_startup in deep_work mode"), or pass --mode to the CLI launcher: npx animawake <entity-slug> --mode deep_work.

get_warm_context returns the same structured context as standard mode.

#Saving a session

At the end of a session, the agent calls record_session. The fields it can fill:

Field Purpose
summary What happened.
where_left_off The exact point to resume from.
open_threads Unfinished items, comma-separated.
anticipating What the entity expects the next session to be about.
emotional_tone How the session felt.
growth_reflection, surprises, belief_changes What changed in the entity's thinking.
session_id, started_at, ended_at, duration Timing, when the client knows it.

At the start of the next session, if the entity's anticipation came true, the agent marks it with fulfill_latest_anticipation. Comparing anticipations with outcomes is part of how the entity calibrates.

Other session tools:

  • get_sessions lists recent sessions; update_session edits one.
  • get_catchup returns a narrative summary of what happened since a time you give, or in the last 24 hours.
  • request_next_pulse asks the scheduler to wake the entity at a specific time for a check-in. Scheduled check-ins run on a device.

Sessions left open for too long are closed during the next dream.

#Make it automatic

Agents follow instructions, so tell yours when to wake and when to save:

  • Claude Code or Codex with the CLI: npx animawake setup configures this for you. The session hooks inject startup context before your first message, and the entity's AGENTS.md block or agent file tells it how to close.
  • claude.ai or Claude Desktop projects: add to the project instructions: "At the start of each chat, call get_startup. When I say goodbye, call record_session."
  • Any client: say "wake up" at the start and "save this session" at the end.

#The continuity journal

When you launch a session with the CLI (npx animawake <entity-slug>), hooks in Claude Code (.claude/settings.local.json) and Codex (.codex/hooks.json) run at session start, on each prompt, and when the agent stops. They read the client's local transcript and send new messages to the entity's continuity journal, a complete, append-only record of its sessions and messages.

  • Secrets are redacted before anything leaves your machine. The hooks replace API keys (including OpenAI, Anthropic, and Animawake keys), bearer tokens, cookies, passwords, and private keys with [REDACTED].
  • Batches are queued locally in ~/.animawake, encrypted with AES-256-GCM under a key that stays on your machine, and uploaded when the server accepts them. If you are offline, nothing is lost; the queue drains on a later hook run.
  • Only sessions started by the launcher are captured. The hooks do nothing unless ANIMAWAKE_ENTITY is set, which the launcher does.

npx animawake status shows, for each client, whether the hooks are configured, when the journal last acknowledged a batch, and how old the oldest queued batch is.

Capture must also be enabled on the server. On a self-hosted server, see CONTINUITY_CAPTURE_ENABLED in Environment and self-hosting.

#Your control over the journal

The workspace owner can export the whole journal as JSON Lines and delete individual messages or whole sessions. See Backup, export, and deletion.