Skip to main content
The session journal hook writes a rolling log of conversation summaries and extracted facts for each agent session.

Enable

Session journal is opt-in per agent:
sessionJournal:
  enabled: true
Or load it via a hook preset:
hooks:
  presets:
    - "audit"

What it records

  • Timestamp and session ID
  • A short summary of the turn (generated by the model)
  • Key facts extracted from the conversation
  • Token counts for the turn
Journal files are written to ~/.openclaw/journals/<agent-id>/<date>.jsonl.

Configuration

sessionJournal:
  enabled: true
  summarizeEveryN: 5
  extractFacts: true
  maxEntries: 1000
  outputDir: "~/.openclaw/journals"
KeyTypeDefaultDescription
enabledbooleanfalseEnable journal for this agent
summarizeEveryNinteger5Turns between journal writes
extractFactsbooleantrueInclude LLM-extracted facts per entry
maxEntriesinteger1000Entries per JSONL file before rotation
outputDirstring~/.openclaw/journalsDirectory for journal files

Limitations

  • Entries are written asynchronously — a crash mid-turn may skip an entry
  • extractFacts: true adds a small LLM call per summarized turn