Questions about the draft proposal on interrupts #827
Replies: 4 comments 1 reply
|
Hi @pitt-liang, I looked into this and we are planning on implementing interrupts in the new year. |
Proposal: Multi-Interrupt SupportHey folks, I know you are about to pick up this task soon and I wanted to suggest an update to the proposal. Building on @pitt-liang's question - the current draft handles single interrupts well, but real- The ProblemWhen an LLM makes multiple tool calls in one turn, each requiring approval, the current single- Proposed Extension
type RunFinished = {
type: "RUN_FINISHED"
outcome?: "success" | "interrupt"
result?: any
// Existing draft single interrupt - could be replaced if we don't care about backwards compatibility with draft proposals
interrupt?: {
id?: string
reason?: string
payload?: any
}
// New: multiple interrupts
interrupts?: Array<{
id: string // Required for multi-interrupt
reason?: string
payload?: any
}>
}
type RunAgentInput = {
// ... existing fields
// Existing single resume - - could be replaced if we don't care about backwards compatibility with draft proposals
resume?: {
interruptId?: string
payload?: any
}
// New: multiple resumes
resumes?: Array<{
interruptId: string
payload?: any
}>
}Benefits
This is a minimal extension that solves the parallel tool approval case. We can choose to replace the existing interrupt/resume objects with the respective arrays or keep them around for backwards compatibility - depending on our practices of backwards compatibility requirements with published draft proposals (that I don't know what they are). |
|
Hi @NathanTarbert, Do you know if this is being worked on? I couldn't see it here: Road Map I was planning to implement the draft proposal (for the Python SDK) https://docs.ag-ui.com/drafts/interrupts. Except that both the RUN_FINISHED event and the RunAgentInput.resume would support multiple interrupts. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
https://docs.ag-ui.com/drafts/interrupts
For example, interruptions may occur at multiple nodes in a workflow, especially when some nodes are running in parallel. Another scenario is when an LLM supports parallel tool calls, and more than one selected tool call requires user confirmation.
example data of run_finished event with interruption.
{ "type": "RUN_FINISHED", "threadId": "t1", "runId": "r1", "outcome": "interrupt", "interrupt": { "id": "int-abc123", "reason": "human_approval", "payload": { "proposal": { "tool": "sendEmail", "args": { "to": "a@b.com", "subject": "Hi", "body": "…" } } } } }Thanks.
All reactions