# humanlayer/12-factor-agents

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/humanlayer-12-factor-agents).**

18,261 stars · 1,389 forks · TypeScript · other

## Links

- GitHub: https://github.com/humanlayer/12-factor-agents
- awesome-repositories: https://awesome-repositories.com/repository/humanlayer-12-factor-agents.md

## Topics

`12-factor` `12-factor-agents` `agents` `ai` `context-window` `framework` `llms` `memory` `orchestration` `prompt-engineering` `rag`

## Description

This framework provides a set of architectural principles and design patterns for building production-ready autonomous agents. It focuses on structuring automated systems that maintain consistent execution, manage complex internal states, and support reliable error recovery through a state machine-based methodology.

The system distinguishes itself by integrating human-in-the-loop orchestration directly into automated workflows. By incorporating manual oversight and validation checkpoints, it ensures safety and accuracy during critical decision-making processes. The framework also emphasizes distributed systems orchestration, allowing for horizontal scaling and fault tolerance by offloading state persistence and utilizing event-driven task management.

These architectural guidelines facilitate enterprise integration by standardizing how agents handle configuration, task initiation, and idempotent operations. The project provides a structured approach to managing the lifecycle of long-running automated tasks within business environments.

## Tags

### Artificial Intelligence & ML

- [Agent Architectures](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-architectures.md) — Provides a comprehensive architectural framework for building production-ready, reliable autonomous agents. ([source](https://github.com/humanlayer/12-factor-agents/tree/main/content/))
- [Autonomous Agents](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agent-orchestration-multi-agent/autonomous-agents.md) — Facilitates the development of production-ready autonomous agents with robust state management and error recovery.
- [Agentic State Machines](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-state-machines.md) — Structures agent workflows as deterministic state machines to ensure reliable recovery and consistent behavior.
- [Autonomous Agent Patterns](https://awesome-repositories.com/f/artificial-intelligence-ml/autonomous-agent-patterns.md) — Defines architectural guidelines for structuring reliable, production-ready autonomous agent systems.
- [Human-in-the-loop Workflows](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agent-orchestration-multi-agent/control-flow-and-workflows/human-in-the-loop-workflows.md) — Ensures safety and accuracy by incorporating human-in-the-loop validation into critical agent execution steps.
- [Agent State Persistence](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-state-persistence.md) — Persists agent execution state to external databases to enable fault tolerance and horizontal scaling.
- [Distributed Agent Systems](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agent-orchestration-multi-agent/coordination-and-routing/distributed-agent-systems.md) — Orchestrates autonomous agents across distributed environments to ensure scalability and fault tolerance.

### Software Engineering & Architecture

- [Autonomous Agent Frameworks](https://awesome-repositories.com/f/software-engineering-architecture/application-frameworks/autonomous-agent-frameworks.md) — Offers a structured framework for building autonomous agents that maintain state and support human interaction.
- [Human-in-the-Loop Workflows](https://awesome-repositories.com/f/software-engineering-architecture/human-in-the-loop-workflows.md) — Pauses automated execution at defined checkpoints to await manual validation before proceeding with sensitive operations.
- [AI Integration Architectures](https://awesome-repositories.com/f/software-engineering-architecture/ai-integration-architectures.md) — Standardizes architectural patterns for integrating scalable AI agents into enterprise business environments.
- [Asynchronous Task Orchestrators](https://awesome-repositories.com/f/software-engineering-architecture/asynchronous-task-orchestrators.md) — Decouples task initiation from execution using asynchronous message queues for reliable background processing.
- [Idempotency Patterns](https://awesome-repositories.com/f/software-engineering-architecture/idempotency-patterns.md) — Implements idempotent operations to ensure consistent results and prevent duplicate side effects during execution.

### Part of an Awesome List

- [Agent Frameworks](https://awesome-repositories.com/f/awesome-lists/ai/agent-frameworks.md) — Principles for developing reliable and robust agent applications.
- [Prompt Engineering Resources](https://awesome-repositories.com/f/awesome-lists/ai/prompt-engineering-resources.md) — Principles for building production-grade LLM-powered software applications.
