<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Harry Zhang on Medium]]></title>
        <description><![CDATA[Stories by Harry Zhang on Medium]]></description>
        <link>https://medium.com/@zhanghaili?source=rss-7850064f3a8d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*IJWqRx--m604qtWs</url>
            <title>Stories by Harry Zhang on Medium</title>
            <link>https://medium.com/@zhanghaili?source=rss-7850064f3a8d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 21:06:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zhanghaili/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[CLI Left, Dashboard Right: How to Layer Interfaces in the Agent Era]]></title>
            <link>https://medium.com/from-zero-to-seekdb/cli-left-dashboard-right-how-to-layer-interfaces-in-the-agent-era-d3db67ba4407?source=rss-7850064f3a8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3db67ba4407</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Harry Zhang]]></dc:creator>
            <pubDate>Wed, 25 Mar 2026 16:01:01 GMT</pubDate>
            <atom:updated>2026-03-25T16:01:01.435Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KFDK_Icjph8vzfoYsx0zUg.png" /></figure><p>Andrej Karpathy recently said on X: 99% of products and services still don’t have an AI-native CLI.</p><p>Sharp observation, but only half the story. Our take: CLI alone isn’t enough. Products in the Agent era need two interface layers simultaneously — one that lets Agents execute with low friction, and one that lets humans understand the big picture and make decisions. The former is the operation layer. The latter is the cognition layer. A product with only one is incomplete.</p><p>This article is about that layering, and how we put it into practice with PowerMem 1.0.0.</p><h3>Agents Don’t Click Buttons — They Run Commands</h3><p>OpenClaw is a prime example. It’s not a chatbot — it’s an autonomous Agent that takes tasks, runs commands, reads and writes files, and calls external systems. The interface it naturally gravitates toward: one command, a few parameters, one structured result. Not HTML pages. Not form controls. Not a GUI that requires simulated clicks.</p><p>This isn’t an OpenClaw quirk — it’s a universal Agent trait. An Agent’s work loop is: observe environment, call tool, read result, decide next step. In that loop, CLI is the lowest-friction interface — predictable I/O, text-based results, no session state to maintain.</p><p>When designing PowerMem’s CLI (pmem), we deliberately built it to satisfy five conditions:</p><ul><li><strong>Predictable.</strong> Every command has deterministic behavior: parameters in, stdout out, exit code signals success or failure. No guessing required.</li></ul><pre># Agent call: search memories, get JSON, parse directly<br>pmem memory search &quot;user preferences&quot; --user-id user123 --json</pre><ul><li><strong>Discoverable.</strong> pmem --help, pmem memory --help, bash/zsh/fish completions — an Agent can understand what&#39;s available and how to call it on first contact. No need to read the entire documentation before getting started.</li><li><strong>Composable.</strong> A single command is useful; chaining them is more useful. Agents can pipe pmem into scripts, CI/CD, workflow orchestration — not just point-and-call.</li></ul><pre># Agent orchestration: backup → cleanup → stats, one pipeline<br>pmem manage backup -o backup.json &amp;&amp; pmem manage cleanup --dry-run &amp;&amp; pmem stats --json</pre><ul><li><strong>Controllable.</strong> pmem isolates via --user-id and --agent-id — different Agents operate in different memory spaces. Permission boundaries are drawn at the command layer, no extra gateway needed.</li><li><strong>Human-Agent isomorphic.</strong> The commands a developer uses to debug in the terminal are the same commands an Agent invokes during orchestration. Same semantics, same config, same state — no split-brain between what humans see and what Agents operate on.</li></ul><p>These five conditions aren’t our invention. They’re Unix philosophy, naturally extended into the Agent era. CLI is the most native interface for Agents not because it’s old, but because its design patterns inherently match how Agents work.</p><h3>But CLI Alone Isn’t Enough</h3><p>If an Agent writes 100,000 memories via CLI, then what?</p><p>As a developer or operator, you need answers: How many memories total? What’s the distribution by user, Agent, type? Which memories are frequently retrieved? Which are stale and should be cleaned up? Is the system healthy?</p><p>CLI can answer these questions, but not well. pmem stats --json gives you raw numbers, but numbers aren&#39;t understanding. You need trends, distributions, anomaly detection, correlation analysis — the kind of thing visual interfaces excel at.</p><p>Our OpenClaw memory plugin <a href="https://github.com/ob-labs/memory-powermem">memory-powermem</a> is a concrete example. It uses autoRecall to retrieve relevant memories before each session and autoCapture to extract key facts after each session. In testing, token consumption dropped to 18% of the default approach. The plugin works precisely because PowerMem&#39;s CLI and API are predictable and composable — it calls pmem commands internally to read and write memories, no proprietary protocol to learn.</p><p>But even with the Agent side running smoothly, developers still need to see: What did the plugin write into PowerMem? Which memories are recalled most? How do you quantify the token savings?</p><p>That’s why Dashboard exists. It’s not a graphical wrapper around CLI — it’s a fundamentally different layer of interface: <strong>CLI solves how to operate. Dashboard solves how to understand.</strong></p><p>In PowerMem 1.0.0, Dashboard provides:</p><ul><li>Real-time stats on memory volume, write rate, and retrieval frequency</li><li>Distribution analysis by user_id, agent_id, and type</li><li>System health monitoring</li><li>Memory browsing, filtering, and detail inspection</li></ul><p>CLI could theoretically provide all of this (via --json output piped to visualization), but Dashboard turns it into a one-second visual judgment. One glance tells you system status — no scripts, no command assembly required.</p><h3>Operation Layer and Cognition Layer: Not Style, but Responsibility</h3><p>When you look at CLI and Dashboard together, they aren’t two styles of interface — they’re two layers with different responsibilities:</p><p><strong>CLI is the operation layer.</strong> For execution, orchestration, automation. Serving Agents and developers who need scriptable operations.</p><p><strong>Dashboard is the cognition layer.</strong> For understanding, analysis, decision-making. Serving humans who need a global perspective.</p><p>This layering becomes critical in the Agent era because users are no longer just humans. When Agents become regular users of your product, you must answer two questions simultaneously: How does an Agent use your product? How does a human understand what happened after the Agent used it?</p><p>The former requires an operation layer — executable, predictable, composable interfaces. The latter requires a cognition layer — observable, analyzable, judgment-ready views. Neither alone is sufficient.</p><p>A product with only an operation layer: Agents can use it, but humans have no visibility. A product with only a cognition layer: humans can see, but Agents can’t plug in. Only when both layers coexist does a product truly transform from “software for humans” into “a system where humans and Agents work together.”</p><h3>Beyond CLI and Dashboard</h3><p>This layering isn’t specific to PowerMem or memory systems.</p><p>Any Agent-era infrastructure — databases, search systems, deployment tools, monitoring, task orchestrators — will face the same question: How do Agents access your capabilities? How do humans understand your state?</p><p>The answer isn’t “open another API” or “build another admin panel.” It’s deliberately designing two interface layers that share the same semantics and state, each facing its most natural consumer.</p><p>Karpathy said 99% of products lack an AI-native CLI. We’d add: even with CLI, if there’s no cognition layer to help humans understand what the Agent is doing, the product is still only half done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N_3bnxj9FQA0QV5cPUjCrw.png" /></figure><h3>Our Choice</h3><p>Back to PowerMem 1.0.0. We shipped five interfaces in this release: Python SDK, CLI (pmem), HTTP API, MCP Server, and Dashboard.</p><p>They’re not five separate products — they’re five expressions of the same capabilities:</p><ul><li><strong>SDK</strong> for embedded development — three lines to start</li><li><strong>HTTP API</strong> for cross-language integration — RESTful + Swagger</li><li><strong>MCP Server</strong> for model ecosystems — Claude Desktop and other MCP clients read/write memories directly</li><li><strong>CLI</strong> for the shared operation layer between humans and Agents</li><li><strong>Dashboard</strong> for the human cognition and analysis layer</li></ul><p>All five share the same config, storage, and semantics. A human debugs via CLI, an Agent calls via MCP, ops checks distribution on Dashboard — all seeing the same world.</p><p>This is our understanding of interfaces in the Agent era: <strong>not more interfaces for their own sake, but each interface returning to its natural responsibility, semantically consistent across the board.</strong></p><p>CLI left, Dashboard right. One makes the system run. The other makes the value visible.</p><p>If you’re using OpenClaw, try our memory plugin to experience this layering firsthand: after one-click install, the Agent manages memories through the operation layer (CLI / API), while you observe what it remembers and how much tokens it saves through the cognition layer (Dashboard).</p><ul><li><strong>Install Guide</strong>: <a href="https://clawhub.ai/teingi/install-powermem-memory-minimal">clawhub.ai/teingi/install-powermem-memory-minimal</a></li><li><strong>PowerMem on GitHub</strong>: <a href="https://github.com/oceanbase/powermem">github.com/oceanbase/powermem</a></li><li><strong>OpenClaw Memory Plugin</strong>: <a href="https://github.com/ob-labs/memory-powermem">memory-powermem</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*31QOggjmRoYoOo-SmcB7PQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3db67ba4407" width="1" height="1" alt=""><hr><p><a href="https://medium.com/from-zero-to-seekdb/cli-left-dashboard-right-how-to-layer-interfaces-in-the-agent-era-d3db67ba4407">CLI Left, Dashboard Right: How to Layer Interfaces in the Agent Era</a> was originally published in <a href="https://medium.com/from-zero-to-seekdb">From Zero To OceanBase</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PowerMem: An Open-Source Memory System Built for the Agent Era]]></title>
            <link>https://medium.com/from-zero-to-seekdb/powermem-an-open-source-memory-system-built-for-the-agent-era-04c6debf69fc?source=rss-7850064f3a8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/04c6debf69fc</guid>
            <category><![CDATA[memories]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Harry Zhang]]></dc:creator>
            <pubDate>Wed, 18 Mar 2026 16:01:02 GMT</pubDate>
            <atom:updated>2026-03-18T16:01:02.964Z</atom:updated>
            <content:encoded><![CDATA[<h3>Giving OpenClaw Long-Term Memory — PowerMem 1.0.0 Released</h3><p>LLMs are stateless. Every conversation starts from scratch. The naive fix — stuffing the entire chat history into the context window — breaks down fast: inference slows, token costs scale linearly, and answer quality degrades as context grows (the “lost in the middle” effect is well-documented).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hQMvHMl2ISoaIKp6TrgqRA.png" /></figure><p><strong>OceanBase</strong> <a href="https://github.com/oceanbase/powermem"><strong>PowerMem</strong></a> takes a different approach. It’s an open-source intelligent memory system (<a href="https://github.com/oceanbase/powermem/blob/master/LICENSE">Apache 2.0</a>) that gives LLM and multi-agent applications a persistent memory layer. Instead of brute-forcing everything into context, it extracts key facts from conversations, persists what matters, lets stale information decay, and retrieves precisely when needed.</p><h3>Core Capabilities</h3><ul><li><strong>Hybrid retrieval</strong> — vector search, full-text search, and knowledge graph combined. Semantic queries and exact keyword lookups both work.</li><li><strong>Ebbinghaus forgetting curve</strong> — recent and frequently-accessed memories rank higher; outdated noise fades naturally.</li><li><strong>Smart extraction</strong> — an LLM distills facts from conversations automatically, handling deduplication, conflict resolution, and merging.</li><li><strong>Multi-agent support</strong> — each agent gets its own memory space, with optional cross-agent sharing.</li><li><strong>Multimodal</strong> — stores and retrieves text, images, and audio.</li></ul><h3>Benchmarks</h3><p>We evaluated on <a href="https://arxiv.org/abs/2306.07174">LOCOMO</a>, an academic benchmark designed to measure long-conversation memory recall. It simulates realistic multi-turn dialogues and tests whether a system can accurately retrieve historical information.</p><p>PowerMem vs. full-context baseline:</p><ul><li><strong>Accuracy:</strong> 78.70% vs 52.9% → <strong>+48.77%</strong></li><li><strong>p95 Latency:</strong> 1.44s vs 17.12s → <strong>-91.83%</strong></li><li><strong>Token Usage:</strong> ~0.9K vs ~26K → <strong>-96.53%</strong></li></ul><p>Real-world validation: we ran a comparison on <a href="https://openclaw.ai/">OpenClaw</a>. By default, OpenClaw loads the entire MEMORY.md into the system prompt every turn — no retrieval, growing without bound. The PowerMem plugin replaces this mechanism: retrieve relevant memories before each session, extract key facts after each session, and only inject what matters into context.</p><ul><li><strong>OpenClaw default (memory-core):</strong> 24,611,530 total input tokens</li><li><strong>OpenClaw + LanceDB:</strong> 51,574,530 total input tokens</li><li><strong>OpenClaw + PowerMem Plugin:</strong> <strong>4,533,508</strong> total input tokens</li></ul><p>Under identical workloads, the PowerMem plugin consumed just <strong>18%</strong> of the default approach’s tokens.</p><h3>Why 1.0.0</h3><p>This release stabilizes the API and integration surface. More importantly, it ships two layers that we think agent-era products need simultaneously:</p><ul><li><strong>CLI (</strong><strong>pmem) as the operation layer</strong> — a shared execution interface for both humans and agents, scriptable and composable.</li><li><strong>Dashboard as the cognition layer</strong> — visualization, distribution analysis, and health monitoring that turn raw memory data into actionable insight.</li></ul><p>Agents need a low-friction interface they can call and orchestrate. Humans need an interface they can read and reason about. Both layers have to exist for the product to be complete. We’ll publish a deeper write-up on this “CLI left, Dashboard right” philosophy next week.</p><h3>OpenClaw Memory Plugin — Now on ClawHub</h3><p>We’ve built a PowerMem long-term memory plugin (<a href="https://github.com/ob-labs/memory-powermem">memory-powermem</a>) for <a href="https://openclaw.ai/"><strong>OpenClaw</strong></a>. Once installed, OpenClaw gains cross-session memory — retrieving relevant memories before each conversation and extracting key facts afterward. No more loading the entire MEMORY.md into every system prompt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rxqT0d5DncipWc9E" /></figure><p><strong>One-click install</strong> via <a href="https://clawhub.ai/"><strong>ClawHub</strong></a> Skill — OpenClaw handles plugin download, config, and slot switching automatically:</p><blockquote><a href="https://clawhub.ai/Teingi/install-powermem-memory"><em>https://clawhub.ai/Teingi/install-powermem-memory</em></a></blockquote><p><strong>Manual install</strong> in 3 steps:</p><p>1. Install and start PowerMem:</p><pre>pip install powermem<br><br># Start server after configuring .env<br>powermem-server --host 0.0.0.0 --port 8000</pre><p>2. Install the plugin:</p><pre>openclaw plugins install memory-powermem</pre><p>3. Update OpenClaw config (~/.openclaw/openclaw.json) to switch the memory slot:</p><pre>{<br>  &quot;plugins&quot;: {<br>    &quot;slots&quot;: { &quot;memory&quot;: &quot;memory-powermem&quot; },<br>    &quot;entries&quot;: {<br>      &quot;memory-powermem&quot;: {<br>        &quot;enabled&quot;: true,<br>        &quot;config&quot;: {<br>          &quot;baseUrl&quot;: &quot;http://localhost:8000&quot;,<br>          &quot;autoCapture&quot;: true,<br>          &quot;autoRecall&quot;: true,<br>          &quot;inferOnAdd&quot;: true<br>        }<br>      }<br>    }<br>  }<br>}</pre><p>Restart the OpenClaw gateway and run openclaw ltm health to verify.</p><p>A detailed write-up on plugin internals and full configuration is coming next week.</p><h3>What’s in 1.0.0</h3><h4>CLI (pmem)</h4><p>The CLI shares the same configuration (.env) and storage backend as the SDK and HTTP API. It&#39;s the orchestration entry point for agents and scripts.</p><pre>pip install powermem  # or: uv add powermem<br><br># Memory operations<br>pmem memory add &quot;User prefers dark mode&quot; --user-id user123<br>pmem memory search &quot;user preferences&quot; --user-id user123<br>pmem memory list --user-id user123 -l 20<br><br># Interactive config wizard<br>pmem config init<br><br># Operations<br>pmem stats --json<br>pmem manage backup -o backup.json<br>pmem manage cleanup --dry-run<br><br># Interactive shell<br>pmem shell</pre><p>Full command coverage: memory (CRUD), config (view/validate/test/init), stats, manage (backup/restore/cleanup/migrate), and shell (interactive REPL). Supports bash/zsh/fish completions. See the <a href="https://github.com/oceanbase/powermem/blob/master/docs/guides/0012-cli_usage.md">CLI guide</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ii-ElTBC3ClORDJ1ZI99HQ.png" /><figcaption>PowerMem CLI commands</figcaption></figure><h4>Dashboard</h4><p>A web UI built on the same HTTP API. View memory counts, user/agent/type distributions, and system health. v1.0.0 includes multiple fixes and UX improvements.</p><pre>powermem-server --host 0.0.0.0 --port 8000<br># Visit http://localhost:8000/dashboard/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h_2T23iyWYjvsVtahpCoYQ.png" /><figcaption>PowerMem Dashboard — Memory Overview</figcaption></figure><h3>Five Integration Paths</h3><p>All five share the same configuration and storage:</p><p><a href="https://github.com/oceanbase/powermem/blob/master/docs/guides/0001-getting_started.md"><strong>Python SDK</strong></a> — three lines to start:</p><pre>from powermem import Memory, auto_config<br><br>config = auto_config()<br><br>memory = Memory(config=config)<br>memory.add(&quot;User likes coffee&quot;, user_id=&quot;user123&quot;)<br><br>results = memory.search(&quot;user preferences&quot;, user_id=&quot;user123&quot;)</pre><p><strong>CLI</strong> — terminal-native, first choice for scripting and agent orchestration</p><p><a href="https://github.com/oceanbase/powermem/blob/master/docs/api/0005-api_server.md"><strong>HTTP API</strong></a> — RESTful with Swagger docs and API key auth, language-agnostic</p><p><a href="https://github.com/oceanbase/powermem/blob/master/docs/api/0004-mcp.md"><strong>MCP Server</strong></a> — <a href="https://modelcontextprotocol.io/">Model Context Protocol</a> support for Claude Desktop and other MCP clients</p><p><strong>Dashboard</strong> — web visualization for memory analytics</p><h3>Get Started</h3><pre>pip install -U powermem<br># or<br>uv add powermem<br><br>pmem --version</pre><ul><li><strong>GitHub</strong>: <a href="https://github.com/oceanbase/powermem">github.com/oceanbase/powermem</a></li><li><strong>PyPI</strong>: <a href="https://pypi.org/project/powermem">pypi.org/project/powermem</a></li><li><strong>Discord</strong>: <a href="https://discord.com/invite/74cF8vbNEs">Join the community</a></li><li><strong>Issues / Discussions</strong>: <a href="https://github.com/oceanbase/powermem/discussions">Feedback welcome</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*31QOggjmRoYoOo-SmcB7PQ.png" /></figure><p>PowerMem is our second open-source project, built for AI developers tired of fighting memory bottlenecks. We want it to simplify memory management, and let you focus on what matters: innovating with AI.</p><p>After all, open source was never meant for one person to shine alone — it’s about moving forward together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=04c6debf69fc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/from-zero-to-seekdb/powermem-an-open-source-memory-system-built-for-the-agent-era-04c6debf69fc">PowerMem: An Open-Source Memory System Built for the Agent Era</a> was originally published in <a href="https://medium.com/from-zero-to-seekdb">From Zero To OceanBase</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>