[KongchangAI]
· 2 min read· 1,078 words

MCP + Persistent Memory Layer: Making AI Agent Outputs Citable and Versionable

MCP + Persistent Memory Layer: Making AI Agent Outputs Citable and Versionable

A developer built Compoid, a persistent, versioned, citable memory layer for AI agents using MCP.

The article introduces Compoid, a project shared on Reddit that uses the MCP protocol to give AI agents a persistent, citable memory layer, solving the problem of agent output being trapped in conversation transcripts and lost after sessions end. Artifacts become versioned, searchable, citable records with provenance, shared by agents and humans alike. Open questions include retrieval quality, collaboration conflicts, and whether it reinvents existing solutions.

AI agents' "forgetfulness" is a headache for many developers: reports written, comparative analyses run, and paper summaries produced during a session all vanish the moment the session ends — and when the same task comes up again, the agent has to start from scratch. Recently, a developer on Reddit shared their practice of using the MCP protocol to build a persistent, citable memory layer for agents — Compoid — attempting to detach "memory" from conversation transcripts and make it a first-class citizen.

reddit source: Gave my AI agent a durable, citable memory layer via MCP (Compoid) — feedback welcome

The Problem: Agent Output Is Trapped in Conversation Transcripts

This developer's agent manages a research repository, indexing new papers, datasets, images, and analysis results daily, and publishing records. But he kept hitting the same bottleneck: anything the agent produced existed only in the conversation transcript. The reports it wrote, the comparisons it ran, the summaries it made of papers — all gone after the session. If it did the same work again, it would redo it from zero — no citations, no history, no record of what it had produced and when.

This "amnesia" isn't a model capability problem — it's an architecture problem. Conversation transcripts simply aren't designed for persistence, let alone to serve as a shared knowledge base between humans and agents.

The Solution: Using MCP to Turn "Remembering" into a Single Record Write

Compoid's idea is to build a repository of artifacts shared between agents and humans. Agents connect via MCP, and "remembering" is reduced to a single action: writing the artifact as a record. Records are persisted, versioned, kept searchable, and citable — and every record carries provenance information: who wrote it, when, and which model. Humans browse the same set of records and build on top of them, so agents and humans work on the same corpus instead of maintaining two separate memories. One thing the developer particularly likes: the agent that manages the repository is itself an agent that uses it — with its own account, its own homepage community, and its own token. The daily index is agent-driven, and the records it publishes are citable just like any other.

The project offers a browsable record site at compoid.com and an open-source MCP server at github.com/compoid/compoid-mcp.

MCP (Model Context Protocol) is a protocol proposed and open-sourced by Anthropic in late 2024 for establishing standardized connections between AI models and external tools and data sources. You can think of it as the "USB-C port for AI applications": in the past, every agent that needed to connect to a database, file system, or third-party API had to write its own custom glue code; MCP abstracts these capabilities into unified servers, so the model side only needs to implement a client once and can reuse it. The protocol is based on JSON-RPC and defines three types of primitives — resources, tools, and prompts — corresponding to read-only data, executable operations, and preset templates, respectively. For Compoid, the value of MCP lies in exposing "write a record" as a standard tool call, so any MCP-supporting agent (Claude Desktop, various IDE plugins, custom agent frameworks) can connect to the same memory layer with zero adaptation, without having to develop a separate SDK for each agent.

The Essential Difference from Conversational Memory

Conversational memory typically stuffs historical messages into the context window, or uses a vector store for fuzzy retrieval. Compoid takes a different path: it manages artifacts as versioned assets. Every output is a record with clear boundaries and traceability, not a chunk of text in a conversation stream. This makes citation possible — you can point to a specific record instead of saying "it seemed to mention that in a previous conversation."

Versioning also means agent outputs can be iterated on and corrected rather than overwritten or lost each time. And provenance answers "who reached this conclusion, when, and based on which model" — which is especially important for research work.

Versioned artifact borrows from the version-control concept in software engineering: each output doesn't overwrite the old content but generates a new version with an identifier, while old versions remain accessible, diffable, and rollback-able. Compared with vector-store retrieval, the difference lies in the "addressing method" — vector retrieval is similarity addressing, returning "the most similar fragment," with fuzzy boundaries that are hard to cite precisely; versioned artifacts are identifier addressing, where each record has a stable ID and clear content boundaries, and can be precisely pointed to, referenced by other records, and audited. This also explains why provenance only makes sense under the artifact model: only when an output is a document with an identity is "who wrote it, when, and with which model" an attachable, queryable attribute, rather than metadata scattered throughout a conversation stream.

Open Questions

Whether this approach can truly land depends on several real-world issues. As the number of persistent records grows, how can retrieval quality be maintained? Will versioning cause conflicts under multi-person, multi-agent collaboration? And most critically — is this just a problem already solved by other approaches (such as an external database plus custom tools)?

At the end of the post, the developer also threw the question to the community: for those running MCP agents, what is the most painful persistence gap right now, and does this "versioned artifacts rather than conversational memory" shape really solve it — or have people already worked around it in other ways?

For teams building agent workflows, this at least provides a design sample worth comparing against: decouple memory from conversation and make the output itself a manageable, citable first-class object.

One-line Summary

A developer built Compoid, a persistent, versioned, citable memory layer for AI agents using MCP.

Paragraph Summary

The article introduces Compoid, a project shared by a developer on Reddit: they used the MCP protocol to build a persistent, citable memory layer for AI agents, aiming to solve the problem of agent output being trapped in conversation transcripts and lost when sessions end. The core of the approach is reducing "remembering" to a single record-write action — artifacts are persisted, versioned, searchable, citable, and carry provenance such as who wrote them, when, and which model. Agents and humans share the same corpus, and the agent managing the repository is itself a user. The article contrasts it with conversational memory and notes that retrieval quality, collaboration conflicts, and whether it reinvents the wheel remain to be validated.

#MCP#AI agent memory#persistent memory layer#Compoid#versioned artifacts#Model Context Protocol
Share:

Related articles