genkit
genkit copied to clipboard
Long-Running Tools
Two classes of problem to tackle:
- Tools that take too long to wait on (need some form of "LRO" support)
- Tools that feel long because they have no intermediate status updates
For (1) I think we need some mechanism of synthetic conversation retriggering -- kinda complicated but basically the tool would respond with a "result pending, id: foo" and then later we'd inject a synthetic check_operation(foo) tool request with a tool result completing the original request.
For (2) we can choose between tools having streaming result support or tools having a separate statusSchema or progressSchema that can periodically emit things
Running into these classes of problems working on code-related agents in Genkit.