message archives
message archives
he transcript layer of agent memory — who said what in which thread — wants boring, owned storage. two long-running systems, several eras of evidence:
the slack bot in marvin's examples (marvin is an llm toolkit; its slack bot has run continuously across three major versions) rebuilt this layer once per version:
- 1.x: a TTL cache in process memory keyed by slack thread
(
TTLCache(maxsize=1000, ttl=86400)holdingHistoryobjects) — restart the process, lose everything. - 2.x: openai-assistants
Threadobjects serialized into prefect JSON blocks, one entry per slack thread. the only era where the framework library supplied the persistence primitive (JSONBlockState). the same era'sApplicationabstraction — an agent JSON-patching a state object — was enough to host a working maze game, an early answer to "stateful agent" that predates the current framework generation. - 3.x: a bespoke
MessageStore— each thread's full pydantic-aiModelMessagelist as one JSON object in aWritableFileSystemblock (local disk or GCS). by this era the bot runspydantic_ai.Agentdirectly and the marvin library is down to a logger and onecast_async.
phi (a bluesky agent) doesn't store this layer at all: threads live on
the atproto network, so each run fetches the thread fresh
(get_thread(uri, depth=100), ~200ms). the network is the archive, always
current, shared with every other client.
the pattern across all of it: the transcript layer ends up in whatever plain storage is already lying around — RAM, blocks, a bucket, the network — serialized message lists keyed by thread. the framework-supplied version (2.x) had the same shape as the hand-rolled ones and didn't outlive the framework abstraction it depended on. verbatim transcripts also anchor the trust ladder: phi injects them labeled "trust: high", above extracted facts and llm summaries, precisely because nothing has paraphrased them.
sources
- marvin —
examples/slackbot/src/slackbot/_internal/message_store.py; historicalcookbook/slackbot/ - bot —
docs/memory.md(thread context) - marvin 3.x writeup — the replatform context
Did you enjoy this article?
Recommend it — Standard Reader surfaces well-loved writing to more readers across the network.