Inline time-picker rendered in the chat via useFrontendTool with an async
handler. The handler returns a Promise that resolves only when the user picks a
slot or cancels — equivalent UX to LangGraph's native interrupt() primitive,
adapted for the Claude Agent SDK which has no graph-level pause/resume.
- User asks to book a meeting
- Backend scheduling agent calls
schedule_meeting(a frontend tool) - Frontend renders
TimePickerCardinline in the chat - User picks a slot or cancels
- The Promise resolves with the result, which flows back to the agent
- Agent confirms the booking in chat
The Python backend at src/agents/interrupt_agent.py defines only a system
prompt and tools=[] — the schedule_meeting tool is registered entirely on
the frontend. AG-UI forwards the frontend tool definition to Claude, and the
tool call lifecycle resolves the user's choice back through CopilotKit.
- ms-agent-python
gen-ui-interrupt— the reference implementation this port is based on. - langgraph-python
gen-ui-interrupt— the canonical LangGraph version using nativeinterrupt().