Transformers Agent Chat State

Experimenting with Transformer Agent – specifically running the colab notebook.

When using chat mode (i.e., agent.chat), when is agent.chat_state updated? Traced through the source code and can’t seem to find when this internal state is updated to include the result of the last tool result. Specifically, the chat function is pretty straightforward and directly returns the result of the evaluate call.

In the Colab notebook, there is a series of prompts demonstrating chat mode. After each chat call, if we examine agent.chat_state, we can see that it contains the results of the last tool call.