Skip to Content
almyty docs — v1
Memory

Memory

Memory lets agents store and recall information across conversations. Agents can persist facts, preferences, context, and instructions that survive between runs, making them more useful over time.

Memories page

In the UI

  1. Navigate to Agents in the sidebar and open an agent’s detail page
  2. Click the Memory tab to view all memories associated with this agent
  3. Click Add Memory to create a memory manually
  4. Enter the content, select a type and scope, and click Save
  5. To edit or delete a memory, click the row and use the action buttons

Agents can also create memories automatically during conversations when configured with memory-enabled instructions.

Via the API

Create a memory

curl -X POST /memories \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "content": "The user prefers concise responses under 200 words", "type": "preference", "scope": "agent", "agentId": "agent-uuid" }'

List memories

curl "/memories?agentId=agent-uuid" \ -H "Authorization: Bearer $TOKEN"

Update a memory

curl -X PATCH /memories/{id} \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "content": "The user prefers concise responses under 150 words" }'

Delete a memory

curl -X DELETE /memories/{id} \ -H "Authorization: Bearer $TOKEN"

Search memories

Memories are embedded as vectors for semantic search. Query by meaning, not just keywords:

curl -X POST /memories/search \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "query": "response length preference", "agentId": "agent-uuid", "limit": 5 }'

Memory types

TypeDescriptionExample
factObjective information the agent has learned”The company uses PostgreSQL 16”
preferenceUser or behavioral preferences”Prefers bullet points over paragraphs”
contextBackground context for ongoing work”Currently migrating from v2 to v3 API”
episodeRecord of a past interaction or event”On 2026-03-15, user asked to reset their API keys”
instructionStanding instructions that guide behavior”Always include error handling in code examples”

Scopes

ScopeVisibilityUse case
agentSingle agent onlyAgent-specific knowledge and preferences
sharedAll agents in the organizationCross-agent knowledge (e.g., company coding standards)
globalAll agents across all organizations (admin)Platform-wide instructions

Configuration reference

FieldTypeDescription
contentstringThe memory text
typestringOne of: fact, preference, context, episode, instruction
scopestringOne of: agent, shared, global
agentIdstringRequired when scope is agent
metadataobjectOptional key-value pairs for tagging

How agents use memory

During execution, the agent’s memory module:

  1. Retrieves relevant memories via semantic search using the current conversation context
  2. Injects matching memories into the LLM prompt as additional context
  3. Optionally auto-saves new facts discovered during the conversation

Configure memory behavior in the agent’s settings under Memory — toggle auto-save, set the maximum number of memories injected per turn, and choose which scopes to include.