AI Engineer · Published 2026-08-22

Agent Frameworks Considered Harmful — Rémi Louf, .txt

Open on YouTube ↗

Summary

Overview

  • Speaker: Rémi Louf
  • Channel: AI Engineer
  • Main topic: The architectural limitations of agent frameworks and why event-driven, kernel-like primitives without graph abstractions are superior for reliable agent engineering.
  • Purpose: To critique existing agent frameworks and propose an event-driven, OS-inspired runtime architecture for building reliable, auditable AI agents. Rémi Louf, CEO of .txt, shares insights from building infrastructure for reliable AI agents. He argues that traditional agent frameworks and graph-based abstractions are cumbersome, forcing developers to fiddle with YAML inside code and trapping them in chat-box paradigms. Instead, he advocates for an operating system mindset: treating agents as independent processes, using immutable event logs as system memory, and relying on content-addressed artifacts and typed tool calls to make bad actions impossible.

Topic Map

The Problem with Traditional Agent Frameworks

  • Explanation: Agent frameworks often force developers to write YAML frontmatter inside code files and manage complex execution graphs, which leads to maintenance overhead and brittle prompts.
  • Key claims:
    • Frameworks spend too much time editing prompts within code.
    • YAML frontmatter inside code is cumbersome and hard to version.
    • Graph-based abstractions add unnecessary complexity.
  • Examples:
    • Editing system prompts embedded directly in Python or TypeScript files.
  • Terminology:
    • agent frameworks
    • YAML frontmatter
    • execution graphs
  • Why it matters: Understanding why code-centric agent orchestration fails helps developers adopt cleaner architectures.

Event-Driven Agent Architecture

  • Explanation: Moving away from cron jobs and graphs toward an event log where agents subscribe to specific events, enabling fan-in and fan-out without managing edges.
  • Key claims:
    • Cron jobs are too rigid because they only cover fixed points in time.
    • Agents should subscribe to typed events emitted by the system.
    • No explicit graph topology is needed; just drop a file or emit an event and the topology emerges.
  • Examples:
    • A voice note recorded while walking emits a voice-note.ready event, triggering a voice note processor agent.
  • Terminology:
    • event log
    • cron jobs
    • fan-in
    • fan-out
    • typed events
  • Why it matters: Event-driven systems provide clean decoupling, easy debugging, and natural asynchronous processing for AI workflows.

The Runtime and Content-Addressed Memory

  • Explanation: Treating the immutable log as the system memory, using content-addressing (like git or nix) for prompts, system prompts, skills, and model answers.
  • Key claims:
    • The log is the system's memory, ensuring nothing is lost and everything is queryable.
    • Content-addressing makes caching, diffing, and replays trivial.
    • The chat box is a lie because what you see in UI chats does not match the actual hidden prompt state sent to models.
  • Examples:
    • Using sha256 hashes to uniquely identify system prompts, tool descriptors, user messages, and model responses.
  • Terminology:
    • content-addressed artifacts
    • immutable log
    • replays
    • diffs
  • Why it matters: Content-addressing and immutable logs enable complete auditability and deterministic debugging of agent failures.

Kernel-Like Agent Systems and Safety

  • Explanation: Thinking of agent runtimes like operating system kernels: their job is to make bad actions impossible, not just unlikely.
  • Key claims:
    • A kernel's job is to make bad actions impossible.
    • Typed tool calls and typed events are non-negotiable for robust agents.
    • Open-source models are mature enough to replace proprietary APIs for local development and production.
  • Examples:
    • Using strict structured outputs to eliminate 20% failure rates from malformed LLM responses.
  • Terminology:
    • kernel
    • typed tool calls
    • structured outputs
    • isolation
  • Why it matters: Enforcing strict type boundaries at the kernel level prevents cascading failures in multi-agent systems.

Key Points

Agent frameworks vs. operating systems

  • Explanation: Instead of using heavy libraries with graph abstractions, treat agents as independent processes run by a kernel that isolates them and journals their actions.
  • Evidence: Deploying ~20 agents successfully within a company using a simple file-drop and event-log architecture.
  • Practical implication: Developers should build lightweight event runtimes instead of adopting complex orchestration frameworks.

The chat box is a lie

  • Explanation: UI chat interfaces hide the true prompt state, compaction steps, and model internals, making debugging difficult.
  • Evidence: Model providers do not share thinking traces or exact prompt assembly history.
  • Practical implication: Systems must log exact content-addressed prompts and responses to ensure full auditability.

Structured outputs are non-negotiable

  • Explanation: Without strict type enforcement on tool calls and events, LLM outputs fail frequently and break agent pipelines.
  • Evidence: Using .txt's internal tooling where untyped outputs caused high failure rates.
  • Practical implication: Always enforce typed tool calls and typed events between agents.

Frameworks, Models & Processes

Zeta Event-Driven Agent Runtime

  • How it works: Agents are defined as markdown files with YAML frontmatter and a prompt body. They register interest in specific event types, read from an immutable event log, and emit new events upon completion.
  • Components:
    • agent markdown definition
    • immutable event log
    • typed event queue
    • content-addressed storage
    • replay engine
  • When to use: When building multi-agent background automation pipelines that require high reliability and auditability.

Examples & Case Studies

Rémi built a morning briefing workflow where a voice note recorded on a walk is transcribed and summarized into a Slack message via background agents.

  • Illustrates: How event-driven agent pipelines replace manual tool triggering and cron jobs.
  • Lesson: Background agents working asynchronously via events feel magical and require zero manual intervention.

Initial cron-based implementations resulted in posted duplicates, vanished voice notes, and corrupted market briefs due to untracked prompt changes.

  • Illustrates: The brittleness of naive agent scripting without proper runtime guarantees.
  • Lesson: Failures in agent systems force the creation of robust runtimes, immutable logs, and content-addressed diffs.

Actionable Takeaways

  • Immediate:
    • Stop relying solely on heavy third-party agent frameworks.
    • Implement typed tool calls and structured outputs for all LLM interactions.
    • Use content-addressing for prompts and agent configurations to enable easy diffing and replays.
  • Strategic:
    • Think kernel, not libraries: design agent systems around process isolation and event logging.
    • Build before you buy while the infrastructure category remains unsettled.
    • Eat your own dog food by deploying agents internally for real workflows.
  • Questions to investigate:
    • How do content-addressed prompt systems scale with very large context windows?
    • What are the latency overheads of immutable event logging in high-frequency agent systems?

Claims Worth Verifying

  • Structured outputs reduce agent event failure rates from 20% down to near zero. (empirical)
  • Content-addressed prompt logging makes Kv cache management significantly easier. (architectural)

Notable Quotes

"Agents frameworks considered harmful." (at 0:25) "The chat box is a lie. What you see is not what the model sees." (at 18:36) "A kernel's job is to make bad actions impossible, not unlikely." (at 27:28)

Compressed Summary

  • traditional agent frameworks and yaml-in-code are cumbersome and hard to maintain
  • event-driven architectures with immutable logs eliminate the need for complex graph abstractions
  • content-addressing prompts and agent states enables trivial diffing, caching, and replays
  • kernel-like runtimes must enforce typed tool calls and structured outputs to prevent bad agent actions
  • Keywords: agents, runtime, events, kernel, auditability
  • Core insight: Reliable AI agents require operating system principles—immutable event logs, content-addressing, and typed boundaries—rather than complex graph frameworks.

Core insights

7
Architecturehigh noveltymoderate evidence

Agent orchestration topology can be emergent rather than explicitly declared: agents subscribe to typed events on an immutable log, and the system graph forms from data flow instead of developer-managed edges.

Why it matters

Eliminates a whole class of graph-edge maintenance and makes adding or removing agents as simple as dropping a file or emitting an event, enabling lightweight multi-agent systems without heavy frameworks.

Generalization

Applies to any agentic background-automation system; can be implemented on Kafka, Postgres, or other event log substrates.

No explicit graph topology is needed; just drop a file or emit an event and the topology emerges.
Open source video
Agents should subscribe to typed events emitted by the system.
Open source video
Mechanismmedium noveltystrong evidence

The immutable event log should serve as the agent system's system memory; content-addressing prompts, skills, and model answers makes every state change replayable and diffable.

Why it matters

Content-addressing turns prompt/response state into versioned artifacts, enabling deterministic debugging, audit trails, and cheap replay—properties not available in chat-UIs or mutable memory.

Generalization

Applicable to any LLM application requiring reproducibility, from compliance-heavy workflows to complex multi-agent pipelines.

The log is the system's memory, ensuring nothing is lost and everything is queryable.
Open source video
Content-addressing makes caching, diffing, and replays trivial.
Open source video
Mental Modelhigh noveltystrong evidence

The chat box is a misleading mental model for agent observability: UI chats hide the true assembled prompt state, so systems must expose exact content-addressed logs and traces.

Why it matters

Debugging from a chat transcript can send engineers down the wrong path; the authoritative view of an agent's behavior is the content-addressed log of what was actually sent to the model.

Generalization

Any product with a chat interface or LLM backend should treat UI transcripts as approximate and logs as ground truth.

The chat box is a lie because what you see in UI chats does not match the actual hidden prompt state sent to models.
Open source video
Systems must log exact content-addressed prompts and responses to ensure full auditability.
Open source video
Architecturemedium noveltystrong evidence

Safety and robustness belong in the runtime 'kernel', which enforces typed tool calls and typed events so that malformed actions are impossible rather than merely unlikely.

Why it matters

Moves reliability out of prompt discipline and into enforceable contracts, preventing cascading failures in multi-agent systems.

Generalization

Mirrors OS kernel/user-space separation: agent processes should be isolated and their interactions type-checked.

A kernel's job is to make bad actions impossible.
Open source video
Typed tool calls and typed events are non-negotiable for robust agents.
Open source video
Empirical Resulthigh noveltymoderate evidence

Enforcing structured outputs has a concrete, measurable reliability payoff: strict type enforcement eliminated a 20% failure rate from malformed LLM responses.

Why it matters

Gives engineers a concrete target for validation investment and a baseline expectation for untyped LLM output reliability.

Generalization

Any pipeline parsing LLM output should assume a meaningful malformed-output failure rate and enforce schema constraints at the boundary.

Using strict structured outputs to eliminate 20% failure rates from malformed LLM responses.
Open source video
Failure Modemedium noveltystrong evidence

Cron-style scheduling is a failure mode for agent workflows because it anchors to fixed points in time instead of events, producing duplicates and lost work.

Why it matters

Reveals that scheduling should be event-triggered in agent runtimes; time-based triggers miss the event causality and produce brittle pipelines.

Generalization

Background AI workflows should be driven by typed events rather than time schedules whenever work depends on some prior condition.

Cron jobs are too rigid because they only cover fixed points in time.
Open source video
Initial cron-based implementations resulted in posted duplicates, vanished voice notes, and corrupted market briefs due to untracked prompt changes.
Open source video
Mechanismmedium noveltymoderate evidence

Agent definitions are better as standalone artifacts (markdown files with YAML frontmatter) than as prompts embedded in code, making prompt/agent config versionable and deployable.

Why it matters

Separating agent definitions from code avoids the maintenance trap of YAML-in-code and supports content-addressing of agent specs.

Generalization

Treat agent definitions like Kubernetes manifests or versioned config-as-code rather than inline strings.

Agents are defined as markdown files with YAML frontmatter and a prompt body.
Open source video
YAML frontmatter inside code is cumbersome and hard to version.
Open source video

Deep dives

4

Scaling emergent event-driven agent topologies

Research question

As agent count grows past 20, when does an emergent event subscription topology become harder to reason about than an explicit graph?

Why

The core architectural bet is that dropping graph edges and letting topology emerge removes maintenance; but it may replace explicit edges with implicit ones, so we need boundary conditions.

No explicit graph topology is needed; just drop a file or emit an event and the topology emerges.
Open source video
Agents should subscribe to typed events emitted by the system.
Open source video
Source video

Reproducing and quantifying the structured-output reliability payoff

Research question

Across diverse tool-use tasks and models, how much does strict typed structured output reduce malformed LLM response failures versus prompt-only instructions?

Why

The 20% failure elimination is a concrete, high-impact number; if it generalizes, it justifies schema enforcement as a default in agent runtimes.

Using strict structured outputs to eliminate 20% failure rates from malformed LLM responses.
Open source video
Source video

Immutable content-addressed logs as agent memory: storage, retention, and replay at scale

Research question

What compaction and retention policies keep an append-only content-addressed event log queryable and replayable as context grows?

Why

Full auditability depends on the immutable log becoming system memory, but unbounded growth can make replay and lookup prohibitively expensive.

The log is the system's memory, ensuring nothing is lost and everything is queryable.
Open source video
Content-addressing makes caching, diffing, and replays trivial.
Open source video
Source video

Chat-box blindness: why UI transcripts under-report agent state

Research question

Can we reproduce cases where chat UI transcripts omit system prompts, compaction, or tool results, and what tooling makes the content-addressed log the authoritative trace?

Why

Debugging from UI transcripts is a known trap; proving it and designing log-first observability fixes a root cause of agent debugging failures.

The chat box is a lie because what you see in UI chats does not match the actual hidden prompt state sent to models.
Open source video
Source video

Article ideas

4

The Chat Box Is a Lie: Debug Agents from the Log, Not the UI

UI chat transcripts are an approximate rendering of agent state; any serious LLM debugging must treat content-addressed logs as the single source of truth.

Angle

Observability and debugging practice

Source video

The 20% Failure Rate Hiding in Your LLM Output

Untyped LLM responses carry a measurable malformed-output failure rate that structured output enforcement eliminates; enforcing typed contracts at the runtime boundary is non-negotiable.

Angle

Reliability engineering for LLM workflows

Source video

Stop Wiring Agent Graphs; Let Events Draw the Topology

Explicit graph frameworks impose edge maintenance that event subscription on an immutable log eliminates, and the resulting emergent topology is simpler to operate.

Angle

Architecture critique of agent frameworks

Source video

Agent Runtimes Are the New Kernel: Typed Events Make Bad Actions Impossible

Agent reliability should live in runtime-enforced typed contracts, not prompt discipline; a kernel-like runtime that rejects malformed tool calls and events is the foundation for trustworthy agents.

Angle

Infrastructure design for agent systems

Source video

Project ideas

4

EventLog Agent Runtime

movement-lab

A minimal runtime with typed events on an immutable log lets a developer add a new agent by dropping one manifest file and without editing any existing agent, event, or graph definition.

Proof of concept

Implement a Postgres-backed event log with typed event subscription; define 3 agents as markdown+YAML files; add a 4th agent that subscribes to an existing event and verify no existing files change.

Measurement

Number of files changed to introduce a new agent; success of fan-out to new subscriber; absence of explicit edge declarations.

Source video

Structured-Output Failure Benchmark

beyond-evals

On a set of tool-calling and data-extraction tasks, enforcing typed structured outputs at runtime reduces malformed LLM response rate by a statistically significant margin compared to prompt-only instructions, across multiple models.

Proof of concept

Create a benchmark harness that runs identical tasks with and without schema-enforced structured outputs; record parse/validation failures from model responses.

Measurement

Malformed response rate (parse/validation failures) per condition; effect size across models; confidence interval.

Source video

Chat-Transcript vs Log Diff

gatehouse

In agent sessions with context compaction or tool use, the visible chat transcript omits or distorts at least one prompt-state component compared to the content-addressed event log, for the majority of sessions.

Proof of concept

Run representative agent workflows (multi-turn, tool calls, compaction) capturing both UI transcript and content-addressed log; build a diff tool that flags missing or rewritten prompt components.

Measurement

Percentage of sessions with transcript-log mismatch; type and count of missing components (system prompts, tool results, compaction notices).

Source video

Content-Addressed Log Retention and Compaction

new

For long-running agent workloads, a compaction strategy that stores content-addressed deltas and retains event metadata can bound storage growth while preserving replay and diff correctness.

Proof of concept

Implement a compaction layer over an append-only content-addressed log and run a simulated agent workload; measure storage before/after and verify replay produces identical artifacts.

Measurement

Storage reduction percentage; replay equivalence (hash match); query latency for historical events.

Source video

Architectural implications

5

Graph topology is replaced by an event subscription layer.

Before

Developers manually define execution graphs and edges between agents.

After

Agents declare interest in typed events and the runtime wires event flow; topology emerges from the event log.

Consequence

Adding/removing agents becomes cheap, but global control flow is implicit and requires tooling to visualize the emergent graph.

Source video

System memory becomes an immutable event log with content-addressed artifacts.

Before

Memory and context are implicit in chat history or unbounded prompt assembly, unversioned.

After

Prompts, skills, and model answers are content-addressed and written to an immutable log; replay and diff become trivial.

Consequence

Full auditability and deterministic debugging, but storage grows unboundedly and needs retention/compaction policy.

Source video

Safety is pushed to the kernel/type system rather than prompt discipline.

Before

Correctness relies on prompt instructions and best-effort behavior.

After

Typed tool calls and typed events are enforced at runtime; malformed actions are impossible.

Consequence

A 20% malformed-output failure class is eliminated, but typed contract definitions become a required design artifact.

Source video

The chat interface is no longer the source of truth for debugging.

Before

Engineers debug agents by reading the UI chat transcript.

After

Engineers debug by inspecting exact content-addressed prompt/response logs.

Consequence

Observability tooling must expose hidden prompt state, and users must learn that UI transcripts under-report reality.

Source video

Agent runtimes are becoming a new infrastructure category, so building lightweight in-house runtimes can outperform adopting heavy frameworks.

Before

Teams adopt third-party graph frameworks as the default.

After

Teams build event-log runtimes with kernel-style isolation and content-addressed storage.

Consequence

More maintenance responsibility, but better fit while the infrastructure category remains unsettled.

Source video

Tradeoffs and failure modes

5

Emergent event-driven topology vs explicit graphs

Benefit

No need to manage edges; fan-in/fan-out scales naturally.

Cost or risk

Global execution flow is implicit, making orchestration failures harder to reason about without event tracing.

No explicit graph topology is needed; just drop a file or emit an event and the topology emerges.
Open source video
Source video

Immutable logs and content-addressing for system memory

Benefit

Nothing is lost; everything is queryable; replay/diff is trivial.

Cost or risk

Storage grows unboundedly; logging all interactions can be expensive; scaling to large context windows is unproven.

The log is the system's memory, ensuring nothing is lost and everything is queryable.
Open source video
Source video

Structured outputs and strict type enforcement

Benefit

Eliminates malformed-output failures (quantified at 20% in one case).

Cost or risk

May constrain model flexibility and requires schema engineering for open-ended tasks.

Using strict structured outputs to eliminate 20% failure rates from malformed LLM responses.
Open source video
Source video

Building in-house runtime vs adopting framework

Benefit

Better fit for specific workflows; avoids framework lock-in; enables dogfooding.

Cost or risk

Requires building and maintaining event log, typed queue, content-addressed storage, and replay engine.

Build before you buy while the infrastructure category remains unsettled.
Open source video
Source video

Chat UI as a debugging surface

Benefit

Human-friendly and familiar.

Cost or risk

Misleading; hides compaction and exact prompt assembly; can cause engineers to debug the wrong thing.

The chat box is a lie because what you see in UI chats does not match the actual hidden prompt state sent to models.
Open source video
Source video

Open questions

4

How do content-addressed prompt systems scale with very large context windows?

Why unresolved

The summary raises this question but provides no data; content-addressing and replay become more expensive as context grows.

Research direction

Benchmark storage, retrieval, and replay cost for content-addressed prompts under increasing context sizes; explore compaction and retention strategies.

Source video

Does the 20-agent deployment evidence generalize to much larger multi-agent systems?

Why unresolved

Only one internal deployment of ~20 agents is cited; no evidence about failure modes at scale.

Research direction

Run controlled experiments with hundreds of agents on an event-log runtime, measuring event racing, duplicate handling, and emergent topology complexity.

Source video

How should agents handle event schema versioning and migration in an append-only log?

Why unresolved

Typed events are described as non-negotiable, but the summary does not discuss evolving event schemas over time in an immutable log.

Research direction

Design versioned event schemas and replay/migration strategies compatible with content-addressed artifacts.

Source video

What is the effective reliability gain of typed tool calls versus prompt-only instructions on harder tasks?

Why unresolved

Anecdotal 20% improvement is cited, but only for one internal tooling case without task diversity.

Research direction

Run a benchmark comparing structured-output-enabled agents to plain prompting across diverse tool-use tasks and models.

Source video

Key claims

8
factualVerification needed

The chat box is a lie because what you see in UI chats does not match the actual hidden prompt state sent to models.

Evidence

The chat box is a lie because what you see in UI chats does not match the actual hidden prompt state sent to models.

Question

Can we reproduce a case where a chat UI omits system prompts, compaction, or tool results from the visible transcript?

Source video
causalVerification needed

Using strict structured outputs eliminated a 20% failure rate from malformed LLM responses.

Evidence

Using strict structured outputs to eliminate 20% failure rates from malformed LLM responses.

Question

What was the task, model, and malformed-output definition behind the 20% baseline?

Source video
causalVerification needed

Initial cron-based implementations resulted in posted duplicates, vanished voice notes, and corrupted market briefs due to untracked prompt changes.

Evidence

Initial cron-based implementations resulted in posted duplicates, vanished voice notes, and corrupted market briefs due to untracked prompt changes.

Question

Can the failures be traced to unpinned prompt versions in audit logs?

Source video
predictionVerification needed

No explicit graph topology is needed; just drop a file or emit an event and the topology emerges.

Evidence

No explicit graph topology is needed; just drop a file or emit an event and the topology emerges.

Question

Does the emergent event graph remain comprehensible and controllable in large multi-agent deployments?

Source video
comparativeVerification needed

Cron jobs are too rigid because they only cover fixed points in time.

Evidence

Cron jobs are too rigid because they only cover fixed points in time.

Question

Are there agent workflows that are naturally periodic where cron remains sufficient?

Source video
predictionVerification needed

Open-source models are mature enough to replace proprietary APIs for local development and production.

Evidence

Open-source models are mature enough to replace proprietary APIs for local development and production.

Question

What benchmarks or criteria define 'mature enough' for production agent workflows?

Source video
opinionVerification not requested

A kernel's job is to make bad actions impossible.

Evidence

A kernel's job is to make bad actions impossible.

Source video
opinionVerification not requested

YAML frontmatter inside code is cumbersome and hard to version.

Evidence

YAML frontmatter inside code is cumbersome and hard to version.

Source video

Connections

5