The author argues that AI agents can be understood through the programming concept of monads, specifically the "do-notation" style of composition. They explore how monads provide a structured way to model agent behavior and state management, drawing parallels between functional programming patterns and agent architectures.
Background
- Xe Iaso is a well-known software engineer and blogger who writes about Rust, programming language theory, and systems design. This post appeared on their personal blog.
- A **monad** (in programming) is a design pattern that wraps a value in a context and provides two operations — one to put a value into that context, and one to chain operations while preserving the context. Monads are central to Haskell and functional programming, and have a reputation for being confusing to learn.
- There is an ongoing — often semi-joking — online tradition where programmers write "monad tutorials" that inevitably explain monads by referencing **endofunctors** (a category theory concept). The opening line of this post plays on that trope.
- The broader context: people have been debating whether LLM-based "agents" (autonomous AI systems that decide their own next steps) are a genuinely new paradigm or just a rebranding of old concepts. By comparing agents to monads, the post makes a technical argument about how agent systems compose and sequence operations.
Most AI agent instruction files (agents.md) contain inaccuracies or outdated information, and there is no automated system verifying their correctness. This leads to agents acting on flawed guidance, potentially causing errors or security risks. The article calls for better validation tools and processes to address this gap.
The article argues that the majority of an agentic AI codebase consists of infrastructure, tool definitions, and integration logic rather than the agent's core reasoning. It highlights how frameworks like Jaseci's Jac language aim to reduce this overhead by focusing on the agent's decision-making logic itself.
The author shares a shift in approach to managing AI agents: instead of visually monitoring their workflow step-by-step, they now rely on audio cues like beeps and spoken summaries to passively track progress. This allows them to multitask and reduces cognitive load while still staying informed of agent activity.
The author proposes "pneuma," a new kind of AI agent inspired by monads and philosophy, as a deterministic, formally verifiable system for long-running autonomous tasks, distinct from current "hyle" agents (LLMs as state machines).
A GitHub repository hosts a project called "Agent Listen Music Skill," designed to enable an AI agent to listen to and analyze music, likely for tasks like identification or recommendation.