Skip to content

Memory

Memory is what makes your AI partner learn. Without it, every session starts from zero. With RaiSE memory, your AI carries forward patterns it learned, calibration data from past work, and a full session history — so it gets better the more you work together.

Memory lives in three places, each with a different purpose:

ScopeLocationVisibilityWhat goes here
Global~/.rai/All projectsUniversal patterns that apply everywhere
Project.raise/rai/memory/Shared (committed to repo)Project-specific patterns, calibration, team knowledge
Personal.raise/rai/personal/You only (gitignored)Your session history, telemetry, personal learnings

When the same concept exists in multiple scopes, personal overrides project, project overrides global. This means a team can share project patterns while each developer keeps their own session history.

Patterns are learnings captured during development. They represent what worked, what didn’t, and what to remember next time.

Terminal window
rai memory add-pattern "Use fixtures for database setup in tests" \
-t technical -c "pytest,testing" --from S3.5

Patterns have sub-types:

  • Process — workflow and collaboration patterns (e.g., “commit after each task”)
  • Technical — code techniques and gotchas (e.g., “use capsys for stdout tests”)
  • Architecture — design decisions and module patterns
  • Codebase — project-specific conventions

Calibration tracks how long stories actually take versus estimates. Over time, this builds a velocity profile that helps predict future work more accurately.

Terminal window
rai memory add-calibration S3.5 --name "Auth Module" -s M -a 45 -e 60

This records: story S3.5 was estimated at 60 minutes (size M) but actually took 45 — a velocity of 1.33x.

Sessions are a chronological record of what happened. Each session captures: what you worked on, what you accomplished, and what patterns you learned.

Terminal window
rai memory add-session "S3.5 Auth Module" -t story -o "JWT setup,Middleware,Tests"

This is the key insight: memory creates a compounding effect.

  1. Session 1: You discover that fixtures are better than inline setup for database tests
  2. Pattern captured: “Use fixtures for database setup” (technical pattern)
  3. Session 5: Your AI partner applies this pattern automatically — it’s in the context bundle
  4. Session 20: Your velocity has improved because patterns eliminate repeated discovery

The more sessions you run, the smarter the system gets. This isn’t ML or fine-tuning — it’s structured knowledge that flows into your AI’s context at session start.

All memory sources merge into a single queryable index:

Terminal window
# Build the unified index
rai memory build
# Query it
rai memory query "testing patterns" --types pattern
# List all concepts
rai memory list --memory-only

The index is a JSON file (.raise/rai/memory/index.json) that combines patterns, calibration, sessions, governance, work tracking, and skills into one graph. See Knowledge Graph for how this graph works.

CommandWhat it does
rai memory buildBuild unified index from all sources
rai memory querySearch memory for relevant concepts
rai memory listList all concepts in the index
rai memory add-patternRecord a learned pattern
rai memory add-calibrationRecord story timing data
rai memory add-sessionRecord a session
rai memory validateCheck index integrity

See the CLI Reference for full details on each command.