# Agent Frameworks Considered Harmful — Rémi Louf, .txt
<!--
ref: @content/youtube/aie/2026-08-22-agent-frameworks-considered-harmful-r-mi-louf-txt
version: 3
updated_at: 2026-10-31T20:25:37.857Z
-->

Louf (AI Engineer, 2026-08-22): Louf argues that the hard part of running agents is not agent-shaped at all — it's ordinary distributed-systems engineering that frameworks obscure behind code-level abstractions.

*Synthesized from Rémi Louf on AI Engineer, 2026-08-22.*

Rémi Louf is CEO of .txt, a 15-person company specializing in structured outputs, who took two weeks away from running the business in January to build his own agent runtime from scratch.

## Core Thesis

Louf argues that the hard part of running agents is not agent-shaped at all — it's ordinary distributed-systems engineering that frameworks obscure behind code-level abstractions. Rather than writing graphs and edges in a framework's DSL, he built a kernel-like runtime where agents are declared in markdown, communicate exclusively through typed events on an append-only log, and are addressed as content hashes so any run can be diffed, replayed, or audited. His conclusion after deploying it internally: the difficulties are "good old engineering problems," the infrastructure category is unsettled, and you should build before you buy so you actually learn what you need.

## Key Insights

- The trigger was a capability step-change around December — Louf points to Opus 4.6 as the moment agents got good enough that he cleared two weeks, told his CTO he was going away, and dove in.
- His mower analogy tracks the maturity ladder: a TUI is a tractor mower you still have to ride; phone-based agent apps ("SSH with vibes") are a remote-control mower you keep steering; the goal is the robot mower that runs unattended all day. He caught himself dictating agent instructions from his phone during his morning walk and judged that clearly transitional.
- Frameworks pushed him to edit prompts inside code. Declaring agents in markdown + YAML instead means you can version, diff, and review them in a PR — and non-technical colleagues can contribute. Drop a file in a folder and the runtime picks it up.
- Cron covers *when* but not *because*. Schedules are one input among many; the real primitive is events. Dropping a voice note emits an event; a new email, CRM entry, opened PR, or merged PR does the same. Each agent declares `accepts` and `returns` event types.
- His actual working pipeline: a cron job pulls market news; a voice-note agent accepts a walk recording, transcribes it into durable notes, and emits `voice_note_processed`; a daily brief agent subscribes to both and emits a Slack post event that a process turns into a real message on his phone.
- Events replace graphs. There are no edges to maintain, fan-in and fan-out are free, and topology emerges from whatever the log says happened — contributors only need to know which events exist, not how to code.
- The first version took roughly a day to write (with Codex doing much of the typing) out of his two-week block, and it broke in textbook ways: the daily brief posted to Slack twice, a voice note vanished entirely, and after a week of unversioned prompt tweaking the market brief was garbage with no record of what changed.
- Each failure mode built one piece of the runtime. The lost note → an append-only events log where nothing is discarded and events are causally linked (which event triggered which). The duplicates → a real queue with attempt counting. The unversioned prompt → a content-addressed prompt store.
- What a live Codex session shows you is not what the model actually saw — compaction rewrites context, and providers like OpenAI and Anthropic don't hand back thinking traces. That gap is what forced a different approach.
- The content-addressed design borrows from git and Nix: system prompt, each skill description, tool descriptions, and the user message are each stored and hashed. A prompt is a list of hashes before it's ever rendered to text; model answers are stored the same way. That yields diffs between runs (which component changed — the message? a different skill? a different tool?), exact replay against a different model, easier compaction (you manipulate a graph, not strings), better KV cache management, and at scale, auditability.
- Replay earned its keep once observability revealed how fast cost ramped. Louf rebuilt old requests from the graph to evaluate open-source models against them.
- The kernel/process analogy: the runtime schedules, isolates, and journals agents; the markdown agent definitions are user land, swappable for any other front end.
- Typing is the safety boundary, and Louf frames the kernel's job as making bad actions impossible rather than merely unlikely. Two boundaries matter: typed tool calls (agent ↔ outside world) and typed events (agent ↔ agent). He calls typed events non-negotiable.
- The dogfooding was involuntary: Anthropic's structured outputs were poor enough that roughly 20% of his events came back malformed and were rejected, which is what pushed him onto his own company's software.
- After a month of internal deployment, .txt runs about 20 agents, and non-technical staff contribute them — which is the payoff of a markdown-defined agent format.
- He has dropped third-party APIs entirely for this workload, running open-source models including a local model on his laptop. He's explicit that he's not claiming this holds for coding — just for what he uses agents for.

## Actionable Takeaways

1. Define agents as markdown files with YAML frontmatter, not code, so they version, diff, and review in a PR — and drop into a folder for the runtime to discover.
2. Give every agent an explicit `accepts` / `returns` event contract and let it subscribe to events rather than sitting on a hand-maintained graph. Keep cron as one event source, not the coordination model.
3. Build the append-only events table first and causally link events (record which event triggered which). Louf found debugging headaches start at three or four agents.
4. Add a queue with attempt counting before you trust anything to post externally — the duplicate Slack brief was a missing-queue bug, not a model bug.
5. Content-address the prompt components — system prompt, each skill description, tool descriptions, user message — and represent the assembled prompt as a list of hashes before rendering. Store model responses the same way so any answer traces back to its exact inputs.
6. Use that graph for run diffs (isolate which component changed) and for replay against a different model or a modified request when you're evaluating cost or swapping in open-source models.
7. Enforce types at both boundaries: typed tool calls outward, typed events between agents. Don't rely on a provider's structured-output support without measuring the rejection rate first.
8. If you're a small company or technical CEO, build before you buy in this category — the goal is learning your actual requirements and the limits of what exists, not shipping infrastructure.
9. If you build agent orchestration tooling, run your own product for real work. Louf says it's often visibly obvious when framework authors don't.
10. Block out real time — he took two weeks — to immerse in the field rather than fitting it around the next thing. He credits it with changing the company's trajectory.

## Notable Quotes

> "The job of the kernel is actually to make bad actions impossible, not just unlikely." — Rémi Louf

> "You do not need graphs in this case. All you need is events. You have no edges to maintain." — Rémi Louf

> "Drop a file and the topology emerges — whatever the log says happened." — Rémi Louf

> "What you see when you're using Codex is kind of a lie." — Rémi Louf

> "The difficulties you meet doing this kind of thing are just good old engineering problems." — Rémi Louf

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*