World's Fair 2025
12-Factor Agents: Patterns of reliable LLM applications — Dex Horthy, HumanLayer
Overview
This talk proposes the "12-Factor Agents" pattern, drawing parallels to the 12-Factor App methodology for building reliable software. The core thesis is that building robust LLM applications requires applying established software engineering principles, focusing on modularity, control flow, and state management rather than solely relying on agentic capabilities. The approach emphasizes treating agents as software components that can be engineered for reliability and maintainability.
Who should watch
- AI Engineers building LLM-powered applications
- Product Managers seeking to understand reliable agent development
- Developers looking to improve the quality and stability of their AI agents
- Builders experimenting with agentic workflows and tool use
Key takeaways
- Agents are fundamentally software; applying software engineering best practices is crucial for reliability.
- LLMs excel at transforming natural language into structured data (like JSON), which is a foundational capability for agents.
- Tool use should be viewed as deterministic code execution based on LLM output, not a magical interaction with the environment.
- Owning control flow, similar to Directed Acyclic Graphs (DAGs) in traditional software, provides reliability guarantees for agent execution.
- Agents should be stateless, with external systems managing execution state, allowing for pausing, resuming, and serialization.
- Owning prompts and carefully engineering context is paramount for maximizing LLM output quality and agent reliability.
- Integrating human interaction points and allowing agents to communicate with humans via natural language tokens is a key pattern.
- Employing small, focused micro-agents within a larger deterministic workflow can lead to more manageable and reliable systems.
Notable quotes
*Tool use is harmful.* (This is not about giving an agent access to the world, but rather the idea that tool use is a magical thing where an ethereal alien entity is interacting with its environment.)
*Agents are just software, so let's build software.*
*Everything in making agents good is context engineering.*
Unofficial community note. Prefer the recording for nuance.