-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Open
Labels
enhancementNew feature or requestNew feature or requesttriageIssue needs to be triaged/prioritizedIssue needs to be triaged/prioritized
Description
Feature Description
Add the ability to cancel or abort a workflow step from within another step in LlamaIndex workflows.
Reason
Currently, LlamaIndex workflows execute steps based on event triggers, but there's no built-in mechanism for one step to cancel or abort another step's execution.
Use case example
┌─────────┐
│ Step A │
└────┬────┘
│
┌──────────┴──────────┐
│ (parallel execution)│
│ │
┌────▼────┐ ┌────▼────┐
│ Step A1 │◄─ ─ ─ ─ ─ │ Step A2 │
└────┬────┘ cancels └────┬────┘
x │
│ │
┌────▼────┐ ┌────▼────┐
│ Step B1 │ │ Step B2 │
└────┬────┘ └────┬────┘
x │
└──────────┬──────────┘
│
┌────▼────┐
│ Step C │
└─────────┘
Step A1 is slow, and can be skipped when a condition discovered in the parallel step A2 is satisfied. Should have the ability to stop A1's execution immediately and discard its entire downstream branch as soon as A2 produces that condition, for example via AbortEvent.
Value of Feature
This feature would significantly improve the flexibility and robustness of LlamaIndex workflows for production use cases.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesttriageIssue needs to be triaged/prioritizedIssue needs to be triaged/prioritized