Skip to content

Memory ​

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
profileviking://user/{user_id}/memories/profile.mdUser profile information
preferencesviking://user/{user_id}/memories/preferences/User preferences by topic
entitiesviking://user/{user_id}/memories/entities/Important entities (people, projects)
eventsviking://user/{user_id}/memories/events/Significant events
casesviking://user/{user_id}/memories/cases/Trainable and evaluable task cases
trajectoriesviking://user/{user_id}/memories/trajectories/Reusable operation contracts distilled from agent task trajectories
experiencesviking://user/{user_id}/memories/experiences/Reusable execution insights
toolsviking://user/{user_id}/memories/tools/Tool usage knowledge and best practices
skillsviking://user/{user_id}/memories/skills/Skill execution knowledge and workflow strategies

These are the bundled types. tools and skills are disabled by default; extraction also depends on the effective memory policy and Agent Evolution settings. The table shows Self paths. Peer-enabled types can also be stored under viking://user/{user_id}/peers/{peer_id}/memories/. Deployment templates can extend or override the registry; the account template API permits only its documented fields and types.

memories/soul.md contains static agent instructions, initialized with the former Soul defaults when the user workspace is created. It is editable through the file APIs and is not extracted or merged on session commit. For existing users, initialization or the next self-memory commit creates a missing soul.md from these defaults. Existing soul.md and identity.md files are left unchanged.


Memory Recall ​

Use search(mode="context") to retrieve memories and assemble an injection-ready block. The server MCP exposes the same operation as search(mode="context"); there is no separate recall tool.

http
POST /api/v1/search/recall
Content-Type: application/json

/api/v1/search/recall is deprecated. It is a preset over search(mode="context") with purpose="coding" and the v1 defaults, kept for existing callers; responses carry a Deprecation: true header. Do not use it for new integrations.

Rules ​

Rules are compiled behavioral constraints stored as Markdown under viking://user/{user_id}/memories/rules, scoped to the authenticated account and user.

Compile rules ​

http
POST /api/v1/rules/compile
Content-Type: application/json
FieldTypeRequiredDefaultDescription
instructionstringNonullRule instructions, up to 64,000 characters; whitespace is trimmed
sourcesobject[]No[]Up to 16 sources, each either {"resource_uri":"viking://resources/policy"} for an ingested resource or a resource import request

Provide a non-empty instruction or at least one source. Sources must be parseable into readable text; multimodal sources are not supported. Unknown top-level fields are rejected.

json
{
  "instruction": "Ask for confirmation before deleting files.",
  "sources": []
}

Returns HTTP 202 Accepted with {"status":"ok","result":...}, where result is a task record with task_type="rule_compile" and a rul_ task ID. Poll GET /api/v1/tasks/{task_id} using the Tasks API. On completion, the task result contains rules_root, source_uris, plan_reason, batch_count, operations, written_uris, and write_result. Content indexing runs as separate background work identified by write_result.

Search applicable rules ​

http
POST /api/v1/rules/search
Content-Type: application/json
FieldTypeRequiredDefaultDescription
task_contextstringYes-Current task facts, 1–64,000 characters; must be non-empty after trimming
rule_probability_thresholdnumberNo0.65Minimum rule applicability probability, from 0 to 1 inclusive
json
{
  "task_context": "Delete a generated file from the workspace.",
  "rule_probability_threshold": 0.65
}

Returns HTTP 200 OK with {"status":"ok","result":...}. Only active rules are eligible. Unknown request fields are rejected.

Result fieldDescription
rulesMatching rules, each with atomic_id, revision, scenario_id, probability, uri, and complete Markdown content
scenariosRecalled scenario IDs
renderedRendered rules and application guidance for agent context
deliverycomplete, rule_count, and rendered_chars describe the delivered content
scenario_selectionScenario filtering diagnostics, or null
judge, warningOptional judge identifier and fallback warning

Open source under the AGPL-3.0 License. Font licenses