In the example shown below we can see that tool_messages isn't a JSON dict but a string due to it not being JSON serializable.
This is most likely due to State not having a to_dict method. A to_dict method should be added to State so the tool_messages can be represented as a dict in Langfuse.

In the example shown below we can see that
tool_messagesisn't a JSON dict but a string due to it not being JSON serializable.This is most likely due to
Statenot having ato_dictmethod. Ato_dictmethod should be added to State so thetool_messagescan be represented as a dict in Langfuse.