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 |
|---|---|
| View Memory | View stores and items in accessible workspaces. |
| Manage Memory | Create, edit, and delete stores and items in accessible workspaces. |
Open Developer Tools → 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. |
Store names are unique within a workspace (case-insensitive) and up to 100 characters. 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 is where people review and correct what agents and colleagues have stored. Each item records who created it, from which session, and when; edits are not versioned.
- Open Developer Tools → 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.
How agents use memory
Memory stores are not added to an agent's context automatically — agents read and write them only through the memory tools below, when those tools are granted.
The Workspace memory option under Developer Tools → PolygentCode → User Settings controls a different source: host-level memory files (~/.config/polygent/AGENTS.md and ~/.claude/CLAUDE.md). To have agents consult a store routinely, grant get_memory_items and tell them which store to read in the workspace Guidelines or the bot prompt.
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 items matching the words of a query (case-insensitive keyword match, not semantic search). |
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.
Memory tool calls are limited to the run's workspace and tool grants; 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 Manage Memory 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.
| Symptom | Resolution |
|---|---|
| Memory page is unavailable | Confirm View Memory and workspace access. |
| Create or edit controls are unavailable | Confirm Manage Memory and workspace access. |
| Store is not listed | Clear filters, select the correct workspace, and refresh after creation. |
| Agent does not use stored memory | Stores are not loaded automatically; grant get_memory_items and name the store in guidelines or the prompt. |
| Agent cannot query memory | Grant get_memory_items in Polygent MCP Tools; verify McpUrl is reachable from 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 | Matching is by keyword; use words that appear in the item, and verify the workspace and store. |
| Guidance conflicts | Edit or remove obsolete items so each topic has one current source of truth. |