Skip to content
Discussion options

You must be logged in to vote

Based on the information you've provided and the context from similar issues in the LangChain JS repository, it seems like the agent is not correctly incorporating the observations from the tool calls into its decision-making process. This could be causing the agent to repeatedly call the same tool without using the observation for the final response.

From the Agent stuck in a loop because agent_scratchpad is not serialized properly when using createOpenAIToolsAgent issue, it was suggested to ensure that any object that needs to be converted to a string for logging, concatenation, or any other purpose is properly serialized using JSON.stringify or handled in a way that correctly represen…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jongelderloos
Comment options

Answer selected by jongelderloos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant