Migrating Memory for the Chat

I have been going through this course with a specific use case in mind, I have started to reproduce the code in my own local Jupyter Notebooks, but when I get to Chat, the code for memory prompts me to review migration documentation, but there is no specific migration docs. Is there a good reference for using the new memory model in langchain, do I need to create an Agent object earlier?

Thanks

Mark