OpenViking Experience Memory
Use prior task Experience as advisory operational guidance. Keep the current
user request, current environment, and verified tool results authoritative.
Experience retrieval supplements normal context retrieval; it does not replace
user memory, events, preferences, session archives, resources, or Agent Skills.
Preconditions
- Use only OpenViking tools that are actually registered in the current Agent
runtime.
- Require both a semantic search capability and an exact URI read capability.
- If either capability is unavailable, continue without Experience. Do not
invent a tool call, fabricate a ToolPart, or replace the Agent tool call with
direct HTTP or CLI access.
- Do not substitute broad memory
recall for a search scoped to the Experience
root. Continue using the runtime's normal recall and retrieval flows when the
task also needs user facts, events, decisions, prior conversation, or domain
resources.
Select Runtime Tools
Choose the registered names that match the current runtime:
| Runtime |
Search |
Read |
| OpenViking MCP, Codex, Claude Code |
find or search |
read |
| OpenCode |
openviking_find or openviking_search |
openviking_read |
| OpenClaw |
ov_search |
ov_read or ov_multi_read |
The host may display MCP names with a namespace such as
mcp__openviking__find. Use the exact registered name and schema shown by the
runtime. Prefer find for a fast task-start lookup and search when session
context or deeper intent analysis is useful.
Retrieval Workflow
Decide whether the request is an executable task. Retrieve Experience for
planning, tool use, environment changes, multi-step workflows, or recovery
from a failed attempt. Skip retrieval for casual conversation and simple
knowledge answers.
Build one concise query containing the task goal, domain object, intended
operation, and important constraints. After a failure, include the failed
operation and stable error signature.
Search only the current user's Experience root:
viking://~/memories/experiences
For tools using MCP-style parameters, set target_uri to this root. For
OpenClaw ov_search, set uri to this root. Never hardcode default,
test, or another user ID. If the server rejects the URI, resolve the root
as described in Servers Without the Home Alias and retry once.
Start with limit=5 and the tool's normal score threshold. Judge results by
task, environment, preconditions, and likely effect; title similarity alone
is insufficient. If no result is relevant, continue without Experience and
do not broaden the search to unrelated memory directories.
Select only the one to three Experience files likely to change execution.
Require an exact file URI without a query or fragment. Ignore directories,
unrelated memory types, and sidecars such as .abstract.md and .overview.md.
Read every selected canonical viking://.../memories/experiences/... URI
with the runtime's OpenViking read tool. Search abstracts help selection but
are not a substitute for reading the Experience body.
Apply relevant steps and checks while executing the task. Do not repeat the
Experience verbatim to the user unless its content is directly needed in the
answer.
If execution fails for a materially new reason, perform at most one focused
follow-up search using the failure evidence, then read only newly relevant
Experience files.
Servers Without the Home Alias
viking://~ is the home alias for the caller's own space. A server released
before the alias (OpenViking v0.4.16) does not resolve it and rejects the
request with INVALID_URI (HTTP 400) instead of searching. Retry once against
the caller's explicit root, resolved from evidence rather than guessed:
- If a canonical
viking://user/<user_id>/... URI is already visible in this
session — injected memory context, or an earlier OpenViking tool result —
reuse that <user_id> and search
viking://user/<user_id>/memories/experiences.
- Otherwise repeat the same query with no target scope, narrowed to memories
with
context_type when the tool accepts it, and keep only hits whose URI
contains /memories/experiences/. Those hits carry the canonical user ID;
reuse it for the reads and for any later Experience search in this task.
Do not fall back to the uid-less viking://user/memories/experiences: only
some older servers and roles expand it, and current servers reject it. If no
explicit root can be resolved, continue without Experience.
Applying Retrieved Experience
- Treat Experience as reusable procedure, not as a user profile, user intent,
security policy, or proof that an action succeeded.
- Follow priority in this order: system and developer instructions, current
user request, current environment and tool evidence, then Experience.
- Ignore stale, incompatible, unsafe, or conflicting guidance. Verify commands,
paths, APIs, versions, and destructive actions against the current task.
- Preserve confirmation requirements and permission boundaries. Prior success
never authorizes a destructive or external action in the current session.
- When multiple Experience files conflict, prefer the one whose preconditions
match the current environment; otherwise proceed conservatively and surface
the ambiguity when it affects the user.
Session Evidence
Use real Agent tool calls so the committed OpenViking session retains their
ToolParts:
- A completed generic OpenViking
find, search, or list result containing
an Experience URI records recall for that Experience.
- A completed generic OpenViking
read or multi_read of an Experience URI
records injection and can associate the resulting trajectory with that
Experience.
- Failed, cancelled, or incomplete calls do not count.
Do not edit, summarize away, or synthesize these ToolParts before the session
is committed.
Example
For a request to fix a deployment failure:
- Search the Experience root with a query such as
Kubernetes deployment image pull failure private registry.
- Read the most relevant exact Experience URI.
- Check that its registry, credential, and rollout assumptions match the
current cluster.
- Apply the compatible diagnostic steps, verify the live result, and continue
the user's task.
1---2name: ov-experience-memory3description: Retrieve and apply OpenViking Experience memories through the Agent runtime's generic OpenViking search and read tools. Use before or during executable, multi-step, or tool-based work such as coding, file or data changes, configuration, deployment, workflow execution, and failure recovery when prior operational guidance could improve reliability. Do not use for casual chat or simple factual questions.4---5
6# OpenViking Experience Memory
7
8Use prior task Experience as advisory operational guidance. Keep the current
9user request, current environment, and verified tool results authoritative.
10Experience retrieval supplements normal context retrieval; it does not replace
11user memory, events, preferences, session archives, resources, or Agent Skills.
12
13## Preconditions
14
15- Use only OpenViking tools that are actually registered in the current Agent
16 runtime.
17- Require both a semantic search capability and an exact URI read capability.
18- If either capability is unavailable, continue without Experience. Do not
19 invent a tool call, fabricate a ToolPart, or replace the Agent tool call with
20 direct HTTP or CLI access.
21- Do not substitute broad memory `recall` for a search scoped to the Experience
22 root. Continue using the runtime's normal recall and retrieval flows when the
23 task also needs user facts, events, decisions, prior conversation, or domain
24 resources.
25
26## Select Runtime Tools
27
28Choose the registered names that match the current runtime:
29
30| Runtime | Search | Read |
31| --- | --- | --- |
32| OpenViking MCP, Codex, Claude Code | `find` or `search` | `read` |
33| OpenCode | `openviking_find` or `openviking_search` | `openviking_read` |
34| OpenClaw | `ov_search` | `ov_read` or `ov_multi_read` |
35
36The host may display MCP names with a namespace such as
37`mcp__openviking__find`. Use the exact registered name and schema shown by the
38runtime. Prefer `find` for a fast task-start lookup and `search` when session
39context or deeper intent analysis is useful.
40
41## Retrieval Workflow
42
431. Decide whether the request is an executable task. Retrieve Experience for
44 planning, tool use, environment changes, multi-step workflows, or recovery
45 from a failed attempt. Skip retrieval for casual conversation and simple
46 knowledge answers.
472. Build one concise query containing the task goal, domain object, intended
48 operation, and important constraints. After a failure, include the failed
49 operation and stable error signature.
503. Search only the current user's Experience root:
51
52 ```text
53 viking://~/memories/experiences
54 ```
55
56 For tools using MCP-style parameters, set `target_uri` to this root. For
57 OpenClaw `ov_search`, set `uri` to this root. Never hardcode `default`,
58 `test`, or another user ID. If the server rejects the URI, resolve the root
59 as described in *Servers Without the Home Alias* and retry once.
604. Start with `limit=5` and the tool's normal score threshold. Judge results by
61 task, environment, preconditions, and likely effect; title similarity alone
62 is insufficient. If no result is relevant, continue without Experience and
63 do not broaden the search to unrelated memory directories.
645. Select only the one to three Experience files likely to change execution.
65 Require an exact file URI without a query or fragment. Ignore directories,
66 unrelated memory types, and sidecars such as `.abstract.md` and `.overview.md`.
676. Read every selected canonical `viking://.../memories/experiences/...` URI
68 with the runtime's OpenViking read tool. Search abstracts help selection but
69 are not a substitute for reading the Experience body.
707. Apply relevant steps and checks while executing the task. Do not repeat the
71 Experience verbatim to the user unless its content is directly needed in the
72 answer.
738. If execution fails for a materially new reason, perform at most one focused
74 follow-up search using the failure evidence, then read only newly relevant
75 Experience files.
76
77## Servers Without the Home Alias
78
79`viking://~` is the home alias for the caller's own space. A server released
80before the alias (OpenViking v0.4.16) does not resolve it and rejects the
81request with `INVALID_URI` (HTTP 400) instead of searching. Retry once against
82the caller's explicit root, resolved from evidence rather than guessed:
83
84- If a canonical `viking://user/<user_id>/...` URI is already visible in this
85 session — injected memory context, or an earlier OpenViking tool result —
86 reuse that `<user_id>` and search
87 `viking://user/<user_id>/memories/experiences`.
88- Otherwise repeat the same query with no target scope, narrowed to memories
89 with `context_type` when the tool accepts it, and keep only hits whose URI
90 contains `/memories/experiences/`. Those hits carry the canonical user ID;
91 reuse it for the reads and for any later Experience search in this task.
92
93Do not fall back to the uid-less `viking://user/memories/experiences`: only
94some older servers and roles expand it, and current servers reject it. If no
95explicit root can be resolved, continue without Experience.
96
97## Applying Retrieved Experience
98
99- Treat Experience as reusable procedure, not as a user profile, user intent,
100 security policy, or proof that an action succeeded.
101- Follow priority in this order: system and developer instructions, current
102 user request, current environment and tool evidence, then Experience.
103- Ignore stale, incompatible, unsafe, or conflicting guidance. Verify commands,
104 paths, APIs, versions, and destructive actions against the current task.
105- Preserve confirmation requirements and permission boundaries. Prior success
106 never authorizes a destructive or external action in the current session.
107- When multiple Experience files conflict, prefer the one whose preconditions
108 match the current environment; otherwise proceed conservatively and surface
109 the ambiguity when it affects the user.
110
111## Session Evidence
112
113Use real Agent tool calls so the committed OpenViking session retains their
114ToolParts:
115
116- A completed generic OpenViking `find`, `search`, or `list` result containing
117 an Experience URI records recall for that Experience.
118- A completed generic OpenViking `read` or `multi_read` of an Experience URI
119 records injection and can associate the resulting trajectory with that
120 Experience.
121- Failed, cancelled, or incomplete calls do not count.
122
123Do not edit, summarize away, or synthesize these ToolParts before the session
124is committed.
125
126## Example
127
128For a request to fix a deployment failure:
129
1301. Search the Experience root with a query such as
131 `Kubernetes deployment image pull failure private registry`.
1322. Read the most relevant exact Experience URI.
1333. Check that its registry, credential, and rollout assumptions match the
134 current cluster.
1354. Apply the compatible diagnostic steps, verify the live result, and continue
136 the user's task.