Hello! The sessions UX/UI where you see the messages under an unique session ID like a chat, only supports AI and Human/User messages display? If you have an API that can also return tool_call or tool_response, those type of messages are not being directly supported and I need to implement something custom?
馃挕聽Hint: Mention RunLLM in the thread for followups.
I'm talking about the "sessions" view, we have a multi-turn api which allow the client execute the tools in their side, so our agent just ends with the tool call messages, and wait till the client return to him again with the tool result:
Hi Brais. My understanding is that you are looking for a way to segment the API calls traces within the session. I'm a bit confused because you mentioned that the client/user is executing the tools on their side, and then simply relaying the tool result back to the agent. So the tool/API calls itself are not being traced, as its not part of your application, but just the client running it on their side. If you would like to segment tool response messages from the client, you can wrap those messages like this: with using_user("API responses"): send_to_agent("search_product: success")
We have an agent created through the langchain prebuilt component "create_agent" (from langchain 1.0.0) with a middleware that stops the execution when the agent decide to call a tool, with N args. Then the client is on charge to execute that tool locally and come back with the tool response to continue the execution
