Skip to content

Enable memory

hal0’s memory subsystem is off by default. When enabled it gives agents a persistent recall store (Hindsight by default) plus an optional knowledge-graph extraction layer. Enabling it is a single environment flag — no code change, no reinstall.

  1. Set the flag. Add HAL0_MEMORY_ENABLED=1 to /etc/hal0/api.env:

    Terminal window
    echo 'HAL0_MEMORY_ENABLED=1' | sudo tee -a /etc/hal0/api.env
  2. Restart the API so create_app constructs the memory provider:

    Terminal window
    sudo systemctl restart hal0-api
  3. Confirm it’s wired. The graph status endpoint now responds with real state instead of degrading:

    Terminal window
    hal0 memory graph status

When the flag is set, hal0 builds the memory provider from your config. The default engine is Hindsight; if the Hindsight service is unreachable at startup, hal0 logs a warning and degrades to a local pgvector-backed provider rather than failing startup.

Storing recall items is one thing; running an LLM over them to extract a knowledge graph is heavier and separately gated. Control it with the hal0 memory graph sub-app (a thin client over /api/memory/graph).

Memory view showing live graph extraction status and counters Live memory and graph-extraction dashboard in hal0.

Terminal window
hal0 memory graph status
hal0 memory graph status --json

Shows whether extraction is on, the dispatch route, the configured upstream, and counters (builds OK, errors, in-flight, last build / error).

If you previously ran the Cognee-backed memory store, preview a migration into Hindsight banks:

Terminal window
hal0 memory migrate --dry-run
hal0 memory migrate --dry-run --cognee-dir /var/lib/hal0/memory/cognee

The report shows rows total / mapped / unmapped and whether it’s a no-op.