My Wiki!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
programming:0_ide:kilocode_vscode [2026/05/12 11:24] – [Agent Memory] tdprogramming:0_ide:kilocode_vscode [2026/05/12 22:07] (current) – [memvid mcp for vscode] td
Line 18: Line 18:
 ## Agent Memory ## Agent Memory
   * https://developers.openai.com/cookbook/examples/agents_sdk/building_reliable_agents_memory_compaction   * https://developers.openai.com/cookbook/examples/agents_sdk/building_reliable_agents_memory_compaction
 +  * https://voxos.ai/blog/how-to-give-ai-coding-agents-long-term-m/index.html
   * https://github.com/Kilo-Org/kilocode/discussions/2022   * https://github.com/Kilo-Org/kilocode/discussions/2022
   * https://github.com/Kilo-Org/kilocode/discussions/377   * https://github.com/Kilo-Org/kilocode/discussions/377
Line 25: Line 26:
  
 Put source documents, manifests, helper files, and output directories in the Manifest instead of pasting large content into the prompt. Put source documents, manifests, helper files, and output directories in the Manifest instead of pasting large content into the prompt.
 +
 Put longer task instructions in workspace files such as README.md, task.md, or AGENTS.md; keep agent instructions focused on behavior and boundaries. Put longer task instructions in workspace files such as README.md, task.md, or AGENTS.md; keep agent instructions focused on behavior and boundaries.
 +
 Use stable document IDs and a machine-readable manifest file so generated memos can cite sources and reviewers can inspect the path back to evidence. Use stable document IDs and a machine-readable manifest file so generated memos can cite sources and reviewers can inspect the path back to evidence.
 +
 Let Memory() manage its own memory artifacts. By default, sandbox memory uses memories/ and sessions/ under the workspace. Let Memory() manage its own memory artifacts. By default, sandbox memory uses memories/ and sessions/ under the workspace.
 +
 Keep generated artifacts under outputs/ so the application can inspect, copy, validate, or archive them after the run. Keep generated artifacts under outputs/ so the application can inspect, copy, validate, or archive them after the run.
 +
 Keep mount scopes narrow. If you mount a data room, mount only what the agent should read or write. Keep mount scopes narrow. If you mount a data room, mount only what the agent should read or write.
 +
 Treat secrets as runtime configuration injected by your application or sandbox provider, not as prompt text or committed manifest content. Treat secrets as runtime configuration injected by your application or sandbox provider, not as prompt text or committed manifest content.
-Prefer a small synthetic File(...) or Dir(...) entry for a tutorial, then switch to LocalDir, GitRepo, or storage mounts for production-sized datasets. + 
-# This is a visual preview of the sandbox workspace structure. +Prefer a small synthetic File(...) or Dir(...) entry for a tutorial, then switch to LocalDir, GitRepo, or storage mounts for production-sized datasets 
-# The next cell builds the actual Manifest entries manually.+
 +### This is a visual preview of the sandbox workspace structure 
 +
 +### The next cell builds the actual Manifest entries manually. 
 +```
 WORKSPACE_TREE = """ WORKSPACE_TREE = """
 /workspace/ /workspace/
Line 48: Line 59:
  
 print(WORKSPACE_TREE) print(WORKSPACE_TREE)
 +
 +```
  
 Prepare a Small Evidence Workspace Prepare a Small Evidence Workspace
 +### memvid mcp for vscode
 +
 +#### Install npm, uv on windows
 +  * https://wiki.visrc.com/doku.php?id=windows:winadmin:npm_user
 +
 +
 +#### Setup memvid mcp server
 +
 +  * https://github.com/khgs2411/memvid_mcp
 +
 +
 +Running local mpx server may not work due to not available PATH for non admin user. 
 +
 +Install memvid-mcp-server locally
 +
 +If you have Node.js installed but npx isn't in PATH, install the package globally or locally:
 +
 +     npm install -g memvid-mcp-server
 +
 +Then update the ~/.config/kilo.json (~/.config/kilo.jsonc for global settings) configuration to use the direct path:
 +
 +```
 +{
 +  "command": ["memvid-mcp-server"],
 +  ...
 +}
 +
 +```
 +
 +Example:
 +
 +```
 +"$schema": "https://app.kilo.ai/config.json",
 +  "mcp": {
 +    "memvid": {
 +      "type": "local",
 +      "command": [
 +        "npx",
 +        "-y",
 +        "memvid-mcp-server@latest"
 +      ],
 +      "environment": {
 +        "OPENAI_API_KEY": "sk-proj-qoGHEBwSHb41x8slxaziGjq1RSp5Sz3FT3BlbkFJYfp15vPobwEm0e-Ib0zdRhOTntpQsGf2qSY8kA3FR6T4np3tMlrc79yjyXLWtcpEd1BaE-IbkA",
 +        "MEMVID_LOCAL_STORAGE": "0"
 +      },
 +      
 +```
 +
 +```
 + "$schema": "https://app.kilo.ai/config.json",
 +  "mcp": {
 +    "memvid": {
 +      "type": "local",
 +      "command": ["memvid-mcp-server"],
 +      "environment": {
 +        "OPENAI_API_KEY": "sk-proj-NEZJMF3Yljd-lfp15vPobwEm0e-Ib0zdRhOTntpQsGf2qSY8kA3FR6T4np3tMlrc79yjyXLWtcpEd1BaE-IbkA",
 +        "MEMVID_LOCAL_STORAGE": "0"
 +      },
 +```
 +
 +Note: If you do not provide OPENAI_API_KEY, the ask_memory tool will not be available, but you can still use create_or_open_memory, add_content, and search_memory (lexical mode).
 +
 +MEMVID_LOCAL_STORAGE Set to "1" to store memory files in ./memvid_mcp (current directory) instead of ~/.memvid_mcp.
 +
 +
 +**This only work in external powershell not in VS Code sandbox. See troubleshooting**
 +If PATH only defined in non admin user $profile, use this command
 +
 +     ["powershell", "-Command", ". $PROFILE; npx -y memvid-mcp-server@latest"]
 +     
 +#### Troubleshooting
 +
 +VS Code use sandbox environment where non admin user $profile is not available.
 +
 +##### Set PATH
 +     powershell -Command "[Environment]::SetEnvironmentVariable('Path', 'D:\devfs\python;D:\devfs\node-v24.15.0-win-x64;' + [Environment]::GetEnvironmentVariable('Path', 'User'), 'User')" 2>&1; echo "PATH_UPDATED:$?"
 +     
 +Edit PATH as non admin user:
 +
 +     rundll32 sysdm.cpl,EditEnvironmentVariables
 +
 +Add full PATH:
 +
 +     D:\devfs\python;D:\devfs\node-v24.15.0-win-x64;D:\devfs\node-v24.15.0-win-x64;D:\devfs\node-v24.15.0-win-x64;C:\Users\13223\.local\bin;C:\Users\13223\AppData\Local\Microsoft\WindowsApps;C:\Users\13223\AppData\Local\Programs\Git\cmd;C:\Users\13223\AppData\Local\Programs\Microsoft VS Code Insiders\bin;C:\Users\13223\AppData\Local\Programs\DockerDesktop\resources\bin;D:\devfs\jdk-21.0.10+7\bin;D:\devfs\apache-maven-3.9.15\bin;D:\devfs\node-v24.15.0-win-x64;.local\bin;D:\devfs\vim92;
 +     
 +##### Set $env
 +
 +     [Environment]::SetEnvironmentVariable("OPENAI_API_KEY", "sk-your-key-here", "User")
 +
 +Then restart your computer (not just VS Code) to ensure it propagates system-wide.
 +
 +Check $env in terminal:
 +  
 +     $env:OPENAI_API_KEY
 +
 +Alternative: Set it in VS Code's terminal settings If you need it available immediately in the integrated terminal regardless, add this to your VS Code settings.json:
  
 +"terminal.integrated.env.windows": {
 +    "OPENAI_API_KEY": "sk-your-key-here"
 +}
  

Navigation