<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: sequicompany</title>
    <description>The latest articles on DEV Community by sequicompany (@sequico).</description>
    <link>https://dev.to/sequico</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4175435%2Fde9ae822-ac93-4320-b2ae-8db5bcc4586b.png</url>
      <title>DEV Community: sequicompany</title>
      <link>https://dev.to/sequico</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sequico"/>
    <language>en</language>
    <item>
      <title>Sharing agent memory across machines without a server (or merge conflicts)</title>
      <dc:creator>sequicompany</dc:creator>
      <pubDate>Sat, 10 Oct 2026 14:31:42 +0000</pubDate>
      <link>https://dev.to/sequico/sharing-agent-memory-across-machines-without-a-server-or-merge-conflicts-18gn</link>
      <guid>https://dev.to/sequico/sharing-agent-memory-across-machines-without-a-server-or-merge-conflicts-18gn</guid>
      <description>&lt;p&gt;We run coding agents on more than one machine — a workstation, a laptop, a small server — and they kept forgetting things when we switched hosts. Chasing that sent us into the MCP memory server's storage model and out the other side with a small CRDT store, now published as &lt;code&gt;server-noonien&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;The official MCP memory server (&lt;code&gt;@modelcontextprotocol/server-memory&lt;/code&gt;) keeps the whole knowledge graph in a &lt;strong&gt;single JSONL file&lt;/strong&gt; that every call reads and rewrites in full. On one machine that is fine. The moment two machines want to share it, it is exactly the wrong shape:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it lives on one machine, so switching host loses the context;&lt;/li&gt;
&lt;li&gt;putting it on a folder you sync (Syncthing, Dropbox, a git working tree) causes &lt;strong&gt;lost writes&lt;/strong&gt;, because whole-file read-modify-write from two writers is not safe;&lt;/li&gt;
&lt;li&gt;the alternatives that avoid this are hosted services — your memory goes to someone else's cloud, behind an account.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The idea: same tools, different store
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;server-noonien&lt;/code&gt; is a &lt;strong&gt;drop-in&lt;/strong&gt; for the official server: the same nine tools, the same inputs and outputs, so you swap the &lt;code&gt;memory&lt;/code&gt; server entry and change nothing else in your agent.&lt;/p&gt;

&lt;p&gt;What changes is the store. Every mutation is recorded as an &lt;strong&gt;operation&lt;/strong&gt; in an &lt;strong&gt;append-only log&lt;/strong&gt;, split into &lt;strong&gt;per-node shards&lt;/strong&gt; — each machine appends only to its own &lt;code&gt;&amp;lt;node&amp;gt;.jsonl&lt;/code&gt;. A read &lt;strong&gt;folds&lt;/strong&gt; all the shards on disk into the graph.&lt;/p&gt;

&lt;p&gt;The fold is an &lt;strong&gt;LWW-Element-Set&lt;/strong&gt;: an element (an entity, an observation occurrence, a relation) is present exactly when its operation with the greatest &lt;code&gt;(HLC, node, sequence)&lt;/code&gt; is an add. The stamp is a hybrid logical clock, so the order is causal and stable across machines. Deletes are tombstones; deleting an observation is content-level; deleting an entity tombstones its observations and the relations incident to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it cannot conflict
&lt;/h2&gt;

&lt;p&gt;The fold depends only on the &lt;strong&gt;set&lt;/strong&gt; of operations, never on their order or grouping:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;idempotent&lt;/strong&gt; — applying the same operation twice changes nothing;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;commutative&lt;/strong&gt; — the order in which shards arrive does not matter;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;associative&lt;/strong&gt; — folding in any grouping gives the same graph;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;convergent&lt;/strong&gt; — two nodes that have seen the same operations fold the identical graph.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So there is no merge step to get wrong. Those four laws are &lt;strong&gt;property-tested&lt;/strong&gt; (&lt;code&gt;fast-check&lt;/code&gt;), not merely asserted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two ways for the machines to converge
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. A shared area&lt;/strong&gt; — the &lt;code&gt;file&lt;/code&gt; and &lt;code&gt;s3&lt;/code&gt; backends. The nodes exchange shards through something they both see: a folder you already replicate (Syncthing, Dropbox, a git working tree, a shared mount) or an S3-compatible bucket. The server &lt;strong&gt;merges&lt;/strong&gt; the shards; it does not move them. The bucket has to honour conditional writes (&lt;code&gt;If-Match&lt;/code&gt;/&lt;code&gt;If-None-Match&lt;/code&gt;) — AWS S3, Cloudflare R2 and MinIO do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Peer to peer&lt;/strong&gt; — the companion &lt;code&gt;nooniend&lt;/code&gt; daemon removes the shared area entirely. It replicates each shard directly between nodes over a private mesh (Tailscale, WireGuard, a LAN), so the nodes need only IP reachability. It never authors operations: it pushes the shard it authors and serves the replicas it holds, so the per-node single-writer rule still holds. Membership is gossiped, liveness comes from the exchange results, and it can restore a node's own lost shard from a peer's replica.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compaction
&lt;/h2&gt;

&lt;p&gt;An append-only log grows. &lt;code&gt;noonien compact&lt;/code&gt; rewrites a node's shard keeping, per element, the latest operation of each node — that set is always shadowed by a later operation of the same node, so the merge result does not change. The rewrite is atomic (a rename, or a conditional write on S3), and a property test checks that compaction preserves the merged graph.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it is &lt;em&gt;not&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Honest limits matter more than the pitch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Eventually consistent, by design.&lt;/strong&gt; A node sees another's writes after an exchange, not instantly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A node id is a single-writer shard.&lt;/strong&gt; Exactly one server process appends to &lt;code&gt;&amp;lt;node&amp;gt;.jsonl&lt;/code&gt; at a time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;file&lt;/code&gt;/&lt;code&gt;s3&lt;/code&gt; need a shared area.&lt;/strong&gt; Convergence without one is what &lt;code&gt;nooniend&lt;/code&gt; is for.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It is not a hosted service.&lt;/strong&gt; No account, no cloud, nothing to sign up for.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx &lt;span class="nt"&gt;-y&lt;/span&gt; server-noonien
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;TypeScript, MPL-2.0, Node ≥ 22, on npm as &lt;code&gt;server-noonien&lt;/code&gt;. &lt;code&gt;noonien import memory.jsonl&lt;/code&gt; migrates an existing official-memory file, and the graph is exposed as the &lt;code&gt;memory://knowledge-graph&lt;/code&gt; resource with subscribe/notifications.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;code&gt;server-noonien&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;Official &lt;code&gt;server-memory&lt;/code&gt;
&lt;/th&gt;
&lt;th&gt;Hosted memory services&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Multi-machine&lt;/td&gt;
&lt;td&gt;Yes — per-node shards, one graph&lt;/td&gt;
&lt;td&gt;No — one local file&lt;/td&gt;
&lt;td&gt;Yes, via the service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sharing a synced folder&lt;/td&gt;
&lt;td&gt;Safe — append-only, conflict-free&lt;/td&gt;
&lt;td&gt;Unsafe — whole-file read-modify-write&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Needs a server / database&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Needs a cloud account&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Works offline&lt;/td&gt;
&lt;td&gt;Yes (&lt;code&gt;file&lt;/code&gt; backend)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Storage&lt;/td&gt;
&lt;td&gt;Folder or S3-compatible bucket, your choice&lt;/td&gt;
&lt;td&gt;One JSONL file&lt;/td&gt;
&lt;td&gt;Their cloud&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Drop-in for the official tools&lt;/td&gt;
&lt;td&gt;Yes — same nine tools&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Migration&lt;/td&gt;
&lt;td&gt;&lt;code&gt;noonien import memory.jsonl&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;Export/import dance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model&lt;/td&gt;
&lt;td&gt;Explicit knowledge graph&lt;/td&gt;
&lt;td&gt;Explicit knowledge graph&lt;/td&gt;
&lt;td&gt;Often vector/semantic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;License&lt;/td&gt;
&lt;td&gt;MPL-2.0&lt;/td&gt;
&lt;td&gt;MIT&lt;/td&gt;
&lt;td&gt;Proprietary&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The repository is at &lt;a href="https://github.com/sequico/server-noonien" rel="noopener noreferrer"&gt;https://github.com/sequico/server-noonien&lt;/a&gt; — feedback welcome, especially on the operation-log and compaction design, and on the peer-to-peer sync.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>mcp</category>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
