12-Factor Agents: Patterns of reliable LLM applications โ€” Dex Horthy, HumanLayer

AI Engineer ยท video ยท 2026-10-08 Reader ๐Ÿ–ฅ๏ธ

Agent HarnessAgent Tool ManagementAgentic LoopAgentic vs. Deterministic System DesignContext EngineeringHuman-in-the-Loop
Reliable production LLM agents are built not by adopting an agentic framework that hides the hard parts, but by applying ordinary software-engineering discipline โ€” owning your prompts, your control flow (the loop/switch-statement/context-window triad), and your execution/business state โ€” to what is fundamentally a stateless-function (LLM) called inside a small, deterministic, developer-controlled loop.

practical ยท argumentative โ€” A conference talk distilling a published '12-factor agents' GitHub framework (borrowing the 12-Factor App naming convention) into a set of prescriptive engineering patterns for building production LLM agents, argued from the speaker's experience interviewing 100+ founders/builders.

Structure

PartRole
Opening anecdote: building a DevOps 'make-file' agent, hand-tuning the prompt for two hours, then concluding the approach itself was flawedcontext
Origin story: interviewing 100+ founders/builders, noticing that the most successful production agents 'weren't that agentic at all' โ€” mostly software with a few key LLM-call patterns applied to existing code rather than a greenfield agent rewriteevidence
Factor 1: natural-language-to-JSON as the one genuinely magical LLM capability; everything else is deterministic code built around thatevidence
Factor 4 ('tool use is harmful' as a provocation, modeled on 'Goto Considered Harmful'): tool calls are just JSON plus deterministic code, not an ethereal agent-environment interactionevidence
Factors 8/5/3 bundled: own your control flow (the LLM-loop/switch-statement/context-window model), own your execution and business state (pause/resume via a state ID, REST/MCP-fronted), own your prompts (hand-write past the quality bar a library gets you to), own your context-window construction (arbitrary stringification, not just the OpenAI message format)evidence
Contacting humans with tools / meet users where they are / small focused agents: push the tool-call-vs-message-to-human decision onto the model's first generated token; let agents be reached via email/Slack/Discord; keep agent loops to 3โ€“10 steps inside a mostly deterministic DAGevidence
HumanLayer deploy-bot case study: a mostly deterministic CI/CD pipeline hands off single bounded decisions (which service to deploy first) to a small agent loop, with a human able to override mid-loopevidence
Closing reframe: this is not an anti-framework talk but a 'wish list' for what frameworks should take off developers' hands (the non-AI-hard parts) so they can focus on the AI-hard parts (prompts, control flow, tokens)conclusion

Key terms

Propositions

Arguments

Reliable agent engineering is software engineering 101 applied to LLM calls, not a new discipline requiring an AI background. strength: medium
Explicit premises:
Implicit premises:
Inferences:
Agent reliability is bottlenecked almost entirely on context/token quality, not on model capability or framework sophistication. strength: medium
Explicit premises:
Implicit premises:
Inferences:

Narratives

Questions addressed

Gaps

Related documents