Logotipo de Openviking Context Database

Openviking Context Database

OrganizaciónPopular
volcengine
openviking-context-database

Use OpenViking from OpenClaw through @openviking/openclaw-plugin: long-term memory, session archives, resource and Agent Skill import, semantic recall, recall trace debugging, and externalized tool-result recovery. Prefer this skill when the user wants to use, query, debug, or operate OpenViking context from an OpenClaw agent. For first-time plugin installation, use the install-openviking-memory skill instead.

Descripción general

Editorvolcengine
RepositorioOpenViking
Nombre de la habilidadopenviking-context-database
Estrellas
37.9K
Forks
2.9K
Archivos incluidos
Solo instrucciones
LicenciaAGPL-3.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por volcengine en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Openviking Context Database en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/volcengine/OpenViking/tree/main/examples/openclaw-plugin/skills/openviking-context-database
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/volcengine/OpenViking.git /tmp/OpenViking
mkdir -p .claude/skills
cp -r /tmp/OpenViking/examples/openclaw-plugin/skills/openviking-context-database .claude/skills/openviking-context-database
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Openviking Context Database en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Openviking Context Database automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Openviking Context Database no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

OpenViking Context Database — OpenClaw Plugin Operator Skill

Use this skill after @openviking/openclaw-plugin is installed and configured. It describes the current OpenClaw plugin implementation, not the standalone OpenViking Python SDK.

Scope and Safety Rules

  • The plugin is remote-only. It talks to an existing OpenViking server through HTTP and does not start or manage openviking-server.
  • Do not invent OpenViking REST endpoints. Use the registered OpenClaw tools and commands described below.
  • The agent-visible add_resource tool is disabled by default (enableAddResourceTool=false). Do not use add_resource during search, retrieval, URI reading, or search-result optimization. Use ov_search and ov_read in those flows.
  • Use manual /add-resource, or add_resource only when it is explicitly enabled and the user explicitly asks to import, add, upload, save, or index a resource.
  • Use add_skill only when the user explicitly asks to import, add, install, or register an Agent Skill into OpenViking.
  • For local files and directories, pass the local path to the plugin tool. The plugin uploads them through /api/v1/resources/temp_upload; do not send raw local filesystem paths to a remote server yourself.
  • Never log or echo API keys. The plugin sends API keys as X-API-Key / setup probe headers and masks them in setup output.

Current Architecture

OpenClaw owns agent execution, prompts, and tool invocation. OpenViking owns long-lived context:

LayerCurrent behavior
assembleRebuilds compressed session history from OpenViking and injects relevant recall into the latest user message.
afterTurnAppends only the new turn to the OpenViking session; may trigger async commit when pending_tokens >= tokenBudget * commitTokenThresholdRatio.
compactRuns commit(wait=true), waits for archive/extraction completion, and reads back latest archive overview.
ToolsMemory recall/store/forget, archive search/expand, resource/skill import/search, recall trace query, tool-result list/search/read.

Long-term memories are usually extracted on /compact or on threshold-triggered commit. A fact mentioned in a fresh conversation may still be present as recent session context before it becomes a long-term memory.

Configuration Quick Reference

Read status first:

bash
openclaw openviking status --json
openclaw config get plugins.entries.openviking.config
openclaw config get plugins.slots.contextEngine

Core config lives under plugins.entries.openviking.config:

FieldDefaultPurpose
baseUrlhttp://127.0.0.1:1933OpenViking HTTP endpoint. Can also come from OPENVIKING_BASE_URL / OPENVIKING_URL.
apiKeyemptyOptional API key. Can also come from OPENVIKING_API_KEY.
peer_rolenoneMemory scope: none (shared viking://user/<user_id>/memories), assistant (assistant-attributed memory under .../peers/<assistant_id>/memories), or sender (sender-attributed memory under .../peers/<sender_id>/memories). Legacy person is accepted as sender.
peer_prefixemptyOptional prefix for assistant peer_id / actor peer values when peer_role=assistant.
accountId / userIdemptyAdvanced tenant identity headers for root-key or trusted deployments.
targetUriviking://~/memoriesDefault search scope for legacy targeted memory search.
autoCapturetrueAppend sanitized turn text to OpenViking sessions.
captureModesemanticsemantic or keyword; affects server-side extraction filtering.
captureMaxLength24000Max sanitized text length per captured turn.
autoRecalltrueRun recall before replies and inject relevant context.
recallTargetTypesuser,agentDefault target types when targetUri is omitted. Allowed: resource, user, agent.
recallResourcesfalseCompatibility shortcut that appends resource to default recall targets when recallTargetTypes is unset.
recallLimit6Max selected recall items.
recallScoreThreshold0.15Min score after post-processing.
recallMaxInjectedChars4000Total injected character cap; complete memories that do not fit are skipped.
commitTokenThresholdRatio0.5Async-commit threshold as a fraction (0-1) of the model context window (e.g. 0.5 = 50%); 0 commits every turn.
commitKeepRecentCount10Recent messages kept live after afterTurn commit. Compact always uses 0.
bypassSessionPatternsemptyGlob-like session keys that completely bypass OpenViking (* segment, ** multi-segment).
emitStandardDiagnosticsfalseEmit structured openviking: diag {...} lines.
logFindRequestsfalseLog routing for find/session writes. Also enabled by OPENVIKING_LOG_ROUTING=1 or OPENVIKING_DEBUG=1.
traceRecallfalseRecord recall traces in memory.
traceRecallPersistfalsePersist recall traces as local JSONL files.
traceRecallDir~/.openclaw/openviking/recall-tracesRecall trace directory when persistence is enabled.

Normal setup command:

bash
openclaw openviking setup --base-url <OPENVIKING_URL> --api-key <API_KEY> --json

Useful variants:

bash
openclaw openviking setup --base-url <URL> --api-key <KEY> --peer-role assistant --peer-prefix openclaw-prod --json
openclaw openviking setup --base-url <URL> --api-key <ROOT_KEY> --account-id <ACCOUNT_ID> --user-id <USER_ID> --json
openclaw openviking setup --base-url <URL> --api-key <KEY> --recall-target-types resource --json
openclaw openviking setup --base-url <URL> --api-key <KEY> --allow-offline --json
openclaw openviking setup --base-url <URL> --api-key <KEY> --force-slot --json

Tool Selection Guide

User intentUse
“What did I say before?”, preferences, decisions, known factsmemory_recall
“Remember this now”memory_store
“Forget X”memory_forget
Summary lacks an exact command/path/snippet from old chatov_archive_search, then ov_archive_expand if needed
Import docs, PDFs, local dirs, URLs, Git repos, media attachmentsmanual /add-resource; add_resource only if enableAddResourceTool=true
Import/register an Agent Skilladd_skill
Search imported resources or skillsov_search
Read an exact viking://... hit from ov_search or recall traceov_read
Explain why recall/search returned somethingov_recall_trace
A previous tool result shows only a preview/refopenviking_tool_result_list, openviking_tool_result_search, openviking_tool_result_read

Tool Interface Reference

memory_recall

Semantic search over memories/resources. Use archive tools for session history.

ParameterRequiredDescription
queryYesSearch query.
limitNoMax selected results. Defaults to recallLimit.
scoreThresholdNoScore threshold 0..1. Defaults to recallScoreThreshold.
targetUriNoExact search URI. If set, only this URI is searched.
resourceTypesNoArray of resource, user, agent; used only when targetUri is omitted.

Notes: when targetUri is omitted, the plugin resolves a search plan from resourceTypes or configured recallTargetTypes, fetches more candidates than requested, deduplicates, filters leaf memories, reranks, and respects recallMaxInjectedChars.

memory_store

Persist text immediately by writing a session and committing with wait=true.

ParameterRequiredDescription
textYesInformation source text.
roleNoSession role, default user.
sessionIdNoExisting OpenViking/OpenClaw session reference. If omitted, a temporary memory-store-* session is created.

memory_forget

Delete a memory.

ParameterRequiredDescription
uriNoExact viking://user/.../memories/... memory URI. Non-memory URIs are refused.
queryNoSearch query when uri is unknown.
targetUriNoSearch scope URI, default targetUri.
limitNoSearch limit, default 5.
scoreThresholdNoSearch threshold, default recallScoreThreshold.

If query mode finds multiple candidates, report candidates and ask the user to choose the exact URI; do not delete ambiguous memories.

ov_archive_search

Keyword grep across archived original conversation messages of the current session.

ParameterRequiredDescription
queryYesSingle keyword or short phrase; prefer names, dates, file paths, commands, or distinctive nouns.
archiveIdNoRestrict to one archive, e.g. archive_002.

Try at least two concrete keyword variants before concluding archived detail is unavailable.

ov_archive_expand

ParameterRequiredDescription
archiveIdYesArchive ID from [Archive Index], e.g. archive_002.

Use after an archive search or when the [Archive Index] already identifies the archive likely to contain exact detail.

add_resource

Import resources into viking://resources/....

This agent tool is disabled by default. Prefer manual /add-resource for resource ingestion. If enableAddResourceTool=true exposes the tool, use it only for explicit import/index requests and never as part of search/retrieval optimization.

ParameterRequiredDescription
sourceYesLocal path, OpenClaw media attachment path, directory path, public URL, or Git URL.
toNoExact target URI, e.g. viking://resources/project-docs. Mutually exclusive with parent.
parentNoParent URI under viking://resources. Mutually exclusive with to.
reasonNoReason/note for import.
instructionNoProcessing instruction for semantic extraction.
waitNoWait for processing completion.
timeoutNoTimeout in seconds when wait=true.

The current OpenClaw tool exposes the parameters above. The underlying client also supports server-facing resource options such as strict, ignore_dirs, include, exclude, and preserve_structure for command/internal paths; do not pass them to the tool unless the registered schema exposes them.

add_skill

Import Agent Skills into viking://~/skills/....

ParameterRequiredDescription
sourceNoLocal SKILL.md path or skill directory. Exactly one of source or data is required.
dataNoRaw SKILL.md content or an MCP tool dict. Exactly one of source or data is required.
waitNoWait for processing completion.
timeoutNoTimeout in seconds when wait=true.

Agent Skill best practice: a skill should have precise frontmatter (name, trigger-oriented description, useful tags), clear scope boundaries, explicit “when not to use” guidance if needed, and executable steps with concrete parameters. Keep secrets out of skill content.

ov_search

ParameterRequiredDescription
queryYesSearch query.
uriNoSearch URI. Defaults to resources plus agent skills.
limitNoMax results per scope, default 10.

Use after importing resources/skills, or when the user asks to search OpenViking-managed knowledge.

Important: ov_search returns OpenViking virtual URIs such as viking://resources/project-docs/api.md#chunk-3. These are not local file paths. Do not use filesystem read tools for them; call ov_read with the exact URI when full content is needed.

ov_read

Read full content for one exact OpenViking virtual URI through /api/v1/content/read.

ParameterRequiredDescription
uriYesExact viking://... URI returned by ov_search or recall trace results. openviking://... aliases and local file paths are refused.

ov_recall_trace

ParameterRequiredDescription
turnNolatest or all, default latest.
traceIdNoExact trace ID.
sessionId / sessionKey / ovSessionIdNoFilter by OpenClaw/OpenViking session.
sourceNoauto_recall, memory_recall, ov_search, or ov_archive_search.
resourceTypesNoArray/string containing resource, user, agent.
since / untilNoUnix timestamp bounds in milliseconds.
includeContentNoRead selected/displayed URI content previews on demand.
limitNoMaximum traces to return, default 20.

Trace records exist only when traceRecall=true; persisted lookup requires traceRecallPersist=true and accessible trace files.

Externalized tool-result tools

Use when a preview contains viking://session/<session_id>/tool-results/<tool_result_id>.

ToolParameters
openviking_tool_result_listtool_name?, limit? (default 50)
openviking_tool_result_searchtool_output_ref, query, limit? (default 20), context_chars? (default 300)
openviking_tool_result_readtool_output_ref, offset? (default 0), limit? (default 20000, -1 accepted by server path for all remaining content)

The plugin refuses to read/search a tool-result ref from another session.

Slash Commands

text
/add-resource ./README.md --to viking://resources/openviking-readme --wait
/add-skill ./skills/install-openviking-memory --wait --timeout=30
/ov-search "OpenViking install" --uri viking://resources/openviking-readme --limit=5
/ov-recall-trace --turn latest --source auto_recall --include-content

Command parsers support quoted args and flags. Resource-only flags are rejected for skill imports.

Troubleshooting

SymptomLikely causeFirst action
configured=falseSetup did not persist configRe-run openclaw openviking setup ... --json; branch on JSON error.
slotActive=falseAnother context engine owns the slot or gateway has stale stateInspect plugins.slots.contextEngine; use --force-slot only after user confirms.
health.ok=falseServer unreachable or wrong baseUrl / keyCheck baseUrl, network, /health, and auth.
No long-term memory after a fresh fact/compact or commit/extraction has not run, or server extraction failedUse memory_store for explicit remember/save/store intents; otherwise run /compact or wait for threshold commit, then check OpenViking server logs.
Recall misses shared documentsresource target is not enabledUse memory_recall with resourceTypes:["resource"] or configure recallTargetTypes: ["resource"].
Summary lacks exact detailArchive summary is too coarseUse ov_archive_search with concrete keywords, then ov_archive_expand.
Large tool output preview is insufficientTool result was externalizedUse openviking_tool_result_search/read with the ref.
Need to explain recall behaviorTrace disabled or no trace for that turnEnable traceRecall; optionally traceRecallPersist; query ov_recall_trace.

Reference Docs in This Repo

  • README.md / README_CN.md: feature overview and quick start.
  • INSTALL.md / INSTALL-ZH.md: install, upgrade, uninstall, and JSON setup handling.
  • INSTALL-AGENT.md: agent-oriented installation workflow.
  • docs/openviking-openclaw-plugin-guide.md: comprehensive Chinese operator/developer guide.

Preguntas frecuentes

¿Qué hace la habilidad de IA Openviking Context Database?

Use OpenViking from OpenClaw through @openviking/openclaw-plugin: long-term memory, session archives, resource and Agent Skill import, semantic recall, recall trace debugging, and externalized tool-result recovery. Prefer this skill when the user wants to use, query, debug, or operate OpenViking context from an OpenClaw agent. For first-time plugin installation, use the install-openviking-memory skill instead.

¿Por qué usar Openviking Context Database en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Openviking Context Database está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Openviking Context Database en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/volcengine/OpenViking/tree/main/examples/openclaw-plugin/skills/openviking-context-database. TypingMind lee su archivo SKILL.md y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Openviking Context Database?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Openviking Context Database?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Openviking Context Database con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Openviking Context Database?

Sí. volcengine la ha publicado en GitHub bajo la licencia AGPL-3.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇