Skip to main content
GAIA Agent Memory is a persistent knowledge system that gives your agent a second brain. It remembers facts, preferences, errors, and workflows across sessions — so every conversation picks up where the last one left off. All data stays local on your machine in a single SQLite file.
First time here? Complete the Setup guide first, then come back to enable memory.
Memory is currently integrated into the Chat Agent. Any agent built on the GAIA Agent base class can add memory via the MemoryMixin — see the Memory SDK Reference for developer details.
Memory is opt-in (beta) and disabled by default. This feature is still under active development — every new GAIA install ships with memory off, so you’ll see standard chat behavior until you turn it on. See Enable Memory below before trying any examples on this page.

Enable Memory

Memory is off by default. Turn it on once and it stays on for every future gaia chat session on this machine.
  1. Launch the Agent UI: gaia chat --ui
  2. Click the Brain icon in the toolbar to open the Memory Dashboard.
  3. Click the Off toggle next to Memory; a confirmation modal appears. Click Enable Memory in the modal to confirm. The agent picks up the change on its next message — no restart needed.

Via the API (for headless / scripted setups)

Verify it stuck:
Until you enable memory, none of the behaviors on this page (cross-session recall, automatic extraction, the Memory Dashboard’s knowledge browser) will activate — sessions run in “incognito” mode and nothing is written to ~/.gaia/memory.db.
Once enabled, conversations are summarized into ~/.gaia/memory.db — a plaintext SQLite file (not encrypted). The Sensitive Data section below explains the sensitive flag for controlling system-prompt visibility; do not store passwords or tokens in agent memory.

Try It Right Now

Five minutes after you enable memory (above). Here’s what a second brain feels like:
1

Start a conversation

2

Teach it about you

3

Ask what it knows

4

Add a time-sensitive item

5

Start a new session

Close the chat and start fresh:
6

Watch it remember

The agent remembered across sessions — no copy-paste, no notes app.
7

Open the dashboard

Click the Brain icon in the toolbar. You’ll see every memory the agent has, filterable and editable.

How It Works

Agent memory operates on four principles:
  1. Store automatically once enabled — conversations, tool calls, errors, and preferences are captured without manual effort
  2. Recall naturally — hybrid semantic+keyword search finds memories by meaning, not just exact words. The LLM decides when to search using its own tools (no forced pre-query step).
  3. Learn continuously — LLM extraction from every conversation, not just regex patterns. The agent sees what it already knows and decides what’s new, what’s changed, and what’s contradicted — like intelligent memory management.
  4. Be temporally aware — the agent knows the current time, what is coming up, what is overdue, and proactively surfaces time-sensitive items
Everything is stored in a single file at ~/.gaia/memory.db (SQLite with WAL mode for concurrent reads). No cloud services, no external dependencies.

Quick Start

1

Bootstrap your memory

Run the day-zero onboarding flow. The agent asks a few questions about you and optionally scans your system to discover projects, tools, and interests:
You can run just the conversational part or just the system discovery:
Bootstrap is repeatable. Run it again anytime to refresh the agent’s understanding. New discoveries will not overwrite items you have manually edited.
2

Check memory status

See how much the agent knows and how the memory is structured:
This shows counts by category (fact, preference, error, skill, note, reminder), context (work, personal, global), total conversations, tool call stats, and database size.
3

Start chatting

With memory enabled (see Enable Memory above), the agent injects relevant knowledge into its system prompt and uses memory tools during conversation:
Try saying things like:
  • “Remember that our project uses React 19 with the app router”
  • “I prefer concise answers with code examples”
  • “What do you know about me?”
  • “What did we talk about last week?”

Memory Tools

The agent has 5 memory tools it can use during conversation. You do not call these directly — the LLM decides when to use them based on your conversation.

remember

Stores a new fact, preference, error pattern, or skill in persistent memory.

recall

Searches memory for relevant knowledge using hybrid semantic+keyword search — it finds concepts, not just exact keywords. If you say “frontend framework,” it matches memories about React, Vue, and Angular, even if those exact words aren’t in your query.
Recall also supports temporal filtering with time_from and time_to. The agent converts natural language dates to concrete time ranges using the current date it always knows:

update_memory

Modifies an existing memory entry. The agent uses recall first to find the ID, then updates it.

forget

Removes a specific memory entry by ID.

search_past_conversations

Searches across all past conversation sessions by keyword, time range, or both.

Your Second Brain

Memory turns GAIA into a personal knowledge system that grows smarter with every conversation. Here are real things you can try right now.

Daily Journal

Log your work at the end of the day. Recall it weeks later without digging through notes.

Meeting Notes

Capture standup notes, and the agent automatically extracts per-person facts and deadlines.

Research & Reading Notes

Save article summaries, then find them by concept — not just keywords.
The semantic search found the match even though you asked about “retrieval accuracy” and the memory says “cross-encoder reranking” — because it searches by meaning.

Personal Reminders

Set reminders with due dates. The agent surfaces them proactively — even if you’re talking about something else.
Recurring reminders work too — the agent advances the date automatically each time it fires:

Contact Profiles

Build knowledge about people across conversations. The agent links everything to entities.

Error Learning

When a tool fails, the agent remembers the error pattern and avoids it next time — automatically.
No manual intervention — the agent learned from failure and adapted.

Knowledge Categories

Every memory entry belongs to one of six categories:
CategoryWhat it storesExample
factThings about you, your projects, your world”User’s project uses React 19 with app router”
preferenceHow you want the agent to behave”User prefers concise answers”, “Always use dark mode”
errorTool error patterns to avoid in the future”pip install torch fails without —index-url on this machine”
skillLearned workflows and multi-step patterns”To deploy: run tests, build, push to staging, verify, promote”
noteFree-form observations, journal entries, or meeting notes”Standup 2026-04-01: API migration complete”
reminderTime-sensitive items to follow up on”Check if the PR was merged by Friday” (use with due_at)
The agent automatically categorizes knowledge when you ask it to remember something. You can also specify the category explicitly:

Context Scoping

Different areas of your life produce different knowledge. Without scoping, the agent mixes work deployment commands with personal dentist appointments. Contexts keep them separate.
ContextWhen it is activeWhat it contains
globalAlways includedUniversal preferences, your name, timezone
workWork-related tasksColleagues, project details, work tools
personalPersonal assistant modeAppointments, health goals, personal contacts
Custom (e.g., project-x)User-defined per projectProject-specific facts, skills, errors
The agent’s system prompt always includes global items plus items from the active context. You can switch contexts mid-session:
When you use gaia chat, the default context is global. You can start with a specific context by telling the agent, or programmatically via init_memory(context="work") in the SDK.

Sensitive Data

Some knowledge is private — email addresses, API tokens, health information, financial data. The sensitive flag controls how this data is handled:
WhereNormal (default)Sensitive
System promptIncludedNever included
recall resultsReturnedReturned (explicit query only)
Tool history argsFull args loggedArgs redacted to keys only
Memory DashboardNormal displayContent blurred until clicked
The agent can still access sensitive data when you explicitly ask for it via recall — it just will not be broadcast in the system prompt where it could leak into logs or debugging output.
Sensitive data is still stored in plaintext in ~/.gaia/memory.db. The sensitive flag controls visibility, not encryption. Do not store passwords or tokens in agent memory — use your OS keyring for credentials.

Entity Linking

For managing contacts, apps, and services, the agent associates knowledge with specific entities using a type:name convention:
Entity patternExample knowledge
person:sarah_chen”Sarah Chen, VP Engineering, [email protected]
person:sarah_chen”Sarah prefers morning meetings”
app:vscode”User prefers dark mode, 4-space tabs”
service:gmail”User’s work email is [email protected]
project:gaia”Project uses Python 3.12, uv for package management”
Multiple entries can share an entity, building a profile over time. When you say “email Sarah about the roadmap,” the agent calls recall(entity="person:sarah_chen") to get her email and preferences.

Temporal Awareness

The agent always knows the current date and time. It can track commitments and deadlines using the due_at field on memory entries.

How reminders work

  1. You mention something time-sensitive — the agent stores it with a due_at date
  2. As the date approaches, the agent sees it in its per-turn context and proactively mentions it
  3. After mentioning it, the agent marks reminded_at so it does not repeat itself
  4. If the due date passes, the item appears as overdue until resolved

Accountability

The agent can hold you accountable to your own commitments:

Intelligent Extraction

After each conversation turn (with memory enabled), the agent automatically decides what’s worth remembering — without you saying “remember.” This isn’t pattern matching; the LLM sees your existing memory alongside the new conversation and makes intelligent decisions:
  • ADD — new knowledge not already in memory
  • UPDATE — a fact has changed (old version preserved with lineage)
  • DELETE — information explicitly contradicted

How it works

You say “we switched from React to Vue.” The agent:
  1. Searches existing memory, finds "Project uses React 19" (stored last month)
  2. Recognizes this is a correction, not a new fact
  3. Creates a new entry: "Project uses Vue 3 (switched from React)"
  4. Marks the old React entry as superseded_by the new one — preserving history
No duplicate. No contradiction. The old fact is still visible in the dashboard’s superseded view if you ever want to see how things evolved.

What gets extracted

The agent extracts information that would be useful in future conversations — facts, preferences, project details, people, deadlines. It skips greetings, task confirmations, and ephemeral details.
Intelligent extraction kicks in for messages of 20+ words. Short messages like “yes” or “thanks” are skipped. The LLM’s explicit memory tools (remember, update_memory, forget) still handle anything the auto-extraction misses.

Memory Dashboard

The Agent UI includes a full-page Memory Dashboard for viewing and managing everything the agent knows. Click the Brain icon in the toolbar to open it.

What you can see

  • Stats overview — total memories, sessions, tool calls, success rate, and embedding coverage
  • Knowledge browser — filterable, sortable table of all memory entries with inline editing
  • Tool performance — per-tool success rates, error history, average duration
  • Upcoming and overdue — time-sensitive items due soon or past due
  • Conversation history — searchable archive of all past sessions with consolidation status
  • Superseded items — toggle to see fact history and how knowledge evolved over time

What you can do

  • Create new memory entries manually (stored with high confidence)
  • Edit any field on any memory entry — content, category, context, entity, sensitivity
  • Delete entries the agent got wrong
  • Toggle sensitive to hide or show private data
  • Search across all knowledge using hybrid semantic+keyword search
  • Filter by category, context, or entity

Maintenance actions

The dashboard also provides maintenance tools for keeping your memory healthy:
  • Consolidate — distill old conversation sessions into durable knowledge notes
  • Rebuild Embeddings — re-embed all knowledge items and rebuild the search index
  • Reconcile — scan for contradictory facts across sessions and resolve them automatically
To launch the Agent UI with the dashboard: gaia chat --ui

How Memory Improves Over Time

Confidence scoring

Every memory entry has a confidence score from 0.0 to 1.0:
SourceConfidenceHow created
LLM-extracted0.4Automatically captured from conversation
Discovery0.4Found during bootstrap system scan
Tool-stored0.5Agent explicitly called remember()
Error auto0.5Automatically stored from tool failure
Consolidation0.5Distilled from old conversation sessions
User-created0.8Manually added via the dashboard
Each time a memory is recalled, its confidence increases by +0.02. Frequently-used memories become more prominent in the system prompt.

Confidence decay

Memories that are not accessed for 30+ days have their confidence multiplied by 0.9. This happens once per session start. Over time, stale knowledge naturally fades from the system prompt in favor of actively-used information.

Fact lineage

When facts change, the old version is preserved with a superseded_by link. You can see the full history of how a fact evolved in the dashboard’s superseded view.
Each version keeps its original timestamp, so you can answer “what framework were we using in March?”

Automatic error learning

When a tool call fails, the agent automatically stores the error pattern as knowledge. Next time, the system prompt includes “Known errors to avoid” so the agent can handle or avoid the same failure.

Session consolidation

Conversations older than 14 days are automatically distilled into durable knowledge items. The LLM summarizes each old session and extracts facts worth preserving, then stores them as notes. The original conversations remain until the 90-day prune, but the extracted knowledge lives indefinitely. This means you never lose important context — even from conversations months ago.

Background reconciliation

On startup, the agent scans for contradictory facts across sessions and resolves them automatically. If it finds two items that say conflicting things (e.g., “uses PostgreSQL” and “migrated to DynamoDB”), it supersedes the older one and boosts the newer one’s confidence. Reinforcing facts get a confidence boost too. You don’t need to do anything — the agent keeps its own knowledge consistent.

Privacy

100% Local

All memory is stored in a single SQLite file at ~/.gaia/memory.db. Nothing is transmitted to any server or cloud service.

User Control

You can view, edit, and delete any memory entry via the dashboard or CLI. The agent only knows what you approve.

Bootstrap Consent

System discovery scans are opt-in. The agent shows you what it found and asks for approval before storing anything.

Sensitive Flagging

Mark any entry as sensitive to exclude it from the system prompt. Browser history and email addresses are auto-flagged during bootstrap.

Deleting all memory

To reset discovery-sourced items while preserving your manual edits:
To completely delete all memory, remove the database file:

CLI Reference

CommandDescription
gaia memory bootstrapRun full onboarding (conversation + discovery)
gaia memory bootstrap --chat-onlyConversational onboarding only
gaia memory bootstrap --discoverSystem discovery scan only
gaia memory bootstrap --resetDelete discovery items (with confirmation)
gaia memory bootstrap --systemRe-scan and refresh system context (OS, hardware, apps, versions)
gaia memory bootstrap --reset-systemClear system context entries and optionally disable auto-collection
gaia memory statusShow memory stats (counts, categories, contexts)

System context (versions, hardware, apps)

System facts — GAIA/Lemonade versions, OS, CPU/GPU/RAM, installed apps — are captured as system-category memories. Collection is opt-in: the system_context_enabled flag in ~/.gaia/memory_settings.json defaults to false. Enable it from the Agent UI Memory Dashboard or by running gaia memory bootstrap --system (which offers to turn it on). Once enabled, system facts auto-refresh on agent startup when either:
  • a tracked version (GAIA or Lemonade Server) no longer matches the live value — so version facts update immediately after an upgrade, or
  • the newest fact is more than 7 days old.
Each refresh clears the old system entries before re-collecting, so values are replaced rather than duplicated. To force a refresh yourself, run gaia memory bootstrap --system.

Next Steps

Memory SDK Reference

MemoryMixin API, MemoryStore class, and code examples for adding memory to custom agents

Agent UI

Desktop interface with Memory Dashboard for visual knowledge management

Agent SDK

Chat SDK for building conversational agents programmatically

Build Your First Agent

Create a custom agent with tools and memory in minutes