Skip to main content

Memory

Memory stores are workspace-scoped collections of text items used to preserve durable conventions, decisions, and operational knowledge across sessions. For agent access controls, see MCP built-in tools.

Access and scope

Memory is isolated by workspace and managed through the Memory page or permitted MCP tools.

PermissionCapability
memory.viewView stores and items in accessible workspaces.
memory.manageCreate, edit, and delete stores and items in accessible workspaces.

Open Memory, choose a workspace, and optionally filter by store or text. User permissions govern the page. Agent access is governed separately by the effective MCP tool selection, so granting page access does not grant agent access and vice versa.

Stores and items

A store groups related plain-text facts under a stable name.

Recommended stores include:

StoreSuitable content
conventionsStable coding, review, and deployment conventions.
decisionsCurrent architectural or operational decisions with concise rationale.
gotchasConfirmed recurring failure modes and their remedies.
glossaryDomain terms whose meaning is stable within the workspace.

Each item should contain one durable fact. Do not store credentials, tokens, personal data, temporary task status, raw logs, or content that should instead live in version-controlled documentation.

Manage memory in the UI

The Memory page provides audited manual maintenance for workspace knowledge.

  1. Open Memory and select the workspace.
  2. Create a store with a concise, stable name if one does not exist.
  3. Select the store and create one fact per item.
  4. Use text search and filters to find existing facts before adding duplicates.
  5. Edit stale items rather than adding contradictory replacements.
  6. Use confirmed delete actions to remove obsolete items or stores.

Deleting a store removes its items. Verify the workspace and store before confirming a destructive action.

Automatic context loading

Automatic loading places workspace memory into supported Polygent Code sessions without requiring an explicit tool call.

Open Dev Tools → Polygent Code → User Settings and enable Workspace memory. This setting requires administrator access or Manage Polygent Code User Settings. Disable it when memory is too broad or sensitive for automatic context; permitted agents can still query memory on demand.

Agent-accessible memory tools

Memory MCP tools allow selected agents to read and maintain memory at runtime.

ToolCapability
get_memory_itemsRead all items in a store or retrieve relevant matches for a query.
set_memory_itemsAdd multiple items and create the named store when needed.
remove_memory_itemsRemove selected items by ID.

Grant get_memory_items broadly only where workspace context is appropriate. Grant set_memory_items and especially remove_memory_items only to trusted session sources. Review agent-written memory periodically for duplication, stale guidance, and untrusted instructions.

Built-in MCP memory calls are limited to the run's workspace and effective tool grants. Current workspace membership is rechecked before each operation, and direct endpoint calls cannot widen that scope. Keep /mcp reachable only from trusted workers as defense in depth. See MCP Server security.

Data protection

Memory is application data and must be included in database backup, retention, and access-control procedures.

  • Include the configured database in backups; memory stores and items are persisted there.
  • Test restore procedures before relying on them.
  • Limit workspace membership and memory.manage to authorized users.
  • Treat exported or copied memory as potentially sensitive workspace data.
  • Remove stale or inappropriate agent-written entries promptly.

Troubleshooting

Memory troubleshooting distinguishes UI permissions, automatic loading, and MCP tool access.

SymptomResolution
Memory page is unavailableConfirm memory.view and workspace access.
Create or edit controls are unavailableConfirm memory.manage and workspace access.
Store is not listedClear filters, select the correct workspace, and refresh after creation.
Agent does not receive memory automaticallyEnable Workspace memory, then start a new session or send a new message after resuming.
Agent cannot query memoryExpose the built-in MCP server and get_memory_items; verify /mcp reachability for remote workers.
Agent cannot add or remove itemsExpose set_memory_items or remove_memory_items explicitly and check workspace capability limits.
Search returns no resultVerify the selected workspace and store, simplify the query, and confirm the item exists.
Guidance conflictsEdit or remove obsolete items so each topic has one current source of truth.