Skip to content

Commit 80ed88c

Browse files
feat(ag-ui): add multi-step wizard interactions
Add a new 'wizard' interaction type to the AG-UI protocol, enabling agents to present chained, branching prompts to users during execution. Backend: - Add WizardStep, WizardField, WizardCondition, WizardDefinition types - Add WIZARD_STEP_ADVANCE, WIZARD_COMPLETE, WIZARD_CANCELLED events - Add requestWizard() helper that loops through steps with conditional branching and returns aggregated WizardResult - Update /respond endpoint to accept wizardStepId and wizardCancelled Frontend: - Add wizardState to useAgentStream hook with wizard event handling - Create WizardModal component with stepper progress indicator, 5 step types (approval, confirm_data, choice, text_input, form), conditional step branching, and back/next/cancel navigation - Glassmorphism styling matching existing InteractionModal No database migration required — wizard context stored in existing interaction_context JSONB column. Fully backward compatible.
1 parent 94eb322 commit 80ed88c

8 files changed

Lines changed: 1535 additions & 25 deletions

File tree

src/components/agui/InteractionModal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ function formatValue(value: unknown, fallback = '—'): string {
1616

1717
export interface InteractionRequest {
1818
interactionId: string
19-
interactionType: 'approval' | 'confirm_data' | 'choice'
19+
interactionType: 'approval' | 'confirm_data' | 'choice' | 'wizard'
2020
title: string
2121
description?: string
2222
data?: Record<string, unknown>
2323
choices?: { id: string; label: string; description?: string }[]
2424
timeoutMs: number
2525
requestedAt: number
26+
wizard?: unknown
2627
}
2728

2829
interface InteractionModalProps {

0 commit comments

Comments
 (0)