How AI Agents Manage Memory and Avoid Forgetfulness