๐ค๐โฌ๏ธโ 12-Factor Agents: Patterns of reliable LLM applicationsย โย Dex Horthy, HumanLayer
๐๐ Human Notes
- ๐ค Focused prompt โ โ quality response
- ๐ค Strength: ๐ฃ๏ธ natural language โ โ๏ธ JSON
- ๐ Context Engineering is everything
- โ๏ธ Prompt
- ๐ง Memory
- ๐ RAG
- โณ History
- ๐งฑ Structured Output
- ๐ฏ Prefer small, focused agents
- โก๏ธ Agents should be stateless
๐ค AI Summary
The video discusses several challenges and issues related to building reliable AI agents ๐ค and LLM applications, drawing parallels to traditional software engineering principles.
- โ ๏ธ Difficulty in achieving high quality with agents [00:45]: Itโs challenging to get agents beyond 70-80% functionality ๐, often requiring deep dives ๐คฟ into call stacks and prompt engineering.
- โ๏ธ Over-engineering with agents [01:00]: Not every problem requires an agent ๐ค; some can be solved with simpler scripts ๐.
- ๐ญ Lack of โagenticโ behavior in production agents [01:54]: Many production agents function more like traditional software ๐ป than truly โagenticโ systems.
- โณ Challenges with long context windows [02:27]: The reliability and quality of results ๐ decrease significantly with longer LLM context windows.
- โ ๏ธ Tool use being โharmfulโ (in a specific context) [04:26]: The abstraction of โtool useโ as a magical interaction โจ makes it harder; it should be viewed as an LLM outputting JSON ๐ป processed by deterministic code.
- ๐ Naive agent loop limitations [06:21]: Simple agent loops donโt work well for longer workflows ๐ due to context window issues.
- ๐ Blindly adding errors to context [10:54]: Adding full error messages โ ๏ธ or stack traces to the context can cause the agent to spin out or get stuck.
- ๐ค Avoiding the choice between tool call and human message [12:25]: Builders often avoid deciding whether an agentโs output should be a tool call or a message ๐ฌ to a human, leading to less effective interactions.
- ๐ฑ๏ธ Users needing to open multiple tabs for agents [12:13]: The current user experience often requires interacting with different agents across various tabs ๐, highlighting a need for agents to be accessible through common communication channels ๐ฌ.
- ๐๏ธ Frameworks abstracting away hard AI parts [15:48]: Current frameworks often hide complex AI aspects of agent building ๐งฑ, when they should instead handle other hard parts, allowing developers to focus on critical AI elements.
๐ Book Recommendations
- ๐คโ๏ธ๐ Designing Machine Learning Systems: An Iterative Process for Production-Ready Applications by Chip Huyen: This book covers the entire lifecycle ๐ of machine learning systems, including deployment, monitoring, and maintenance, which is relevant to the challenges of building reliable AI agents.
- ๐ ๐ปโ๏ธ Software Engineering at Google: Lessons Learned from Programming Over Time by Titus Winters, Tom Manshreck, and Hyrum Wright: Given the videoโs parallels to traditional software engineering principles ๐ป, this book offers insights into building robust ๐ช and scalable software, which can be applied to AI development.
- ๐ โBuilding Intelligent Agents: A Tutorialโ by Michael Wooldridge: For a more theoretical understanding of intelligent agents ๐ค, this book provides a good foundation ๐๏ธ.
- ๐ฃ๏ธ๐ป Natural Language Processing with Transformers by Lewis Tunstall, Leandro von Werra, and Thomas Wolf: To delve deeper into LLMs and their applications ๐ค, this book provides practical guidance ๐งญ on working with transformer models.
๐ฆ Tweet
๐ค๐โฌ๏ธโ 12-Factor Agents: Patterns of reliable LLM applications - @dexhorthy, @humanlayer_dev
โ Bryan Grounds (@bagrounds) July 12, 2025
๐ค AI Agents | ๐ ๏ธ Tool Use | โ๏ธ Software Engineering | ๐ฌ Human Interaction | ๐ Error Handling | โฑ๏ธ Context Window | ๐ Prompt Engineering@aiDotEngineerhttps://t.co/SFlvXWdD4Y