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.
| Permission | Capability |
|---|---|
memory.view | View stores and items in accessible workspaces. |
memory.manage | Create, 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:
| Store | Suitable content |
|---|---|
conventions | Stable coding, review, and deployment conventions. |
decisions | Current architectural or operational decisions with concise rationale. |
gotchas | Confirmed recurring failure modes and their remedies. |
glossary | Domain 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.
- Open Memory and select the workspace.
- Create a store with a concise, stable name if one does not exist.
- Select the store and create one fact per item.
- Use text search and filters to find existing facts before adding duplicates.
- Edit stale items rather than adding contradictory replacements.
- 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.
| Tool | Capability |
|---|---|
get_memory_items | Read all items in a store or retrieve relevant matches for a query. |
set_memory_items | Add multiple items and create the named store when needed. |
remove_memory_items | Remove 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.manageto 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.
| Symptom | Resolution |
|---|---|
| Memory page is unavailable | Confirm memory.view and workspace access. |
| Create or edit controls are unavailable | Confirm memory.manage and workspace access. |
| Store is not listed | Clear filters, select the correct workspace, and refresh after creation. |
| Agent does not receive memory automatically | Enable Workspace memory, then start a new session or send a new message after resuming. |
| Agent cannot query memory | Expose the built-in MCP server and get_memory_items; verify /mcp reachability for remote workers. |
| Agent cannot add or remove items | Expose set_memory_items or remove_memory_items explicitly and check workspace capability limits. |
| Search returns no result | Verify the selected workspace and store, simplify the query, and confirm the item exists. |
| Guidance conflicts | Edit or remove obsolete items so each topic has one current source of truth. |