# How to use interrupt with astream for frontend interaction?

**URL:** <https://forum.langchain.com/t/how-to-use-interrupt-with-astream-for-frontend-interaction/1516>\
**Category:** Agent Server\
**Tags:** intro-to-langgraph, python-help\
**Created:** [September 12, 2025, 1:18pm UTC](https://forum.langchain.com/t/how-to-use-interrupt-with-astream-for-frontend-interaction/1516 "2025-09-12T13:18:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alonahmias](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/alonahmias/32/928_2.png) [@alonahmias](https://forum.langchain.com/u/alonahmias)\
**Post date:** [September 12, 2025, 1:18pm UTC](https://forum.langchain.com/t/how-to-use-interrupt-with-astream-for-frontend-interaction/1516/1 "2025-09-12T13:18:58Z")

</div>

Hi team, thank you for the great work on LangGraph! I’m working on a project and need some help understanding how to properly use `interrupt` in combination with the `astream` function.

* * *

### **Setup**

- **Frontend:** Streamlit app with a simple streaming chat interface.

- **Backend:** LangGraph agent with the following node flow:

The flow looks like this:

```auto
generate_plan -> human_decision (interrupt) -> [user approves] -> execute_plan
                                      |
                                 [user rejects]
                                      ↓
                             back to generate_plan with user feedback

```

* * *

### **My Question**

I’m unclear on how to handle the `interrupt` inside an `astream` call so that:

1. The `interrupt` can pause and wait for user input from the frontend.

2. The frontend can properly receive and respond to the interrupt (e.g. show a message, buttons, or form for user feedback).

3. I can then resume the graph flow once the user responds.

What I’d like to understand is:

- What is the recommended way to yield/return the interrupt back to the frontend when using `agraph.astream()`?

- What object/type should I expect or listen for on the frontend side to know when an interrupt has occurred?

- How do I resume the LangGraph flow after the user provides their input?

Any examples, tips, or best practices would be hugely appreciated!

#help:langgraph

---

<div class="post-metadata">

**Author:** ![Isaac](https://avatars.discourse-cdn.com/v4/letter/i/8e8cbc/32.png) [@Isaac](https://forum.langchain.com/u/Isaac)\
**Post date:** [September 12, 2025, 6:25pm UTC](https://forum.langchain.com/t/how-to-use-interrupt-with-astream-for-frontend-interaction/1516/2 "2025-09-12T18:25:07Z")

</div>

Hi! This docs page should help you get started, there is a specific section in Interrupts: [How to integrate LangGraph into your React application - Docs by LangChain](https://docs.langchain.com/langgraph-platform/use-stream-react)

---

<div class="post-metadata">

**Author:** ![alonahmias](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/alonahmias/32/928_2.png) [@alonahmias](https://forum.langchain.com/u/alonahmias)\
**Post date:** [September 15, 2025, 12:27pm UTC](https://forum.langchain.com/t/how-to-use-interrupt-with-astream-for-frontend-interaction/1516/3 "2025-09-15T12:27:50Z")

</div>

But i don’t want to use the Langgraph server , i want to implement the backend myself, the langgraph server doesnt provide me with what i want
