Llama Agents is a Python framework for building and shipping document-centric agents, the kind of pipelines that combine OCR, LLMs, structured extraction, classification, custom validation, and human review. It is built on Agent Workflows, an event-driven orchestration library in which steps are async Python functions that emit and consume events. Workflows can branch, loop, run in parallel, persist state, and recover from failures in plain Python, without a DSL.
The same workflow code scales across three levels of deployment. As a library, a workflow is a function you call from a script or notebook, with pluggable durability that saves and resumes runs from a file or a database. As a server, it is wrapped as a REST API with streaming, persistence, and human-in-the-loop support, mounted inside an existing Starlette or FastAPI app or run standalone, with a matching async client for other services. As a deployable agent, a CLI builds and deploys agent apps from starter templates to LlamaParse, AWS Bedrock AgentCore, or your own infrastructure, as headless workflow services, MCP servers, or full-stack apps with a UI.
Heavy document operations such as OCR, extraction, classification, and splitting can be delegated to LlamaParse as workflow steps, leaving the agent code to handle orchestration, business logic, and review.
Features
- Event-driven workflows: async Python steps that emit and consume events, with branching, loops, and parallelism
- Pluggable durability: save and resume runs from a file or a database
- Workflow server: exposes any workflow as a REST API with streaming, persistence, and human-in-the-loop support
- Async client: call workflows from other services
- Deployment CLI: start from templates, develop with hot reload, and deploy to LlamaParse, AWS Bedrock AgentCore, or your own infrastructure
- Deployment shapes: headless workflow services, MCP servers, or full-stack apps with a UI
- LlamaParse steps: OCR, structured extraction, classification, and splitting as workflow steps



