LLAMAINDEX-WORKFLOWS
LlamaIndex Workflows event-driven 2024 agentic.
Definition
LlamaIndex Workflows key concepts: (1) Events: Pydantic models representing events emitted between steps (StartEvent, StopEvent, custom events). (2) Steps: async functions decorated @step that consume events + emit events + return values (terminating). (3) Workflow: class subclasses Workflow with steps decorated, automatic event routing based event types step input + output annotations. (4) Async-first: steps are async Python functions, leverage asyncio concurrency primitives, parallel branches naturally supported. (5) Context: ctx.set / ctx.get share state across steps, mutex-safe. (6) Streaming: ctx.write_event_to_stream emit events to stream API. (7) Multi-step + multi-LLM: each step can call different LLMs + tools, compose RAG retrieval + reasoning + writing in workflow. (8) Visualization: draw_all_possible_flows + draw_most_recent_execution helper functions generate drawio.io graphs visualizing workflow. Integration: LlamaIndex query engines + retrievers + post-processors + response synthesizers all composable in Workflows. LlamaIndex broader framework: focus RAG (Retrieval-Augmented Generation), vector indexes + node parsers + retrievers + response synthesizers, ~30000 GitHub stars, LlamaIndex Cloud SaaS managed RAG offering.
Origin
LlamaIndex initial release November 2022 by Jerry Liu ; LlamaIndex Inc. founded 2023 ; Series A $19M June 2023 (Greylock Partners lead) ; LlamaIndex Workflows announced August 2024 v0.11.0+.
Example in context
Research assistant agent uses LlamaIndex Workflows: steps = (1) ResearchStep async fetches sources via Tavily Web Search, (2) SummarizeStep async LLM summarizes per source parallel asyncio.gather, (3) DraftStep async LLM writes draft based summaries, (4) EditStep async LLM edits final draft ; visualisation draw_all_possible_flows shows workflow graph drawio.io.
Related terms
- LangGraph — alternative graph-based.