LlamaIndex Workflows
LlamaIndex Workflows is a simple and lightweight engine for JavaScript and TypeScript apps.
LlamaIndex Workflow (LlamaFlow) is a library for streaming event-driven programming in JavaScript and TypeScript. It provides a simple and lightweight orchestration solution for building complex workflows with minimal boilerplate.
It combines event-driven programming, async context and streaming to create a flexible and efficient way to handle data processing tasks.
The essential concepts of LlamaFlow are:
- Events: are the core building blocks of LlamaFlow. They represent data that flows through the system.
- Handlers: are functions that process events and can produce new events.
- Context: is the environment in which events are processed. It provides access to the event stream and allows sending new events.
- Workflow: is the collection of events, handlers, and context that define the processing logic.
Getting Started
First Example
With workflowEvent and createWorkflow, you can create a simple workflow that processes events.
Parallel processing with async handlers
Tool calls are a common pattern in LLM applications, where the model generates a call to an external function or API.
With LlamaFlow
LlamaFlow provides abort signals and parallel processing out of the box.
You can collect the results of the tool calls from the stream and send them back to the workflow.
Ship to Production easily
We provide tons of middleware and integrations to make it easy to ship your workflows to production.