Horthy describes getting an agent to 70 or 80 percent, then struggling to understand how a framework builds prompts and passes tools. His DevOps agent example showed that some tasks are better handled by a simple Bash script than an agent.
12-Factor Agents: Patterns of reliable LLM applications
Speaker
Dex Horthy of HumanLayer presents “12-Factor Agents” at AI Engineer, explaining software engineering patterns for building more reliable LLM applications.
Horthy says a core strength of LLMs is turning natural language into structured JSON. Deterministic code can act on that output, so tool use does not need to be treated as a special kind of magic.
A basic agent loop can let a model choose steps, but long workflows accumulate context and become less reliable. Horthy recommends owning the loop and state so applications can pause, resume, summarize, retry, and manage approvals.
Horthy argues that better outputs depend on the tokens supplied to the model, so teams should own their prompts and context construction. For example, after an API error, they can clear resolved errors and summarize useful information instead of repeatedly adding full stack traces.
Horthy recommends small agent loops of roughly three to ten steps within mostly deterministic workflows. At HumanLayer, a deployment bot proposes backend and frontend deployments for human approval, then deterministic code runs production tests.
Takeaways
- Use a script when a task has a clear, fixed sequence of steps.
- Treat model responses as structured data and let ordinary code handle actions.
- Keep control of the agent loop and application state to support pause, resume, and recovery.
- Review prompts and context carefully, including how errors are summarized or removed.
- Place short, focused agent loops inside deterministic workflows, with human approval where useful.
Mentioned in this talk
Search inside this talk
What was claimed 7
- metric
HumanLayer: 12-Factor Agents repository had 14 active contributors“there are 14 active contributors”
YouTube Unverified1 source· Talk
- metric
HumanLayer: 12-Factor Agents repository had about 4,000 stars in a month or two“we got about 4,000 stars in a month or two”
YouTube Unverified1 source· Talk
- feature12-Factor Agent: Recommends that developers own prompts, context construction, state, and control flow
“If you own your control flow”
YouTube Unverified1 source· Talk
- feature12-Factor Agent: Advocates small, focused agents in mostly deterministic workflows
“You should have small, focused agents.”
YouTube Unverified1 source· Talk
- feature12-Factor Agent: Agents should be stateless, with state owned and managed by the application
“agents should be stateless. You should own the state”
YouTube Unverified1 source· Talk
- built
“we're working on something called Create 12-Factor Agent”
YouTube Unverified1 source· Talk
- built
HumanLayer built A2 protocol“We're working on something called the A2 protocol.”
YouTube Unverified1 source· Talk












