OpenWalrusOpenWalrus

Sessions

Manage agent conversation sessions — list active sessions, inspect state, and clean up stale ones.

A session is a lightweight conversation container. It holds the message history for one interaction between a user and an agent.

What a session contains

FieldDescription
idUnique u64 counter ID
agentName of the agent handling this session
created_byWho started it ("cli", "tg:12345", "dc:67890")
created_atWhen the session was created
historyVec<Message> — the conversation so far

Sessions are ephemeral — they exist only in memory and are lost when the daemon restarts. Durable knowledge goes through memory.

CLI commands

List sessions

walrus session list

Shows all active sessions with their ID, agent name, creator, message count, and age.

Kill a session

walrus session kill <id>

Closes the session and frees its message history.

Session lifecycle

  • REPLwalrus attach creates a session on first message. The session persists until you exit.
  • Channels — Telegram and Discord maintain one session per chat ID. The first message in a chat creates a new session; subsequent messages reuse it.
  • Tasks — Each spawned task gets its own session, which is auto-closed when the task finishes.

When a session encounters a stale-session error (e.g., after a daemon restart), channels automatically recover by creating a new session.

What's next

On this page