-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Description
I'm building a complex workflow framework that supports the concept of "backtracking" within a depth-first-search scenario. I'm trying to set up a system where, within a workflow, each agent/executor can provide multiple output options to the next executor. Consider the following basic workflow:
start --> executorA --> executorB --> finalOutput
Suppose executorA determines there are 2 possible outputs, O1 and O2, it could give to executorB. In my framework, during the first pass, executorA will generate O1 and give that to executorB. Now, suppose executorB immediately crashes when reading O1. This is the perfect opportunity to have the workflow automatically backtrack to executorA, where he will quickly decide to return O2 instead. Then executorB can try running O2 and hopefully generate the desired output.
My issue with the way checkpoints are saved is that they are tied to the SuperStepCompleted event. In my example, the only natural places agent-framework supports checkpointing is between executorA and executorB, and after executorB runs. This means that executorA can never be "backtracked" to, and his other branch path O2 can never be revisited.
There are several ways I can write code to make my framework support the functionality I want, but it feels very inelegant. Essentially, I would like an additional entry point where agent-framework can invoke my executorA's implementation of OnCheckpointRestoredAsync.
Code Sample
Language/SDK
Both
Metadata
Metadata
Labels
Type
Projects
Status