run-llama/llama-agents

Llama Agents + Workflows are an event-driven, async-first, step-based way to control the execution flow of AI applications like agents.

What it solves

It addresses the complexity of building production-ready document-centric agents. Document workflows often involve messy combinations of OCR, LLMs, structured extraction, and human review, which are typically slow and heavy. LlamaAgents provides a way to orchestrate these steps reliably without needing to build a custom microservice architecture or use a restrictive domain-specific language (DSL).

How it works

LlamaAgents is based on an event-driven orchestration library where steps are defined as asynchronous Python functions that emit and consume events. This allows developers to create complex logic—including branching, looping, and parallelization—using plain Python. The framework is designed to be flexible: it can start as a simple script, be wrapped in a REST API server for production, or be deployed as a full-stack agent app via a CLI tool.

Who it’s for

It is designed for Python developers building document-heavy AI pipelines who need a path from prototyping in notebooks to deploying scalable, durable agents in production or locked-down customer environments.

Highlights

  • Event-Driven Orchestration: Uses async Python functions to handle complex workflow logic without a DSL.
  • Flexible Deployment: Can be used as a lightweight library, integrated into FastAPI/Starlette apps, or deployed via llamactl to various infrastructures.
  • Durable State: Supports persisting and resuming runs via pluggable backends (files or databases).
  • LlamaParse Integration: Seamlessly plugs into LlamaParse for heavy-lifting tasks like OCR and structured extraction.