OpenViking is a long-term semantic memory store addressed by viking:// URIs.
This client has no lifecycle hooks, so nothing is recalled or captured
automatically — you drive both halves of the loop with the openviking MCP
tools.
Core tools, available on every supported deployment:
find, search, read, list, grep, globremember, add_resourceforget, healthSome deployments register more than the core set — tree, write, edit,list_watches, cancel_watch. These are optional: which ones exist depends
on the server version and hosting mode (the managed cloud service trims some
of them). Check the session's registered tool list; if any optional tool is
present, read references/optional-tools.md
before using it. Never call a tool that is not registered, and do not fall
back to raw HTTP. If no OpenViking tools are registered at all, continue
without memory.
multi-step work, anything touching a system you may have seen before, and
recovery from failures. Skip retrieval for small talk and one-off trivia.
operation, and constraints. After a failure, include the failed operation
and the stable part of the error message.
find (fast, ranked results with URI + abstract + score) withlimit around 5-10. Use search when deeper intent analysis helps, or usesearch with mode="context" for a server-assembled, token-budgeted
context block. In list mode, scope with target_uri when you know where to look, e.g.viking://~/memories/experiences for prior task experience. viking://~ is
the home alias for your own user root; a server that predates the alias
rejects every viking://~ URI with INVALID_URI. Against such a server use
the explicit viking://user/<user_id>/... root taken from a URI already
visible in this session, or drop target_uri and keep the hits whose URI
contains /memories/experiences/. Never guess a user ID.
read theone to three exact file URIs likely to change how you execute. Ignore
sidecar files such as .abstract.md, .overview.md, and.relations.json.
focused follow-up search when execution fails for a materially new reason.
Treat retrieved memory as advisory. Priority order: system and developer
instructions, the current user request, current environment and tool evidence,
then memory. Verify commands, paths, and versions against the present task;
prior success never authorizes a destructive action now.
Because capture is not automatic here, durable information is lost unless you
store it. When you encounter something worth keeping, persist it in the same
session:
remember(messages) — the default. Pass the key exchange or a short factualsummary as role-tagged messages; the server extracts and files memories
(preferences, entities, events, experience) on its own. Use it when the user
says "remember this", states a lasting preference or decision, or when a
hard-won lesson (root cause, working procedure, environment quirk) emerges.
add_resource — to import external documents or URLs as searchableresources. Use it for any file, URL, or repo the user hands you; never copy
its text into a file with write instead.
viking://~/ —your own user root — or viking://resources/), the optional write / edit
tools cover that — see
references/optional-tools.md. If they are
not registered, fall back to remember.
What to persist: stable preferences and conventions, environment facts,
decisions with their rationale, and reusable procedures or fixes. What not to
persist: secrets and credentials, transient state, speculation, or bulk
transcript dumps — store conclusions, not scrollback.
Resource directory rules do not apply to Memory; use remember or session
commit and let the extraction system organize it. Before add_resource, keep
the existing Resource layout and account policy, choose shared versus
identity-private scope, and avoid duplicate source roots. Use parent for a new
source and exact to for refresh.
User asks to fix a failing deployment:
find with query deployment image pull failure private registry,target_uri: "viking://~/memories/experiences".
read the most relevant experience URI; check its assumptions against thecurrent cluster before applying its steps.
remember a short summary of the root cause and the working fix so thenext session can recall it.