12-Factor Agents
Also known as: 12FA, twelve-factor agent, 12-factor agent methodology
The 12-Factor Agents framework was published by Dex Horthy of HumanLayer after interviewing over 100 builders who had shipped customer-facing LLM applications. The recurring pattern: most teams got to 70-80% functionality quickly using popular agent frameworks, then hit a wall trying to push to production. The framework diagnoses why and names the patterns that production teams converged on independently.
The central idea is that successful production agents are not fully autonomous loops where the model decides everything. They are mostly regular software with LLM steps inserted at specific decision points where language understanding is needed. The LLM acts as a structured transformation function: natural language in, typed data structure out. Everything else, like routing, retries, state management, and human handoffs, is deterministic code.
Key factors include: owning your own prompts rather than delegating to framework abstractions; treating context windows as attention budgets you actively manage; designing for pause and resume so agents can surface to humans mid-task; treating human approval requests as just another tool call; and building small focused agents rather than one monolithic system. The GitHub repository had around 19,000 stars by early 2026, and the pattern spread quickly through builder communities as a counter-narrative to more maximally-agentic approaches.