/memory-management

internal
Category:
Internal Skills

What it is

Core memory operations used by every GAIA agent -- session load/save, decision-log formatting, context summarization, stale detection, deduplication, and budget monitoring. This is the most-referenced internal skill in the framework.

Called by

What it does

Provides the standardized format for decision-log entries (date, agent, workflow, sprint, type, status, related references).

Handles session-load at agent startup: reads the decision log, conversation context, and ground truth from the agent's memory sidecar.

Handles session-save at workflow completion: formats and appends new decisions, replaces the conversation context summary.

Monitors token budget usage per agent tier and warns when approaching thresholds.

When you will see it surface

  • When a command starts, memory-management loads the agent's prior context. You may see a brief 'Loading memory...' message.
  • When a command completes, it saves session decisions. You may see 'Saving to memory...' at the end of a workflow.
  • If token budget is high, you may see archival guidance recommending /gaia-memory-hygiene.

Technical notes

  • Missing sidecar directories are handled gracefully -- empty structures are returned, no files created eagerly.
  • Decision logs use read-entire, append-in-memory, write-entire semantics (last-writer-wins).
  • All budget thresholds come from _memory/config.yaml -- never hardcoded.
  • Companion skill: memory-management-cross-agent handles cross-agent memory reads.