Chat history is forced into the Memory Agent Prompt #989
Description
Since the agents refactor, Memory Agent is forcing chat history to be inserted in the agent prompt:
core/core/cat/agents/memory_agent.py
Line 27 in f14f2c0
while other variables can be overriden using the before_agent_starts
hook. Chat history is not part of the agent prompt suffix anymore even if it is populated inside the default agent_input
object (using stringify method instead of langchainify):
core/core/cat/agents/main_agent.py
Line 127 in f14f2c0
that value is not used and a comment says to take away in V2, why is that?
Imho chat_history
should be considered at the same level as memories, tool outputs and other custom keys provided in the agent input. If a developer wants to override that using before_agent_starts
hook should be able to do it for chat_history as well.