12-factor-agents  by humanlayer

Principles for reliable LLM application development

created 4 months ago
10,945 stars

Top 4.7% on sourcepulse

GitHubView on GitHub
Project Summary

This project outlines the "12-Factor Agents" principles for building reliable, scalable, and maintainable LLM-powered applications, targeting software engineers and founders building production-ready AI agents. It aims to provide a structured approach to LLM application development, moving beyond simple prompt-tool loops to more robust software engineering practices.

How It Works

The core idea is to treat LLM interactions as software components rather than abstract "agents." It emphasizes modularity, control flow, and state management, drawing parallels to the established "12-Factor App" methodology. Key principles include treating natural language as a way to call tools, owning prompts and context windows, viewing tools as structured outputs, unifying execution and business state, and enabling launch/pause/resume capabilities via APIs. The approach advocates for small, focused agents and stateless reducers for better reliability and maintainability.

Quick Start & Requirements

This project is a set of principles and not a runnable framework. It references external projects and concepts for implementation details. The README mentions a v1.1 branch and open issues for tracking development.

Highlighted Details

  • Principles are presented as a guide for building production-grade LLM applications, contrasting with common "agent" frameworks.
  • Emphasizes that successful "agents" are often primarily software with LLM steps, not the other way around.
  • Draws inspiration from traditional DAG orchestrators (Airflow, Prefect, Dagster) for concepts like observability and retries.
  • Advocates for integrating modular agent concepts into existing products rather than building greenfield rewrites.

Maintenance & Community

The project is open-source and welcomes feedback and contributions. It lists several individuals and communities for early feedback, including @iantbutler01, @tnm, and the SF MLOps community. The author also mentions building OSS agents with this methodology under got-agents/agents.

Licensing & Compatibility

The project's source code is public on GitHub. The README does not explicitly state a license, but the nature of open-source contributions implies a permissive license, though this should be verified on the repository.

Limitations & Caveats

This is a principles-based guide, not a ready-to-use framework. Implementing these principles may require significant engineering effort and integration with existing or new tooling. The project is presented as a work in progress with a draft version (v1.1) available.

Health Check
Last commit

2 weeks ago

Responsiveness

1+ week

Pull Requests (30d)
7
Issues (30d)
6
Star History
7,823 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.