How can I display an "AI is thinking…" message in a slow ReAct workflow without interrupting the tool call? #4071
Unanswered
luciotudisco
asked this question in
Q&A
Replies: 2 comments
-
Streaming! https://langchain-ai.github.io/langgraph/concepts/streaming/?h=streaming |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks William. I am running the above agent in the LangGraph platform and already streaming the content it produces using the LangGraph SDK API.
I am still confused on how to achieve the above. Is the solution to intercept the streamed tool call request and run a stopwatch in the client until the tool result event happens? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone!
I'm working with a simple ReAct graph in LangGraph that uses a single tool, but that tool occasionally runs very slowly. Here’s a simple setup:
I’d like to add an AI message to the state that says something like “The tool is taking longer than usual, please wait…”, just to provide user feedback when the tool is slow. However, I don’t want to actually interrupt or cancel the ongoing tool call.
Does anyone know how to achieve this in LangGraph? Any tips or pointers on adding that extra AI message during a potentially long-running tool call would be greatly appreciated!
Thanks in advance for your help.
Beta Was this translation helpful? Give feedback.
All reactions