From 819eae891ef121a073728f35a309f1f0e85b7008 Mon Sep 17 00:00:00 2001 From: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:33:00 -0400 Subject: [PATCH] feat(sdk-py): add interrupts to `ThreadState` (#5603) --- libs/sdk-py/langgraph_sdk/schema.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/sdk-py/langgraph_sdk/schema.py b/libs/sdk-py/langgraph_sdk/schema.py index 9ad1c5b8b..1f125e0df 100644 --- a/libs/sdk-py/langgraph_sdk/schema.py +++ b/libs/sdk-py/langgraph_sdk/schema.py @@ -251,7 +251,7 @@ class Thread(TypedDict): values: Json """The current state of the thread.""" interrupts: dict[str, list[Interrupt]] - """Interrupts which were thrown in this thread""" + """Mapping of task ids to interrupts that were raised in that task.""" class ThreadTask(TypedDict): @@ -284,6 +284,8 @@ class ThreadState(TypedDict): """The ID of the parent checkpoint. If missing, this is the root checkpoint.""" tasks: Sequence[ThreadTask] """Tasks to execute in this step. If already attempted, may contain an error.""" + interrupts: list[Interrupt] + """Interrupts which were thrown in this thread.""" class ThreadUpdateStateResponse(TypedDict):