Install
Install the plugin:
opencode plugin opencode-nowledge-mem -g
Restart OpenCode to load the plugin.
What You Get
Nine tools registered directly in OpenCode, plus an idle-event hook that saves the current session as a Mem thread after OpenCode finishes a turn:
| Tool | What it does |
|---|---|
nowledge_mem_context_bundle |
Loads startup context: identity, active space, Rules, Working Memory, and KFS paths |
nowledge_mem_working_memory |
Loads your daily briefing: focus areas, priorities, recent changes |
nowledge_mem_search |
Searches past decisions and procedures, with label and deep mode filters |
nowledge_mem_save |
Saves decisions, insights, and procedures as durable memories |
nowledge_mem_update |
Updates an existing memory with refined information |
nowledge_mem_thread_search |
Searches past conversations from any tool |
nowledge_mem_save_thread |
Saves the full session as a conversation thread on demand |
nowledge_mem_save_handoff |
Creates a resumable session handoff summary |
nowledge_mem_status |
Checks Nowledge Mem server connectivity |
Behavioral guidance is injected into the system prompt automatically. New OpenCode sessions are captured through the plugin when OpenCode reports idle, and long sessions flush before compaction.
Remote Mode
Configure this machine once:
nmem config client set url https://your-server
nmem config client set api-key your-key
The plugin uses that shared client config for memory tools, idle-event thread capture, manual nowledge_mem_save_thread, and historical nmem t sync.
Import Older Sessions
nmem t sync --from opencode --all-projects --limit 20
nmem t sync --from opencode --all-projects --apply
Use -p /path/to/project instead of --all-projects when you only want one project.