{"id":28948176,"url":"https://github.com/run-llama/workflows-py","last_synced_at":"2026-03-18T01:28:43.310Z","repository":{"id":299870455,"uuid":"995990429","full_name":"run-llama/workflows-py","owner":"run-llama","description":"Workflows are an event-driven, async-first, step-based way to control the execution flow of AI applications like agents.","archived":false,"fork":false,"pushed_at":"2026-03-17T03:19:09.000Z","size":12802,"stargazers_count":323,"open_issues_count":14,"forks_count":54,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-17T16:39:24.073Z","etag":null,"topics":["agentic-ai","agentic-framework","agentic-rag","agentic-workflow","agents","ai","event-driven","orchestration"],"latest_commit_sha":null,"homepage":"https://www.llamaindex.ai/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/run-llama.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-06-04T09:47:51.000Z","updated_at":"2026-03-17T03:19:11.000Z","dependencies_parsed_at":"2025-06-19T08:26:44.826Z","dependency_job_id":"f70af06e-80d6-4ca9-b278-2d899da19617","html_url":"https://github.com/run-llama/workflows-py","commit_stats":null,"previous_names":["run-llama/workflows","run-llama/workflows-py"],"tags_count":114,"template":false,"template_full_name":null,"purl":"pkg:github/run-llama/workflows-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/run-llama%2Fworkflows-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/run-llama%2Fworkflows-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/run-llama%2Fworkflows-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/run-llama%2Fworkflows-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/run-llama","download_url":"https://codeload.github.com/run-llama/workflows-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/run-llama%2Fworkflows-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30639887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-18T00:09:27.587Z","status":"ssl_error","status_checked_at":"2026-03-18T00:09:26.123Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","agentic-framework","agentic-rag","agentic-workflow","agents","ai","event-driven","orchestration"],"created_at":"2025-06-23T10:07:25.233Z","updated_at":"2026-03-18T01:28:43.286Z","avatar_url":"https://github.com/run-llama.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LlamaIndex Workflows\n\n[![Unit Testing](https://github.com/run-llama/workflows/actions/workflows/test.yml/badge.svg)](https://github.com/run-llama/workflows/actions/workflows/test.yml)\n[![Coverage Status](https://coveralls.io/repos/github/run-llama/workflows/badge.svg?branch=main)](https://coveralls.io/github/run-llama/workflows?branch=main)\n[![GitHub contributors](https://img.shields.io/github/contributors/run-llama/workflows)](https://github.com/run-llama/llama-index-workflows/graphs/contributors)\n\n\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/llama-index-workflows)](https://pypi.org/project/llama-index-workflows/)\n[![Discord](https://img.shields.io/discord/1059199217496772688)](https://discord.gg/dGcwcsnxhU)\n[![Twitter](https://img.shields.io/twitter/follow/llama_index)](https://x.com/llama_index)\n[![Reddit](https://img.shields.io/reddit/subreddit-subscribers/LlamaIndex?style=plastic\u0026logo=reddit\u0026label=r%2FLlamaIndex\u0026labelColor=white)](https://www.reddit.com/r/LlamaIndex/)\n\nLlamaIndex Workflows are a framework for orchestrating and chaining together complex systems of steps and events.\n\n## What can you build with Workflows?\n\nWorkflows shine when you need to orchestrate complex, multi-step processes that involve AI models, APIs, and decision-making. Here are some examples of what you can build:\n\n- **AI Agents** - Create intelligent systems that can reason, make decisions, and take actions across multiple steps\n- **Document Processing Pipelines** - Build systems that ingest, analyze, summarize, and route documents through various processing stages\n- **Multi-Model AI Applications** - Coordinate between different AI models (LLMs, vision models, etc.) to solve complex tasks\n- **Research Assistants** - Develop workflows that can search, analyze, synthesize information, and provide comprehensive answers\n- **Content Generation Systems** - Create pipelines that generate, review, edit, and publish content with human-in-the-loop approval\n- **Customer Support Automation** - Build intelligent routing systems that can understand, categorize, and respond to customer inquiries\n\nThe async-first, event-driven architecture makes it easy to build workflows that can route between different capabilities, implement parallel processing patterns, loop over complex sequences, and maintain state across multiple steps - all the features you need to make your AI applications production-ready.\n\n## Key Features\n\n- **async-first** - workflows are built around python's async functionality - steps are async functions that process incoming events from an asyncio queue and emit new events to other queues. This also means that workflows work best in your async apps like FastAPI, Jupyter Notebooks, etc.\n- **event-driven** - workflows consist of steps and events. Organizing your code around events and steps makes it easier to reason about and test.\n- **state management** - each run of a workflow is self-contained, meaning you can launch a workflow, save information within it, serialize the state of a workflow and resume it later.\n- **observability** - workflows are automatically instrumented for observability, meaning you can use tools like `Arize Phoenix` and `OpenTelemetry` right out of the box.\n\n## Quick Start\n\nInstall the package:\n\n```bash\npip install llama-index-workflows\n```\n\nAnd create your first workflow:\n\n```python\nimport asyncio\nfrom pydantic import BaseModel, Field\nfrom workflows import Context, Workflow, step\nfrom workflows.events import Event, StartEvent, StopEvent\n\nclass MyEvent(Event):\n    msg: list[str]\n\nclass RunState(BaseModel):\n    num_runs: int = Field(default=0)\n\nclass MyWorkflow(Workflow):\n    @step\n    async def start(self, ctx: Context[RunState], ev: StartEvent) -\u003e MyEvent:\n        async with ctx.store.edit_state() as state:\n            state.num_runs += 1\n\n            return MyEvent(msg=[ev.input_msg] * state.num_runs)\n\n    @step\n    async def process(self, ctx: Context[RunState], ev: MyEvent) -\u003e StopEvent:\n        data_length = len(\"\".join(ev.msg))\n        new_msg = f\"Processed {len(ev.msg)} times, data length: {data_length}\"\n        return StopEvent(result=new_msg)\n\nasync def main():\n    workflow = MyWorkflow()\n\n    # [optional] provide a context object to the workflow\n    ctx = Context(workflow)\n    result = await workflow.run(input_msg=\"Hello, world!\", ctx=ctx)\n    print(\"Workflow result:\", result)\n\n    # re-running with the same context will retain the state\n    result = await workflow.run(input_msg=\"Hello, world!\", ctx=ctx)\n    print(\"Workflow result:\", result)\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\nIn the example above\n- Steps that accept a `StartEvent` will be run first.\n- Steps that return a `StopEvent` will end the workflow.\n- Intermediate events are user defined and can be used to pass information between steps.\n- The `Context` object is also used to share information between steps.\n\nVisit the [complete documentation](https://docs.llamaindex.ai/en/stable/understanding/workflows/) for more examples using `llama-index`!\n\n## More examples\n\n- [Basic Feature Run-Through](./examples/feature_walkthrough.ipynb)\n- [Building a Function Calling Agent with `llama-index`](./examples/agent.ipynb)\n- [Human-in-the-loop Iterative Document Extraction](./examples/document_processing.ipynb)\n- Observability\n  - [OpenTelemetry + Instrumentation Primer](./examples/observability/workflows_observability_pt1.ipynb)\n  - [OpenTelemetry + LlamaIndex](./examples/observability/workflows_observability_pt2.ipynb)\n  - [Arize Phoenix + LlamaIndex](./examples/observability/workflows_observablitiy_arize_phoenix.ipynb)\n  - [Langfuse + LlamaIndex](./examples/observability/workflows_observablitiy_langfuse.ipynb)\n  - [Opik + LlamaIndex](https://www.comet.com/docs/opik/integrations/opentelemetry-python-sdk)\n\n## Related Packages\n\n- [Typescript Workflows](https://github.com/run-llama/workflows-ts)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frun-llama%2Fworkflows-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frun-llama%2Fworkflows-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frun-llama%2Fworkflows-py/lists"}