Neotoma with OpenCode
OpenCode is a local coding agent with a TypeScript plugin system. Neotoma adds a persistent, user-owned state layer that OpenCode can reach through MCP and lifecycle hooks.
Looking for OpenClaw instead? See Neotoma with OpenClaw.
What OpenCode provides
- Local agent runtime for code editing, shell work, and project tasks
- Plugin hooks for sessions, messages, tool execution, shell environment, and compaction context
- Load plugins from
opencode.json(npm packages) or from local files under.opencode/plugins/and~/.config/opencode/plugins/
What OpenCode doesn't handle
- Durable structured memory shared across other agent tools
- Entity resolution, observation history, or provenance-backed facts
- A persistence or consistency layer for external stores: OpenCode runs hooks and tool calls but does not verify, deduplicate, sequence, or repair what lands in databases, APIs, or files; that remains the job of plugins and integrations you add
Deterministic guarantees Neotoma provides
- Persistent memory graph shared with Cursor, Claude Code, Codex, ChatGPT, and OpenClaw
- Conversation, message, tool, and compaction observations with stable provenance
- Structured state written by the agent through MCP, with hook capture as a safety net
- CLI fallback when MCP is unavailable or the agent needs direct terminal access
Using them together
OpenCode stays responsible for the agent runtime. Neotoma stays responsible for the durable state layer. MCP remains the quality path for schema-typed writes, while the OpenCode plugin records baseline turn activity when the agent misses a step.
Neotoma OpenCode plugin
The Neotoma OpenCode plugin is published as @neotoma/opencode-plugin. Add it to opencode.json:
{
"plugin": ["@neotoma/opencode-plugin"]
}OpenCode installs npm plugins automatically at startup. For local plugin files, export a named plugin function from ~/.config/opencode/plugins/neotoma.ts:
import neotoma from "@neotoma/opencode-plugin";
export const Neotoma = neotoma();Getting started
Copia este prompt en OpenCode para que lea la página de evaluación, revisa tu herramienta, espacio de trabajo y configuración, y juzga si Neotoma encaja en tu flujo real y qué conviene persistir primero.
Lee https://neotoma.io/evaluate. Usa cualquier herramienta, espacio de trabajo y contexto de chat ya disponibles en esta sesión para evaluar mi flujo real. Evita introspección ad hoc en la shell solo para perfilarme; si Neotoma ya está instalado, usa `neotoma doctor --json` para el estado. Luego dime si Neotoma encaja en mi flujo, qué datos conviene persistir primero por valor y qué debería hacer a continuación.Start Neotoma locally, then let OpenCode load the plugin from npm or a local plugin file:
npm install -g neotoma
neotoma api start --background --env devKeep MCP configured as well. Hooks guarantee baseline capture; MCP gives the agent the richer store, retrieval, relationship, and feedback tools.
OpenCode documentation
Before and after: OpenCode with Neotoma
“Continue where we left off yesterday.”
Resuming based on thread from two weeks ago.
Resuming yesterday’s thread on the migration plan. 3 open tasks remaining.
“What did I commit to with Sarah last week?”
No commitments found.
You committed to sending the architecture doc by Friday. Sarah’s email updated Mar 28.
“How much did we spend on cloud hosting last month?”
No hosting expenses found.
$847 across AWS and Vercel, up 12% from February.
After you connect
Once Neotoma is running, try these starter commands in OpenCode to see cross-session memory in action:
Store a contact
“Remember that Sarah Chen's email is sarah@newstartup.io — she's the CTO at NewStartup.”
Store a task
“I need to send the architecture doc to Sarah by Friday.”
Recall across sessions
“What do I know about Sarah? What did I commit to doing for her?”
See the package README, MCP reference, CLI reference, and agent instructions for the full operating contract.