Understanding State Management with Gradio and LangGraph
Hi everyone,I’m working on an agentic workflow using LangGraph and facing challenges with state management. Here’s the flow:Agent 1collects three pieces of information by asking questions sequentially.Agent 2processes the collected information and asks two additional questions.Agent 3performs similar processing but includes additional tool calls.And so on.This setup follows a human-in-the-loop approach as described in the LangGraph documentation.The issue I’m encountering is maintaining state—specifically, keeping track of which agent is currently replying and directing the conversation appropriately using conditional edges in LangGraph—while using Gradio as the interface.Does anyone have suggestions or best practices for handling this type of state management? Any guidance would be greatly appreciated!
2024-12-21T01:09:59Z
To store information on a per-user or per-session basis, it is convenient to use theState component of Gradio(a component that simply stores variables of any type).I have not tried to see how large the data can be, but since it can handle audio and images, it should be able to handle text.gradio.appGradio  DocsGradio docs for using