opencode-machine-memory
v0.1.2
Published
OpenCode plugin for machine-maintained project and global memory with explicit recall tools.
Downloads
298
Maintainers
Readme
opencode-machine-memory
Machine-maintained memory plugin for OpenCode.
It provides:
remember: persist explicit memories into project or global memoryinspect_write: preview how a memory will be classifiedinspect_recall: inspect recall candidates from machine memory, plan archives, and recent session snapshotsinspect_memory_status: diagnose file paths and OpenViking readiness
The plugin also:
- mirrors recent session messages into local snapshots for explicit recall/debugging
- appends machine memory bundles during session compaction
- converts lifecycle reflection output into project reflection memory
Design note:
- machine-memory is a tool-layer capability, not a control-layer reminder
- the plugin does not auto-inject recall into user turns
- agents must explicitly decide when to call
inspect_recallorremember
Installation
Add it to your OpenCode config:
{
"plugin": [
"[email protected]"
]
}Storage Layout
- Global memory:
~/.config/opencode/machine-memory/ - Project memory:
<project>/.opencode/machine-memory/
Optional OpenViking Configuration
Basic file-backed memory works without extra services. Semantic sync/search through OpenViking is optional.
If OpenViking is not installed but uv is available, the plugin will automatically create
~/.config/opencode/machine-memory/.venv and install openviking on first Python-backend use.
Environment variables supported:
OPENVIKING_BASE_URLOPENVIKING_API_KEYOPENVIKING_PYTHON_BINOPENVIKING_BRIDGE_PATHOV_DATA_DIROV_TARGET_URIARK_API_KEYARK_ANTHROPIC_AUTH_TOKENARK_CODING_AUTH_TOKENDOUBAO_API_KEY
You can also configure ~/.config/opencode/machine-memory/openviking.json with:
{
"pythonBin": "python3",
"bridgePath": "/absolute/path/to/machine_memory_openviking_bridge.py",
"baseUrl": "http://127.0.0.1:1933",
"targetRootUri": "viking://resources/machine-memory/"
}