Model Router is here. One API, one bill, multiple models.

Learn more

APRIL 24 2025

The Twelve-Factor Agentic App

A modern framework for AI-native architectures, adapted from the original Twelve-Factor App for the AI era

Ryan Fox-Tyler
Ryan Fox-Tyler
Product and Engineering, Hypermode
Jessica Feng
Jessica Feng
CMO, Hypermode

Agents, agentic flows, and AI apps are transforming how we interact with software. They’re reshaping industries, redefining customer experiences, and transforming how businesses innovate, operate, and compete.

However, building, deploying, and managing these apps calls for a new approach.

The Twelve-Factor Agentic App builds on the foundation of the original Twelve-Factor App, a methodology designed for building cloud-native apps. This new framework is designed for apps, agents, or flows that:

Who is this for?

Any developer building apps which use AI at its core, and the ops engineers who manage such apps.

This perspective synthesizes our experiences and observations on a wide variety of apps in the wild. It's a practical take on best practices for AI-native architectures—focused on how apps naturally evolve, how teams collaborate, and how to avoid costly mistakes in the real world.

The Twelve Factors

I. Domain-Specific Models
Choose the best foundational or small model for each task

II. Model Optionality
Maximize iteration with easily swappable models

III. Tools
Curate the resources, data, and functions provided to your agent

IV. Actions
Share agent skills across chat, apps, and other agents with auto-generated APIs

V. Coordination
Integrate models, tools, data, and human interaction through managed flows

VI. Short-Term Memory
Maintain context across the lifetime of an interaction

VII. Long-Term Memory
Extract memories for learning and improve context for future interactions

VIII. Organizational Knowledge
Use knowledge graphs to scale context across multi-agent architectures

IX. Auth
Authorize tool calling and agent delegation with re-authentication based on data risk

X. Inference Logs
Collect inferences for auditing and testing of changes

XI. Traces
Understand where time is consumed across each component of inference

XII. Evals
Define policies to assess critical agent behavior with each change

We’ll be following up with a deep dive on each of these twelve factors, exploring practical examples, patterns, and tools for implementation.