docs/docs/getting-started/concepts/awel.md
AWEL is a domain-specific language designed specifically for building LLM application workflows. It lets you compose complex AI pipelines as directed acyclic graphs (DAGs) using a set of built-in operators.
Traditional LLM application development involves scattered API calls, fragile glue code, and hard-to-maintain pipelines. AWEL solves this by providing:
flowchart LR
T["Trigger (HTTP/Schedule)"] --> A["Operator A"]
A --> B["Operator B"]
A --> C["Operator C"]
B --> D["Join Operator"]
C --> D
D --> E["Output"]
An AWEL pipeline consists of:
| Operator | Description | Use case |
|---|---|---|
| MapOperator | Transform each input item | Data formatting, API calls |
| ReduceOperator | Aggregate multiple inputs into one | Summarization, collection |
| JoinOperator | Merge results from parallel branches | Multi-source aggregation |
| BranchOperator | Route input to different paths | Conditional logic |
| StreamifyOperator | Convert batch to stream | Real-time processing |
| UnstreamifyOperator | Convert stream to batch | Collecting stream results |
| TransformStreamOperator | Transform items in a stream | Stream filtering/mapping |
| InputOperator | Provide initial input to a DAG | Pipeline entry data |
A minimal AWEL workflow that takes a user question and generates an LLM response:
from dbgpt.core.awel import DAG, MapOperator, InputOperator
with DAG("simple_chat") as dag:
input_node = InputOperator(input_source="user_question")
llm_node = MapOperator(map_function=call_llm)
input_node >> llm_node
The Web UI includes a drag-and-drop AWEL Flow editor where you can:
Access it from the Web UI sidebar under AWEL Flow.