Memory

July 25, 2026 ยท View on GitHub

Memory is produced by session commit or explicit extraction, stored in the user memory namespace, and consumed through the content, file-system, and retrieval APIs.

Built-in Memory Types

CategoryLocationDescription
profileuser/memories/profile.mdUser profile information
preferencesuser/memories/preferences/User preferences by topic
entitiesuser/memories/entities/Important entities (people, projects)
eventsuser/memories/events/Significant events
identityuser/memories/identity.mdAssistant identity and self-introduction
souluser/memories/soul.mdAssistant principles, boundaries, style, and continuity
casesuser/memories/cases/Trainable and evaluable task cases
trajectoriesuser/memories/trajectories/Reusable operation contracts
experiencesuser/memories/experiences/Reusable execution insights
toolsuser/memories/tools/Tool usage knowledge and best practices
skillsuser/memories/skills/Skill execution knowledge and workflow strategies

These are the enabled built-in types. Deployments can extend or override them with custom memory templates.


API Reference

recall()

Search each memory type independently and assemble a bounded memory block that can be injected directly into Agent context. By default, recall searches events, entities, and preferences; the experiences quota defaults to 0 and must be enabled explicitly.

ParameterTypeRequiredDefaultDescription
querystringYes-Recall query
quotasobjectNoevents=10, entities=10, preferences=3, experiences=0Maximum results for each type
max_charsintegerNo6500Maximum rendered memory-block length
min_scorenumberNo0.1Minimum relevance score
peer_scopestringNoallactor searches only the current actor peer; all also searches global and other-peer memory
other_peer_penaltynumber/objectNoPer-type defaultsScore penalty applied to results from other peers
renderbooleanNotrueWhether to produce the rendered memory block

HTTP API

POST /api/v1/search/recall
Content-Type: application/json
curl -X POST http://localhost:1933/api/v1/search/recall \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-key" \
  -d '{
    "query":"OpenViking API documentation preferences",
    "quotas":{"events":5,"entities":5,"preferences":3,"experiences":2},
    "max_chars":6500,
    "peer_scope":"all"
  }'

MCP

recall(
  query="OpenViking API documentation preferences",
  quotas={"events": 5, "entities": 5, "preferences": 3, "experiences": 2},
  max_chars=6500,
  peer_scope="all"
)

Response

{
  "status": "ok",
  "result": {
    "entries": [
      {
        "uri": "viking://user/default/memories/preferences/api-docs.md",
        "score": 0.82,
        "type": "preferences",
        "mode": "full",
        "rank": 1,
        "content": "The user prefers API documentation with HTTP, SDK, and CLI examples.",
        "origin": "self"
      }
    ],
    "rendered": "## Global Memory\n### Preferences\n[1] viking://user/default/memories/preferences/api-docs.md (score=0.8200)\nThe user prefers API documentation with HTTP, SDK, and CLI examples.",
    "stats": {
      "quotas": {
        "events": 5,
        "entities": 5,
        "preferences": 3,
        "experiences": 2
      },
      "roots": [
        "viking://user/default/memories"
      ],
      "searched": {
        "events": 2,
        "entities": 1,
        "preferences": 1,
        "experiences": 0
      },
      "returned": 1,
      "dropped": 0,
      "max_chars": 6500,
      "min_score": 0.1,
      "peer_scope": "all",
      "other_peer_penalties": {
        "events": 0.1,
        "entities": 0.1,
        "preferences": 0.02,
        "experiences": 0.02
      },
      "origins": {
        "actor_peer": 0,
        "self": 1,
        "other_peer": 0
      }
    }
  }
}
FieldTypeDescription
entriesobject[]Structured matches selected by per-type quota and relevance
entries[].uristringViking URI of the memory entry
entries[].scorenumberRaw relevance score
entries[].typestringevents, entities, preferences, or experiences
entries[].modestringRendering mode: full, summary, or uri
entries[].rankintegerRank within the memory type, starting at 1
entries[].originstringSource: actor_peer, self, or other_peer
entries[].contentstringFull content when mode=full; otherwise it may be omitted
entries[].summarystringSummary used for degraded rendering; otherwise it may be omitted
entries[].abstractstringSearch-hit abstract; omitted when unavailable
renderedstringText bounded by max_chars and ready for Agent context injection; empty when render=false
statsobjectEffective quotas, roots, per-type search counts, returned and dropped counts, threshold, peer scope, and origin counts

The public Python, TypeScript, and Go SDKs and the ov CLI do not currently wrap type-quota recall, so this section shows only the HTTP tab and the existing MCP call.