Neotoma

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.

ConcernOpenCodeNeotoma
Agent runtime and toolsCoding agent-
Plugin lifecycle hooksEvent surfaceHook package
Structured entities and tasks-Store via MCP
Cross-tool memory-Shared state graph
Audit trail and provenance-Observation history

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

Copy this prompt into OpenCode to have it read the evaluation page, inspect your tool, workspace, and configuration context, then judge whether Neotoma fits your real workflow and what to persist first.

Evaluation prompt
Reads the page, then evaluates fit against your real workflow.
Read https://neotoma.io/evaluate. Use any tool, workspace, and chat context already available in this session to assess my real workflow. Avoid ad-hoc shell introspection just to profile me; if Neotoma is already installed, use `neotoma doctor --json` for status instead. Then tell me whether Neotoma fits my workflow, what data would be highest value to persist first, and what I should do next.

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 dev

Keep MCP configured as well. Hooks guarantee baseline capture; MCP gives the agent the richer store, retrieval, relationship, and feedback tools.

OpenCode documentation

  • Plugins (npm plugins, local files, and hook events)
  • SDK (client APIs exposed to plugin context)

Before and after: OpenCode with Neotoma

“Continue where we left off yesterday.”

Without Neotoma

Resuming based on thread from two weeks ago.

With Neotoma

Resuming yesterday’s thread on the migration plan. 3 open tasks remaining.

“What did I commit to with Sarah last week?”

Without Neotoma

No commitments found.

With Neotoma

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?”

Without Neotoma

No hosting expenses found.

With Neotoma

$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.