<?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: meganemura</title>
    <description>The latest articles on DEV Community by meganemura (@meganemura).</description>
    <link>https://dev.to/meganemura</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%2F48845%2Fdca48cd5-9d95-4377-86dd-6ec0d2bb72ec.jpg</url>
      <title>DEV Community: meganemura</title>
      <link>https://dev.to/meganemura</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/meganemura"/>
    <language>en</language>
    <item>
      <title>polylinedb: A task and memory store on Cloudflare for cloud agents</title>
      <dc:creator>meganemura</dc:creator>
      <pubDate>Sun, 04 Oct 2026 05:51:11 +0000</pubDate>
      <link>https://dev.to/meganemura/polylinedb-a-task-and-memory-store-on-cloudflare-for-cloud-agents-2d0g</link>
      <guid>https://dev.to/meganemura/polylinedb-a-task-and-memory-store-on-cloudflare-for-cloud-agents-2d0g</guid>
      <description>&lt;p&gt;I built &lt;strong&gt;&lt;a href="https://github.com/meganemura/polylinedb" rel="noopener noreferrer"&gt;polylinedb&lt;/a&gt;&lt;/strong&gt; so my local tools and cloud agents can use the same tasks and project knowledge.&lt;br&gt;
It runs in my own Cloudflare account, with a CLI for local agents and remote MCP for cloud agents.&lt;br&gt;
Version 0.1.0 is now available on npm.&lt;/p&gt;
&lt;h2&gt;
  
  
  The problem I wanted to solve
&lt;/h2&gt;

&lt;p&gt;I have been using herdr to work with local agents. I build several tools and use one while developing another.&lt;br&gt;
When I find a bug or an awkward workflow, I want to keep the finding for the next change.&lt;br&gt;
A useful constraint or design decision needs to survive the conversation that produced it too.&lt;/p&gt;

&lt;p&gt;Adding cloud agents exposed a problem with where those records lived.&lt;br&gt;
I wanted to investigate locally, hand a task to a cloud agent, and review its progress from my laptop.&lt;br&gt;
A record in my local checkout could not serve every environment.&lt;br&gt;
I also wanted to avoid pulling and pushing a separate copy whenever I moved work.&lt;/p&gt;

&lt;p&gt;So I built a store that my local CLI and cloud MCP connectors can both use.&lt;/p&gt;
&lt;h2&gt;
  
  
  A store my cloud sessions can reach
&lt;/h2&gt;

&lt;p&gt;Suppose a local agent discovers that empty input causes a failure. I want it to record the finding in an issue. A cloud agent can then read that issue before working on a fix. Later, I want to inspect the same record from my laptop.&lt;/p&gt;

&lt;p&gt;I use the cloud database as the main store for records shared with cloud agents.&lt;br&gt;
My local CLI reads and writes that same database.&lt;br&gt;
A Cloudflare Worker accepts HTTP requests from the CLI and remote MCP calls from cloud hosts.&lt;br&gt;
&lt;a href="https://developers.cloudflare.com/d1/" rel="noopener noreferrer"&gt;D1, Cloudflare's serverless SQLite service&lt;/a&gt;, stores the records.&lt;/p&gt;

&lt;p&gt;An agent can create an issue, search earlier findings, append a comment, or update progress through either interface.&lt;br&gt;
The records remain available when I change hosts or start another session.&lt;br&gt;
That is the reason for the cloud-first design: the store must be reachable from wherever the next agent runs.&lt;/p&gt;
&lt;h2&gt;
  
  
  Keep knowledge after a task closes
&lt;/h2&gt;

&lt;p&gt;Tasks record work to do. Memory retains findings that later work needs.&lt;br&gt;
During a migration, for example, I may confirm that IDs, authors, and timestamps must survive the move.&lt;br&gt;
After the migration task closes, that constraint can remain in project memory for the next agent to retrieve.&lt;/p&gt;

&lt;p&gt;With an authenticated connection named &lt;code&gt;cloud&lt;/code&gt;, the CLI can retrieve both kinds of record:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Find the project's unfinished work&lt;/span&gt;
pd &lt;span class="nt"&gt;--connection&lt;/span&gt; cloud list &lt;span class="nt"&gt;--project&lt;/span&gt; demo &lt;span class="nt"&gt;--status&lt;/span&gt; open

&lt;span class="c"&gt;# Retrieve the knowledge saved for that project&lt;/span&gt;
pd &lt;span class="nt"&gt;--connection&lt;/span&gt; cloud memory context &lt;span class="nt"&gt;--project&lt;/span&gt; demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cloud agents can retrieve the same records through MCP.&lt;br&gt;
The bundled skill tells agents to retrieve project knowledge before work and after context recovery.&lt;br&gt;
Retrieval is explicit, and the saved text cannot override the user's instructions.&lt;/p&gt;

&lt;p&gt;This also fits how I develop my tools.&lt;br&gt;
Feedback becomes a task, while a confirmed finding can become memory that later work reuses.&lt;br&gt;
Knowledge belongs to a selected project. I can use a common project for facts that several tools need.&lt;/p&gt;
&lt;h2&gt;
  
  
  A personal deployment on Cloudflare
&lt;/h2&gt;

&lt;p&gt;I wanted a store I could operate in my own account without maintaining a database server.&lt;br&gt;
Cloudflare provides the Worker runtime, D1, and Access.&lt;br&gt;
I manage the polylinedb application and its access settings.&lt;/p&gt;

&lt;p&gt;I enjoyed using the &lt;code&gt;cf&lt;/code&gt; CLI for setup.&lt;br&gt;
I could create resources, deploy the Worker, and configure Access without repeating those steps manually in the dashboard.&lt;br&gt;
The &lt;a href="https://github.com/meganemura/polylinedb/blob/main/docs/cloud.md" rel="noopener noreferrer"&gt;deployment guide&lt;/a&gt; records the procedure for another person's account.&lt;/p&gt;

&lt;p&gt;Access handles OAuth authentication, and polylinedb checks the authenticated identity against its store allowlist.&lt;br&gt;
The connector host manages the cloud agent's OAuth credentials.&lt;br&gt;
I do not put a client secret in a prompt or hand the agent a Cloudflare Service Token.&lt;br&gt;
The local CLI uses browser login and stores credentials in macOS Keychain or Linux Secret Service.&lt;br&gt;
Expired or revoked authorization can require another login.&lt;/p&gt;

&lt;p&gt;Local SQLite mode is available too. It opens one file outside the working repository and needs no server.&lt;br&gt;
It is an independent store, with an explicit migration path to the cloud.&lt;br&gt;
For shared records, my laptop uses the cloud connection rather than a synchronized local copy.&lt;/p&gt;
&lt;h2&gt;
  
  
  When agents write at the same time
&lt;/h2&gt;

&lt;p&gt;Several agents may read the same issue before any of them changes it.&lt;br&gt;
If one changes the body, another cannot overwrite that change using an older version.&lt;br&gt;
polylinedb rejects the stale update so the agent can read again and reconsider.&lt;br&gt;
Different issue fields have separate versions, while each memory entry has one version.&lt;/p&gt;

&lt;p&gt;Creation also recognizes retries, so a lost response need not produce a duplicate task.&lt;br&gt;
These choices account for agents that work concurrently and make requests over a network.&lt;br&gt;
My experience so far is personal development with multiple agents. I have not tested operation by multiple people.&lt;/p&gt;
&lt;h2&gt;
  
  
  Ready for my personal development
&lt;/h2&gt;

&lt;p&gt;In my deployment, Cursor Cloud, Codex Cloud, and Claude created issues, read them, and added comments through MCP.&lt;br&gt;
Grok Bot shared Cursor's authentication and read existing issues.&lt;br&gt;
Local Codex, Claude Code, and Cursor used the CLI to read and write records in the same cloud store.&lt;/p&gt;

&lt;p&gt;I also checked memory operations through the CLI and MCP, then independently inspected the saved results in D1.&lt;br&gt;
The checks covered reads, writes, conflict rejection, and behavior after deletion.&lt;/p&gt;

&lt;p&gt;I moved my personal issues from Beads, then moved my shared local records into the existing cloud database.&lt;br&gt;
I compared the complete result before changing each project's selected store.&lt;br&gt;
The &lt;a href="https://github.com/meganemura/polylinedb/blob/main/docs/migration.md" rel="noopener noreferrer"&gt;migration guide&lt;/a&gt; records the one-time conversion.&lt;/p&gt;

&lt;p&gt;Those checks establish access and record behavior in my environment.&lt;br&gt;
A formal experiment that hands work between local and cloud agents in both directions is still planned.&lt;br&gt;
Automatic memory hooks and update notifications also remain future work.&lt;/p&gt;
&lt;h2&gt;
  
  
  Try it with your agents
&lt;/h2&gt;

&lt;p&gt;polylinedb means polyline database. Its command is &lt;code&gt;pd&lt;/code&gt;, and version 0.1.0 is available under the MIT license.&lt;br&gt;
The &lt;a href="https://github.com/meganemura/polylinedb#readme" rel="noopener noreferrer"&gt;README&lt;/a&gt; covers local use, and the deployment guide covers a store in your own Cloudflare account.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--global&lt;/span&gt; polylinedb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I now keep my tools' tasks and project knowledge in this store.&lt;br&gt;
When I start another session, the agent can retrieve the records that earlier work left behind.&lt;br&gt;
If you work with both local and cloud agents, I would like to hear which parts of that transition still cost you effort.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>cloudflare</category>
      <category>mcp</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
