https://github.com/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.
https://github.com/run-llama/llama-agents
agentic-ai agentic-framework agentic-rag agentic-workflow agents ai event-driven orchestration
Last synced: about 1 month ago
JSON representation
Llama Agents + Workflows are an event-driven, async-first, step-based way to control the execution flow of AI applications like agents.
- Host: GitHub
- URL: https://github.com/run-llama/llama-agents
- Owner: run-llama
- License: mit
- Created: 2025-06-04T09:47:51.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2026-04-16T18:51:12.000Z (about 1 month ago)
- Last Synced: 2026-04-16T20:35:06.154Z (about 1 month ago)
- Topics: agentic-ai, agentic-framework, agentic-rag, agentic-workflow, agents, ai, event-driven, orchestration
- Language: Python
- Homepage: https://www.llamaindex.ai/
- Size: 14.6 MB
- Stars: 346
- Watchers: 0
- Forks: 61
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
- awesome-agents - llama-agents - agents is an async-first framework for building, iterating, and productionizing multi-agent systems, including multi-agent communication, distributed tool execution, human-in-the-loop, and more  (Automation)
- awesome-langchain - llama-agents - agents is an async-first framework for building, iterating, and productionizing multi-agent systems, including multi-agent communication, distributed tool execution, human-in-the-loop, and more  (Other LLM Frameworks / Videos Playlists)
README
# LlamaAgents
[](https://github.com/run-llama/workflows/actions/workflows/test.yml)
[](https://coveralls.io/github/run-llama/workflows?branch=main)
[](https://github.com/run-llama/llama-index-workflows/graphs/contributors)
[](https://pypi.org/project/llama-index-workflows/)
[](https://discord.gg/dGcwcsnxhU)
[](https://x.com/llama_index)
[](https://www.reddit.com/r/LlamaIndex/)
An open-source framework for building and shipping document-centric agents in Python.
Document workflows are messy. You're stitching together OCR, LLMs, structured extraction, classification, custom validation, and human review into pipelines that have to run reliably in production. The steps are slow and the payloads are heavy. A lot of the work is in-process Python: embedding models, image analysis, vision calls, custom heuristics that don't want to be a microservice. Standing up durable orchestration for that kind of workload is a project on its own, so most teams end up shoving the pipeline into a side process nobody else wants to integrate with.
LlamaAgents is built on [**Agent Workflows**](https://developers.llamaindex.ai/python/llamaagents/workflows/), an event-driven orchestration library where steps are async Python functions that emit and consume events. Branch, loop, parallelize, persist state, recover from failures, all in plain Python with no DSL.
## Grows with you
Document workloads have a wide range of shapes. Sometimes you're parsing five contracts in a notebook to prove a point. Others you're running a million invoices a month behind a customer's firewall, or you're iterating on extraction quality and shipping a new version every day. Agent Workflows is built to follow you across all of that without a rewrite.
Start as a function you call from a script. Wrap it in a server when you need an API. Connect a coordination backend when you need durability. Turn on replication when you need to scale.
And because it's a library at its core, the same workflow code drops into wherever the work has to actually run: a notebook for prototyping, a FastAPI app for your product, or a customer's locked-down environment when their documents can't leave it.
For more ideas of what it can do, take a look at [the examples](https://github.com/run-llama/llama-agents/tree/main/examples).
## Use it as a library
The simplest path. `pip install llama-index-workflows`, define your workflow, and `await workflow.run(...)`. It has minimal dependencies and embeds anywhere: scripts, notebooks, servers. Durability is pluggable too: save and resume runs from a file, or connect to a database.
```python
from workflows import Workflow, step
from workflows.events import StartEvent, StopEvent
class HelloWorkflow(Workflow):
@step
async def greet(self, ev: StartEvent) -> StopEvent:
return StopEvent(result=f"Hello, {ev.name}")
```
See the [`llama-index-workflows` package](https://github.com/run-llama/llama-agents/tree/main/packages/llama-index-workflows) for more details.
## Mount it inside an app you already have
[`llama-agents-server`](https://developers.llamaindex.ai/python/llamaagents/workflows/deployment/) wraps any workflow as a REST API with streaming, persistence, and human-in-the-loop support. Drop it into an existing Starlette/FastAPI app, or run it standalone. [`llama-agents-client`](https://developers.llamaindex.ai/python/llamaagents/workflows/client/) is the matching async client for calling workflows from other services.
```python
from llama_agents.server import WorkflowServer
server = WorkflowServer()
server.add_workflow("greet", HelloWorkflow())
```
See the [`llama-agents-server` package](https://github.com/run-llama/llama-agents/tree/main/packages/llama-agents-server) and the [`llama-agents-client` package](https://github.com/run-llama/llama-agents/tree/main/packages/llama-agents-client) for more details.
## Or ship it as a deployable agent
[`llamactl`](https://developers.llamaindex.ai/python/llamaagents/llamactl/getting-started/) is the CLI for building and deploying agent apps end-to-end. Init from a starter, develop locally with hot reload, then deploy to LlamaParse, AWS Bedrock AgentCore, or your own infra. Agents can be headless workflow services, MCP servers, or full-stack apps with a UI.
```bash
uv tool install llamactl
llamactl init
llamactl serve
llamactl deployments create
```
See the [`llamactl` package](https://github.com/run-llama/llama-agents/tree/main/packages/llamactl) for more details.
## Works with [LlamaParse](https://developers.llamaindex.ai/python/cloud/)
The heavy document primitives (OCR, structured extraction, classification, splitting) are what LlamaParse is for. Plug them into your workflow as steps, let LlamaParse handle the document understanding, and keep your agent code focused on orchestration, business logic, and review.
Check out our [prebuilt templates with llamactl](https://developers.llamaindex.ai/python/llamaagents/llamactl/agent-templates/) to get started.