Building an Agent Runtime via Content-Addressed Prompts

AI Engineergo watch the original →

Instead of using opaque agent frameworks, build a deterministic runtime that treats prompts as content-addressed graphs of hashes to enable perfect auditability, diffing, and replayability.

The Breakthrough

Rémi Louf moved away from traditional agent frameworks to a content-addressed system where prompts are stored as a list of hashes rather than rendered strings, allowing for exact diffing, replayability, and auditability of agent behavior.

What Actually Worked

  • Content-Addressed Storage: Each component of a prompt—system message, tool definitions, and user input—is hashed and stored separately. This allows the system to reconstruct the exact state of a model's context for any historical run.
  • Event-Driven Architecture: Agents subscribe to events rather than living in a rigid graph. This allows for easy fan-out and decoupling, where agents trigger based on state changes (e.g., a voice note being transcribed) rather than cron-based scheduling.
  • Typed Boundaries: To eliminate malformed outputs, the system enforces strict typing on both tool calls and inter-agent events, making invalid actions impossible at the runtime level.
  • Markdown-Based Definitions: Agents are defined as markdown files in a folder, enabling non-engineers to contribute and version-control agent logic without writing code.

Context

After experiencing failures in early agent implementations—such as duplicate Slack messages, lost voice notes, and untraceable prompt changes—the author realized that existing frameworks obscured what the model actually saw. By treating the agent runtime like a build system (similar to Git or Nix), the author created a deterministic environment where every event is causally linked and every prompt component is versioned. This approach allowed the company to scale to 20 active agents while maintaining full visibility into why specific outputs were generated.

Notable Quotes

  • "The job of the kernel is actually to make bad actions impossible not just unlikely."
  • "A prompt is a list of hashes rather than a rendered string."
  • "I spent all my time actually editing the prompt within the code and I was like this is actually not very useful."
  • #ai
  • #dev-tooling
  • #architecture

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.