Skip to content

message archives

nate
Jul 9, 2026 · 2 min read · 1 read

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) holding History objects) — restart the process, lose everything.
  • 2.x: openai-assistants Thread objects 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's Application abstraction — 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-ai ModelMessage list as one JSON object in a WritableFileSystem block (local disk or GCS). by this era the bot runs pydantic_ai.Agent directly and the marvin library is down to a logger and one cast_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

  • marvinexamples/slackbot/src/slackbot/_internal/message_store.py; historical cookbook/slackbot/
  • botdocs/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.

Across the AtmosphereDiscussions