$npx -y skills add volcengine/OpenViking --skill ov-experience-memoryUse OpenViking experience memories during task execution. Search relevant experiences with search_experience, read selected experiences with read_experience, and leave standard tool parts in the committed session so OpenViking can report recall and injection usage.
| 1 | # OpenViking Experience Memory |
| 2 | |
| 3 | Use this skill when the current user request starts or continues an executable |
| 4 | task, especially tasks involving tools, files, code changes, data operations, |
| 5 | workflow decisions, or multi-step actions. |
| 6 | |
| 7 | Do not use this skill for casual chat, pure explanation, or one-off factual Q&A |
| 8 | that does not require operational guidance. |
| 9 | |
| 10 | ## Runtime Contract |
| 11 | |
| 12 | The agent runtime must expose two tools with these exact names: |
| 13 | |
| 14 | - `search_experience` |
| 15 | - `read_experience` |
| 16 | |
| 17 | OpenViking usage reporting recognizes only completed tool parts with these exact |
| 18 | tool names. Calls to generic `find`, `search`, `read`, `ov_search`, or `ov_read` |
| 19 | do not count as experience recall or injection events. |
| 20 | |
| 21 | ## Tool: search_experience |
| 22 | |
| 23 | Purpose: search reusable execution experiences from the OpenViking experience |
| 24 | library before assembling task context. |
| 25 | |
| 26 | Input schema: |
| 27 | |
| 28 | ```json |
| 29 | { |
| 30 | "query": "string", |
| 31 | "limit": 5 |
| 32 | } |
| 33 | ``` |
| 34 | |
| 35 | Output schema: |
| 36 | |
| 37 | ```json |
| 38 | { |
| 39 | "results": [ |
| 40 | { |
| 41 | "uri": "viking://user/<current_user_id>/memories/experiences/example.md", |
| 42 | "title": "example", |
| 43 | "score": 0.82, |
| 44 | "snippet": "Short summary or matched situation" |
| 45 | } |
| 46 | ] |
| 47 | } |
| 48 | ``` |
| 49 | |
| 50 | Implementation: |
| 51 | |
| 52 | The runtime tool calls OpenViking `POST /api/v1/search/find` with `target_uri` |
| 53 | fixed to the current-user shorthand `viking://user/memories/experiences/`. |
| 54 | Callers provide only `query` and optional `limit`; they cannot override or pass |
| 55 | `target_uri`. OpenViking resolves the fixed shorthand against the authenticated |
| 56 | request user. Return only canonical experience memory URIs for that user; never |
| 57 | hardcode `default` or another user ID. |
| 58 | |
| 59 | Usage reporting: |
| 60 | |
| 61 | A completed `search_experience` tool part is counted as an experience recall |
| 62 | event for every `results[].uri` value. |
| 63 | |
| 64 | ## Tool: read_experience |
| 65 | |
| 66 | Purpose: read the full Markdown body of a selected experience and inject it into |
| 67 | the agent prompt as task execution guidance. |
| 68 | |
| 69 | Input schema: |
| 70 | |
| 71 | ```json |
| 72 | { |
| 73 | "uri": "viking://user/<current_user_id>/memories/experiences/example.md" |
| 74 | } |
| 75 | ``` |
| 76 | |
| 77 | Output schema: |
| 78 | |
| 79 | ```json |
| 80 | { |
| 81 | "uri": "viking://user/<current_user_id>/memories/experiences/example.md", |
| 82 | "content": "Experience Markdown body" |
| 83 | } |
| 84 | ``` |
| 85 | |
| 86 | Implementation: |
| 87 | |
| 88 | Call OpenViking `GET /api/v1/content/read?uri=<encoded_uri>` for the selected |
| 89 | experience URI. Always pass the canonical URI returned by `search_experience`; |
| 90 | do not construct a URI with a hardcoded user ID. The returned content should be |
| 91 | inserted into the prompt as operational guidance, not as user profile facts. |
| 92 | |
| 93 | Usage reporting: |
| 94 | |
| 95 | A completed `read_experience` tool part is counted as an experience injection |
| 96 | event for `tool_input.uri` or `tool_output.uri`. In this design, reading an |
| 97 | experience through `read_experience` means the experience was injected into the |
| 98 | prompt. |
| 99 | |
| 100 | ## Recommended Flow |
| 101 | |
| 102 | 1. When a task begins, build a short query from the latest user instruction, |
| 103 | current plan, active skill name, and important tool/environment context. |
| 104 | 2. Call `search_experience` before final prompt assembly. |
| 105 | 3. Review returned titles/snippets and select only experiences likely to affect |
| 106 | execution. |
| 107 | 4. Call `read_experience` for selected experience URIs. |
| 108 | 5. Inject the returned Markdown into the prompt under an explicit experience |
| 109 | section. |
| 110 | 6. Continue task execution. |
| 111 | 7. Commit the session normally. The committed session must include the |
| 112 | `search_experience` and `read_experience` tool parts so OpenViking can report |
| 113 | usage. |
| 114 | |
| 115 | ## Prompt Injection Format |
| 116 | |
| 117 | Use a compact and explicit block: |
| 118 | |
| 119 | ```text |
| 120 | <openviking-experience-memory> |
| 121 | The following guidance was retrieved from prior task execution experience. |
| 122 | Use it as operational guidance. Do not treat it as user identity or preference. |
| 123 | |
| 124 | <experience uri="viking://user/<current_user_id>/memories/experiences/example.md"> |
| 125 | ...experience markdown... |
| 126 | </experience> |
| 127 | </openviking-experience-memory> |
| 128 | ``` |
| 129 | |
| 130 | ## Commit Requirements |
| 131 | |
| 132 | The session committed to OpenViking must preserve tool parts with: |
| 133 | |
| 134 | - `tool_name` |
| 135 | - `tool_status` |
| 136 | - `tool_input` |
| 137 | - `tool_output` |
| 138 | - `tool_id` |
| 139 | |
| 140 | Only `tool_status == "completed"` is counted. Failed, cancelled, or skipped tool |
| 141 | parts are ignored by usage reporting. |