<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Shashank Shekhar]]></title><description><![CDATA[Shashank Shekhar]]></description><link>https://shkr.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Nov 2026 20:41:32 GMT</lastBuildDate><atom:link href="https://shkr.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Where should your agent keep its work between sessions?]]></title><description><![CDATA[My agents kept losing their work. A session would build a tracker, a ledger or a report. The next session could not find it. Sometimes it found an old copy…]]></description><link>https://shkr.hashnode.dev/where-should-your-agent-keep-its-work-between-sessions</link><guid isPermaLink="true">https://shkr.hashnode.dev/where-should-your-agent-keep-its-work-between-sessions</guid><category><![CDATA[mcp]]></category><category><![CDATA[ai agents]]></category><category><![CDATA[claude]]></category><category><![CDATA[Artificial Intelligence]]></category><dc:creator><![CDATA[Shashank Shekhar]]></dc:creator><pubDate>Mon, 16 Nov 2026 06:05:30 GMT</pubDate><content:encoded><![CDATA[<p>My agents kept losing their work. A session would build a tracker, a ledger or a report. The next session could not find it. Sometimes it found an old copy and wrote over a newer one.</p>
<p>The model was not the problem. The problem was where the work lived. A chat transcript ends with the session. A folder of markdown files has no versions, no checks and no idea who else is editing it.</p>
<p>So I gave my agents a system of record. It is a remote MCP server, and the agent keeps its work there in <strong>workbooks</strong>.</p>
<h2>What is a workbook?</h2>
<p>A workbook is a set of tabs. Each tab is markdown: a table, or a page of notes. A workbook can also be an Excel or Word file, or a sheet linked to Google Drive or Dropbox. In that case the file in the drive stays the record.</p>
<p>Four rules make it safe for an agent to use.</p>
<p><strong>1. Every write is a new version.</strong> The agent never edits in place. Each write makes version N+1 and keeps version N. Any earlier version can be read or restored.</p>
<p><strong>2. A stale write is refused.</strong> The agent says which version it based its write on. If someone else wrote a newer version since, the write fails. Nothing is merged over. The agent reads the new version and tries again.</p>
<p><strong>3. Edits are checked like code.</strong> A workbook can carry a schema. It declares each table's columns, types, required cells, keys and references. Every write is compiled against it. A bad cell comes back as an error, the way a compiler answers. The agent fixes the cell and writes again.</p>
<p><strong>4. Everyone reads the same thing.</strong> Claude, ChatGPT, Codex and Cursor connect to the same server. So does a person in the web app. A workbook one agent writes on Monday is the one another agent reads on Tuesday.</p>
<h2>A real example</h2>
<p>This week I asked Claude Code to plan an outreach pilot. I wanted the plan to be checkable, not just plausible.</p>
<p>It kept four tabs in one workbook:</p>
<ul>
<li><strong>Model.</strong> A TLA+ specification of the rules: who may be contacted, how often, and when the pilot may scale.</li>
<li><strong>TLC result.</strong> The model checker's output. Nine safety rules hold across about 41,000 states. One rule was written to break on purpose, and its trace is the shortest path to a decision to scale.</li>
<li><strong>Simulator.</strong> A Monte Carlo simulation of the funnel, with the priors written down so they can be replaced after the pilot.</li>
<li><strong>Ledger.</strong> Who was contacted, how each address was checked and when each message goes out.</li>
</ul>
<p>The workbook went through four versions in one afternoon. Each has a one-line summary of what changed. When I wanted to know why the ledger had grown from 14 rows to 50, I read the version history. I did not have to scroll back through a chat.</p>
<h2>How the agent uses it</h2>
<p>The server exposes a small set of tools. The ones an agent uses most are:</p>
<ul>
<li><code>find_workbooks</code>: look for the workbook that already exists before making a new one.</li>
<li><code>read_workbook</code>: read the current version, or any earlier one by number.</li>
<li><code>write_workbook</code>: write a new version, based on the version it read.</li>
<li><code>checkout_workbook</code>: copy the tabs into a shell, edit them with scripts, then commit them as one version.</li>
</ul>
<p>The last one matters for big edits. The agent can use <code>sed</code>, <code>awk</code> or Python on plain files and commit once. The schema check still runs on commit.</p>
<p>The server also has live data programs the agent can run from the same shell. These include Google Trends, SEC Form D filings and US customs records. Their results can go straight into a workbook.</p>
<h2>Install</h2>
<p>Claude Code:</p>
<pre><code>claude mcp add --transport http --scope user hedwigai https://mcp.hedwigai.com
</code></pre>
<p>Then run <code>/mcp</code>, pick hedwigai and authenticate in the browser. Sign-in is OAuth 2.1 with dynamic client registration, so there is no token to paste.</p>
<p>Codex:</p>
<pre><code>codex mcp add hedwigai --url https://mcp.hedwigai.com &amp;&amp; codex mcp login hedwigai
</code></pre>
<p>Claude, ChatGPT and Cursor: add <code>https://mcp.hedwigai.com</code> as a custom connector.</p>
<p>The server is in the official MCP registry as <code>com.hedwigai/hedwigai</code>.</p>
<h2>Try it with your own server</h2>
<p>If you build MCP servers, I will turn on two weeks of free inference for your account. Sign up and leave a comment, and I will set it up. After the two weeks, three open models stay free to use as much as you like.</p>
<p>For a wider view, I compared 24 places agents can save their work, from Tencent's Agent Bucket and Google's ADK artifacts to AWS AgentCore, Claude and OpenAI: <a href="https://www.hedwigai.com/blog/agent-artifact-stores">where do AI agents save their work?</a></p>
<p>How does your agent keep its state across sessions today? I would like to hear what works and what breaks.</p>
<p><em>Disclosure: I build hedwigai.</em></p>
]]></content:encoded></item></channel></rss>