-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Problem
Serialization error occurred inside agent's invoke function created by create_agent.
I found function _dump_checkpoint in checkpoint\redis\base.py does not handle the case when the value is not byte type. (line 321).
I also checked #128. But, it was not working for me. Name of the node has no problem.
Situation
I'm calling create_agent inside graph and calling invoke right after creation.
I set checkpointer on graph, but not to create_agent.
My graph has 3 nodes. (agent_node, custom_tool_node, response_node).
create_agent is called inside response_node.
Error occurred when I set custom tool_node like below. Error does not occur when I removed wrap_tool_call.
def wrap_tool_call(
request: ToolCallRequest, handler: Callable[[ToolCallRequest], ToolMessage | Command]
) -> ToolMessage | Command:
request.runtime.state = tool_state # Typed Dict
return handler(request)
tool_node = ToolNode(
[tool], wrap_tool_call=wrap_tool_call
)
response = tool_node.invoke([tool_call], runtime=runtime)Package Info
"langchain==1.2.0",
"langgraph-checkpoint-redis==0.3.1",
"langchain-mcp-adapters==0.2.1",
"langgraph==1.0.5",
The error occurred at also langgraph-checkpoint-redis v0.2.1
Metadata
Metadata
Assignees
Labels
No labels