Handling Interrupts. #3

Open
opened 2026-02-16 08:16:53 -05:00 by yindo · 0 comments
Owner

Originally created by @arthurdorigueto on GitHub (Feb 27, 2025).

I just can't find a way to change your code to handle interrupts. Could you please help?

I have a react agent, created with create_react_agent, which has the following tool:

def get_customer_name() -> str:
    """Get customer name.

    Returns:
        str: The customer name.
    """
    options: List[str] = ...

    selected_customer = interrupt(
        {   
            "text": "Select the customer name: ",
            "options": options,
        }
    )

    return selected_customer

What I expect to happen is to somehow read text and options in the frontend. I know this is possible because I managed to do this using CopilotKit.

Originally created by @arthurdorigueto on GitHub (Feb 27, 2025). I just can't find a way to change your code to handle interrupts. Could you please help? I have a react agent, created with _create_react_agent_, which has the following tool: ``` def get_customer_name() -> str: """Get customer name. Returns: str: The customer name. """ options: List[str] = ... selected_customer = interrupt( { "text": "Select the customer name: ", "options": options, } ) return selected_customer ``` What I expect to happen is to somehow read _text_ and _options_ in the frontend. I know this is possible because I managed to do this using CopilotKit.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph-fullstack-python#3