Make `StateGraph` and `CompiledStateGraph` more type safe
Subgraph state update contains the entire CompiledStateGraph in it which is not serializable for the astream events
Copy of CompiledStateGraph request mandatory to explicit "update={}"
How to add an Agent in a LangGraph as a node? Specifically agent created out of create_sql_agent
Videos
I am trying to use the helper method create_sql_agent to create an agent and add it in a simple graph to create a database team. I tried to see if SQL tutorial can be repurposed.
The graph structure that I wanted to design is very simple. A supervisor that delegates to a SQL Team.
I tried following https://python.langchain.com/v0.2/docs/tutorials/sql_qa/#agents as suggested by u/hwchase17 for one of the previous question. However, it uses the AgentExecutor instead of using langgraph as Agent Executor.
There are examples of connecting to SQL database in the customer support chat bot tutorial. How we are not able to leverage the advantages that we get by using an SQL Agent namely:
-
Recovering from errors and regenerating query correctly.
-
Querying database multiple times.
-
Save Tokens by looking into schema etc.
If there are any notebooks or code that you could point to that would be great.
I started learning LangGraph for the promise of composing and using agents. If this is not doable with critical agents like SQL Database, then that defeats the purpose. Also that AgentExecutor is deprecated, it would be great if some of these tutorials are updated to use LangGraph as AgentExecutor / ChatExecutor.