AIAny
AI Agent2025
Icon for item

12-Factor Agents — Principles for building reliable LLM applications

Twelve engineering principles for building production-grade LLM agents, modeled on the 12-Factor App. Argues the best agents are mostly deterministic software with a few well-placed LLM calls, not a prompt-and-tools loop.

Introduction

Most agent frameworks get you to an 80% demo fast, then strand you — and the last 20% of reliability is exactly where production customers live. The bet here is counterintuitive: the agents that actually ship aren't autonomous loops at all, but mostly ordinary software with a handful of LLM calls placed precisely where judgment is genuinely needed.

Core Argument
  • Treat the twelve factors as a menu, not a religion. Each one — own your prompts, small focused agents, agent as a stateless reducer, trigger from anywhere — is a standalone pattern you graft onto existing code, so you gain control without rewriting your product around a framework.
  • Make the model's boundaries explicit. "Own your context window" means you decide exactly which tokens the LLM sees instead of trusting a framework's hidden serialization, and "tools are just structured outputs" reframes tool use as the model emitting JSON your deterministic code acts on — so every handoff between LLM and system stays inspectable, testable, and versioned.
  • Humans are a tool call, not an afterthought. "Contact humans with tool calls" plus launch/pause/resume APIs turn agents into durable, resumable workflows instead of fragile chat sessions that die on the first ambiguous step.
Who It's For + Tradeoffs

Great fit if you're a builder dragging an LLM feature from impressive demo to dependable production, and you want vendor-neutral patterns you can adopt piecemeal. Look elsewhere if you want a turnkey framework or an installable library — this is a set of principles, diagrams, and TypeScript examples, not a package, and it assumes you're comfortable owning your own control flow.

Information

  • Websitegithub.com
  • OrganizationsHumanLayer
  • AuthorsHumanLayer (Dex Horthy)
  • Published date2025/03/30

More Items

GitHub
AI Agent2024

Generates Wikipedia-style articles from web search using LLMs: it researches topics, produces multi-perspective outlines via perspective-guided question asking and simulated conversations, then drafts full articles with citations. Supports human-AI collaboration (Co-STORM) and grounding with multiple retrievers.

GitHub
AI Agent2025

Open-source companion to a technical book that teaches how to design, evaluate and ship LLM-based AI agents — includes the full Chinese manuscript, community translations, chapter-aligned runnable example projects, and reproducible evaluation harnesses.

GitHub

Provides a local-first web-intelligence layer for AI agents: search, fetch, crawl, extract, cache, find-similar and agent-style research without API keys or per-query billing, running as an MCP server, REST daemon, or SDK.