12-Factor Agents: Patterns of reliable LLM applications — Dex Horthy, HumanLayer

AI Engineer July 3, 2025
Video Thumbnail
AI Engineer Logo

AI Engineer

@aidotengineer

About

Talks, workshops, events, and training for AI Engineers.

Video Description

Hi, I'm Dex. I've been hacking on AI agents for a while. I've tried every agent framework out there, from the plug-and-play crew/langchains to the "minimalist" smolagents of the world to the "production grade" langraph, griptape, etc. I've talked to a lot of really strong founders who are all building really impressive things with AI. Most of them are rolling the stack themselves. I don't see a lot of frameworks in production customer-facing agents. I've been surprised to find that most of the products out there billing themselves as "AI Agents" are not all that agentic. A lot of them are mostly deterministic code, with LLM steps sprinkled in at just the right points to make the experience truly magical. Agents, at least the good ones, don't follow the "here's your prompt, here's a bag of tools, loop until you hit the goal" pattern. Rather, they are comprised of mostly just software. So, I set out to answer: What are the principles we can use to build LLM-powered software that is actually good enough to put in the hands of production customers? # The Short Version: The 12 Factors Even if LLMs continue to get exponentially more powerful, there will be core engineering techniques that make LLM-powered software more reliable, more scalable, and easier to maintain. How We Got Here: A Brief History of Software Factor 1: Natural Language to Tool Calls Factor 2: Own your prompts Factor 3: Own your context window Factor 4: Tools are just structured outputs Factor 5: Unify execution state and business state Factor 6: Launch/Pause/Resume with simple APIs Factor 7: Contact humans with tool calls Factor 8: Own your control flow Factor 9: Compact Errors into Context Window Factor 10: Small, Focused Agents Factor 11: Trigger from anywhere, meet users where they are Factor 12: Make your agent a stateless reducer --- https://x.com/dexhorthy/ https://github.com/humanlayer/12-factor-agents https://news.ycombinator.com/item?id=43699271

You May Also Like

Essential AI Developer Tools

AI-recommended products based on this video

Loading...
Skytech Archangel Gaming PC Desktop – AMD Ryzen 5 3600 3.6 GHz, NVIDIA RTX 3060, 1TB NVME SSD, 16GB DDR4 RAM 3200, 600W Gold PSU, 11AC Wi-Fi, Windows 11 Home 64-bit

Skytech Archangel Gaming PC Desktop – AMD Ryzen 5 3600 3.6 GHz, NVIDIA RTX 3060, 1TB NVME SSD, 16GB DDR4 RAM 3200, 600W Gold PSU, 11AC Wi-Fi, Windows 11 Home 64-bit

(31)
$2,657.01$2,656.90
FREE delivery Feb 24 - Mar 3
Loading...
Skytech Blaze 3.0 Gaming PC Desktop – Intel Core i5 12400F 2.5 GHz, NVIDIA RTX 3060, 500GB NVME SSD, 16GB DDR4 RAM 3200, 600W Gold PSU, 11AC Wi-Fi, Windows 11 Home 64-bit

Skytech Blaze 3.0 Gaming PC Desktop – Intel Core i5 12400F 2.5 GHz, NVIDIA RTX 3060, 500GB NVME SSD, 16GB DDR4 RAM 3200, 600W Gold PSU, 11AC Wi-Fi, Windows 11 Home 64-bit

(786)
$1,414.11
FREE delivery Thu, Feb 19Only 4 left in stock.
Loading...
MSI NVIDIA GeForce RTX 3050 Ventus 2X XS 8G OC Graphics Card - 8 GB GDDR6, 1807 MHz, PCI Express Gen 4, 128 Bits, DP v 1.4a, DL DVI-D, HDMI 2.1 (Supports 4K at 120Hz)

MSI NVIDIA GeForce RTX 3050 Ventus 2X XS 8G OC Graphics Card - 8 GB GDDR6, 1807 MHz, PCI Express Gen 4, 128 Bits, DP v 1.4a, DL DVI-D, HDMI 2.1 (Supports 4K at 120Hz)

(760)
$1,020.45
Loading...
Asus Dual NVIDIA GeForce RTX 3050 6GB OC Edition Gaming Graphics Card - PCIe 4.0, 6GB GDDR6 Memory, HDMI 2.1, DisplayPort 1.4a, 2-Slot Design, Axial-tech Fan Design, 0dB Technology, Steel Bracket

Asus Dual NVIDIA GeForce RTX 3050 6GB OC Edition Gaming Graphics Card - PCIe 4.0, 6GB GDDR6 Memory, HDMI 2.1, DisplayPort 1.4a, 2-Slot Design, Axial-tech Fan Design, 0dB Technology, Steel Bracket

(903)
$248.98
FREE delivery Sat, Jan 3
300+ bought in past month
Loading...
Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

(382)
$94.95
PrimeFREE delivery Sat, Jun 14
Loading...
【DDR3 RAM Laptop Only】 GIGASTONE 16GB Kit (2x8GB) DDR3/DDR3L 1600MHz (1333MHz) PC3-12800 (PC3-10600) CL11 1.35V/1.5V 2Rx8 SODIMM 204 Pin Unbuffered Non ECC High Performance Notebook Memory Upgrade

【DDR3 RAM Laptop Only】 GIGASTONE 16GB Kit (2x8GB) DDR3/DDR3L 1600MHz (1333MHz) PC3-12800 (PC3-10600) CL11 1.35V/1.5V 2Rx8 SODIMM 204 Pin Unbuffered Non ECC High Performance Notebook Memory Upgrade

(1,599)
$32.99
FREE delivery Sun, Jun 15 on your first order
50+ bought in past month
Loading...
TEAMGROUP Elite DDR4 16GB Kit (2 x 8GB) 3200MHz PC4-25600 CL22 Unbuffered Non-ECC 1.2V SODIMM 260-Pin Laptop Notebook PC Computer Memory Module Ram Upgrade - TED416G3200C22DC-S01

TEAMGROUP Elite DDR4 16GB Kit (2 x 8GB) 3200MHz PC4-25600 CL22 Unbuffered Non-ECC 1.2V SODIMM 260-Pin Laptop Notebook PC Computer Memory Module Ram Upgrade - TED416G3200C22DC-S01

(3,629)
$57.46
$7.05 delivery Jun 17 - 20Only 3 left in stock.
Loading...
Google Pixel Buds Pro 2 - Noise Canceling Earbuds - Up to 31 Hour Battery Life with Charging Case - Bluetooth Headphones - Compatible with Android - Hazel

Google Pixel Buds Pro 2 - Noise Canceling Earbuds - Up to 31 Hour Battery Life with Charging Case - Bluetooth Headphones - Compatible with Android - Hazel

(183)
199.99
PrimeFREE delivery Saturday, June 14
400+ bought in past month
Loading...
Deeyaple USB C to Aux, 4FT/1.2M, Type C to 3.5mm Audio Cable Headphone Jack Cable for Car Mobile Phone, iPhone 16 15, iPad Pro, Samsung Galaxy S24 S23 S2010, Google Pixel,Oneplus Grey (1)
Best Seller

Deeyaple USB C to Aux, 4FT/1.2M, Type C to 3.5mm Audio Cable Headphone Jack Cable for Car Mobile Phone, iPhone 16 15, iPad Pro, Samsung Galaxy S24 S23 S2010, Google Pixel,Oneplus Grey (1)

(78)
$6.99
FREE delivery Fri, Sep 5 on your first order
1K+ bought in past month
Loading...
Car Carplay Woven Cable for iPhone 16 15 3.3FT USB A to USB C 3.2 Gen 2 Carplay Adapter Wire for iPhone 16 15 Pro Max, iPad Pro/Air, Samsung Galaxy S25/S24/S23/S22/S21 Google Pixel, Car Charger Cable

Car Carplay Woven Cable for iPhone 16 15 3.3FT USB A to USB C 3.2 Gen 2 Carplay Adapter Wire for iPhone 16 15 Pro Max, iPad Pro/Air, Samsung Galaxy S25/S24/S23/S22/S21 Google Pixel, Car Charger Cable

(213)
$12.99
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month
Loading...
Pishengfa DIY Stitch Book, Embroidery Stitch Book, DIY Sewing Books, EmbroideryS Books of Stitches, with 86/128 Sewing Tips for Beginners, Unique Embroidery Handmade Gifts (Grey)

Pishengfa DIY Stitch Book, Embroidery Stitch Book, DIY Sewing Books, EmbroideryS Books of Stitches, with 86/128 Sewing Tips for Beginners, Unique Embroidery Handmade Gifts (Grey)

(0)
$29.99
$6.99 delivery Dec 23, 2025 - Jan 2, 2026
700+ bought in past month
Loading...
NAFYRE N11 PRO GPS Drone with Camera for Adults 4K UHD, 90 Min Long Flight Time, Long Control Range, Auto Return, Follow Me, Brushless Motor, 5G FPV RC Quadcopter for Beginners

NAFYRE N11 PRO GPS Drone with Camera for Adults 4K UHD, 90 Min Long Flight Time, Long Control Range, Auto Return, Follow Me, Brushless Motor, 5G FPV RC Quadcopter for Beginners

(108)
$149.98
FREE delivery Wed, Aug 20
100+ bought in past month
Loading...
Super Enduring Brushless Motor Drone with Camera for Beginners, CHUBORY A68 WiFi FPV Quadcopter with 2K HD Camera, Auto Hover, 3D Flips, Headless Mode, Trajectory Flight

Super Enduring Brushless Motor Drone with Camera for Beginners, CHUBORY A68 WiFi FPV Quadcopter with 2K HD Camera, Auto Hover, 3D Flips, Headless Mode, Trajectory Flight

(1,063)
$89.99
FREE delivery Wed, Aug 20
Loading...
Brushless Super Endurance Foldable Drone for Beginners 35+ mins Flight Time Drone with 90° Wide-Angle 2K HD Camera, Follow me, Dual Cameras, Auto Hover and Trajectory Flight(3 Batteries)

Brushless Super Endurance Foldable Drone for Beginners 35+ mins Flight Time Drone with 90° Wide-Angle 2K HD Camera, Follow me, Dual Cameras, Auto Hover and Trajectory Flight(3 Batteries)

(0)
$199.99
PrimeFREE delivery Sun, Jun 15
Loading...
10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

(1)
$99.99
FREE delivery Mon, Aug 11
Loading...
ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

(49)
$117.29$102.21
$6.86 delivery Thu, Aug 14
Loading...
7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

(61)
$68.99
FREE delivery Tue, Aug 12
Loading...
BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

(288)
$54.14
FREE delivery Sun, Jun 22