Memory infrastructure for Claude agents

Translation for ur is not available yet; showing English source (translated_from_revision=2026-05-07).

The Claude Agent SDK and Managed Agents let developers build agents on top of Anthropic's platform primitives: bash, code execution, web search, the text editor, and the Memory Tool. Neotoma connects as an MCP server alongside these tools and provides a schema-bound, append-only memory backend for facts that must be trustworthy across sessions, tools, and agents.

Looking for the Claude web or desktop apps? See Neotoma with Claude. For the local CLI, see Neotoma with Claude Code.

What the Agent SDK and Managed Agents provide

  • Claude Agent SDK (Python and TypeScript) for running agents in your own process with a configurable tool set
  • Managed Agents for running agents in Anthropic-hosted cloud containers without managing infrastructure
  • The Memory Tool (beta), which gives agents a client-side /memories file directory for cross-session state
  • MCP server support (stdio for local SDK, remote HTTPS for Managed Agents) for connecting external tools and memory backends

What they don't handle

  • Schema validation on memory writes. The Memory Tool stores unstructured files; any string can be written, and malformed data is accepted silently
  • Append-only guarantees. Files in /memories can be overwritten or deleted by the agent with no history of prior versions
  • Entity resolution. There is no canonical ID for a person, task, or record, so the same fact can be written in multiple conflicting forms
  • Provenance tracking. There is no record of which agent, session, or pipeline wrote a given fact, or when
  • Cross-tool access. Memory written by an Agent SDK process is not visible to Claude Desktop, Cursor, Codex, or any other tool
  • Concurrent-write safety. Multiple agents writing to the same file can silently clobber each other

Deterministic guarantees Neotoma provides

  • Append-only observations: writes are never silently overwritten, and prior versions are always recoverable
  • Schema-bound entities: invalid writes are rejected at store time, not discovered at read time
  • Deterministic state: same observations always produce the same entity snapshots
  • Full provenance: every field traces to the agent, session, and observation that wrote it
  • Cross-tool continuity: memory is shared with Claude, Claude Code, Cursor, Codex, and ChatGPT

Using them together

The Memory Tool and Neotoma address different layers of the problem and can run at the same time. Use the Memory Tool for lightweight scratchpad state that is specific to the current agent. Use Neotoma for facts that must survive compaction, cross tool boundaries, or carry an audit trail.

Use caseMemory ToolNeotoma
Scratchpad notes during a sessionYes-
Agent-specific preferences and conventionsYes-
Structured entities (people, tasks, records)-Store via MCP
Facts that must survive context compaction-Append-only log
Multi-agent pipelines with shared state-Cross-tool memory
Audit trail and field-level provenance-Observation history

See the full list of memory guarantees for the architectural reasoning behind this split.

Setup notes

Neotoma connects to both the Agent SDK and Managed Agents through MCP. The transport depends on where the agent is running.

  • Agent SDK (local process): use stdio. The SDK spawns neotoma mcp as a subprocess. Same pattern as Claude Desktop.
  • Managed Agents (cloud containers): expose Neotoma's API server over HTTPS and connect via remote MCP. Same pattern as claude.ai remote MCP. Local stdio is not reachable from Anthropic-hosted containers.

See the Agent SDK MCP documentation for current configuration shape. SDK parameter names may change; verify against the upstream docs before wiring up a production integration.

Neotoma SDK adapter (optional)

The Neotoma Claude Agent SDK adapter returns ready-to-mount callbacks for the SDK's hooks interface (UserPromptSubmit, PostToolUse, PreCompact, Stop). MCP remains the path for agent-driven structured writes. The adapter captures lifecycle events the agent cannot see on its own and injects retrieved Neotoma context into each prompt via additionalContext.

Install with npm install @neotoma/claude-agent-sdk-adapter @neotoma/client alongside the SDK. Pair with MCP for a reliable floor plus a structured ceiling.

Getting started

Copia este prompt en the Claude Agent SDK or Managed Agents 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.

Prompt de evaluación
Lee la página y evalúa el encaje frente a tu flujo real.
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.

If you are ready to proceed, paste this prompt into a Claude agent. The agent handles evaluation, installation if needed, activation, and MCP configuration.

Code snippet
Copy the exact snippet shown below.
Read https://neotoma.io/install and carry me through the install-first Neotoma flow.

Use `neotoma` commands for status and setup. If Neotoma is already installed, start with `neotoma doctor --json`; otherwise install it and run `neotoma setup --tool <my_tool> --yes`.

Avoid ad-hoc shell introspection or arbitrary repo scripts. Then activate Neotoma with my data and configure my current tool for robust ongoing use.

Claude Agent SDK documentation

Before and after: Claude Agent SDK 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 Claude Agent SDK 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?”

Start with evaluation, see the install guide for more options, MCP reference for MCP setup, the platform memory comparison for a broader picture, and agent instructions for behavioral details.