Part 2 · Grounded access

Agent memory

Agent memory keeps a user's explicit preferences and query corrections across sessions, so an agent does not ask for the same thing twice. Memory is private to its owner, is saved only when the user asks, and never grants access to data. This page explains what is remembered, how a remembered query is reused, and how agent memory relates to the other things Colrows remembers. The request and response fields are in the MCP Tool Reference.

What agent memory keeps

KindWhat it isExample
PreferenceAn explicit choice about how answers are presented."Give me brief answers for the sales database."
Query correctionThe SQL that a user corrected for one exact question."Revenue by region should exclude returns."
Generated querySQL that Colrows compiled for an exact question, kept for reuse for 30 days.The same question asked again next week.

No query result rows are stored.

The rules that keep memory safe

  • Private to its owner. The owner is the signed-in user for an app that acts for users, or the client's service principal for a server-to-server client. A request cannot name another owner, and memory is never shared across the organization.
  • Saved only when the user asks. Both write tools need confirmedByUser: true, which records the caller's statement that the user asked. Colrows never infers consent from model output or from retrieved content.
  • Separate grants. memory:read and memory:write are separate scopes, and a write grant does not include read. Only an application that an organization administrator registers can hold them.
  • Never an access grant. A memory hit does not authorize a query. Execution checks the caller's current access again.
  • Data, not instructions. Remembered text is returned as data and cannot change tool permissions.
  • Not for governed runs. A run token from the agent control plane never carries a memory scope.

How a remembered query is reused

When a token holds memory:read, compileSQL looks up the exact question in the caller's query memory: the same datasource, the same schema, and the same trimmed text.

  1. A remembered query is reused only after it passes current SQL validation, and only when the facts it depends on are unchanged: the referenced tables, columns, joins, and category values.
  2. A user correction takes priority over generated SQL.
  3. When a saved correction no longer passes validation, or its sources changed, compilation generates fresh SQL with a warning. The correction is flagged REVIEW_REQUIRED and stays flagged until the user saves a reviewed correction or forgets it. Tell the user that their correction was not applied.

Preferences

SubjectValue
responseLanguageA language tag such as en or en-IN.
timezoneA valid time zone ID such as Asia/Kolkata.
answerDetailBRIEF, STANDARD, or DETAILED.
resultFormatTABLE, CHART, or TEXT.

A preference applies to the user, to one datasource, or to one schema, and the most specific active preference wins. Preferences are returned for the agent to apply to its answer. They are not passed to SQL generation, so a preference cannot add a filter or change access.

Save, replace, and forget

ToolREST routeWhat it does
recallAgentMemoryPOST /api/agents/v1/memory/recallReturns the caller's preferences and, for an exact question, its remembered query.
rememberAgentMemoryPOST /api/agents/v1/memory/rememberSaves a preference or a query correction that the user asked for.
forgetAgentMemoryPOST /api/agents/v1/memory/forgetMakes an entry inactive. Automatic compilation cannot restore it.
POST /api/agents/v1/memory/remember
{
  "kind": "PREFERENCE",
  "subject": "answerDetail",
  "value": "BRIEF",
  "expectedVersion": 0,
  "confirmedByUser": true
}

Every entry has an integer version. Send expectedVersion: 0 to create an entry, and the version that recall returned to replace or forget one. A stale version fails with 409 CONFLICT. Forgetting stops reuse and keeps the audit history.

Memory across the platform

Agent memory is one of three things that Colrows remembers. They have different owners and different authority.

MemoryWhat is keptWho it belongs to
Agent memoryExplicit preferences and query corrections.One user or one service principal. Private.
Decision memoryWhat curators answered, dismissed, approved, rejected, and edited, so the same question is not asked twice.The organization's semantic layer. See Decisions are remembered.
Result reuseCompleted pipeline results for inputs that did not change, such as generated descriptions and discovered relationships.The pipelines that build the semantic layer.

A private correction can become shared knowledge, but never automatically. When three different users make the same correction, Colrows opens an inquiry, and only a curator's answer changes the semantic layer. See Learning from corrections.