add_history_to_context=True to add the history to the context of the agent.
You can set update_memory_on_run=True to enable user memory generation at the end of each run.
Code
share_memory_and_history_between_agents.py
add_history_to_context=True to add the history to the context of the agent.
You can set update_memory_on_run=True to enable user memory generation at the end of each run.