How to manage long-term memory for AI agents with Synap and Vercel AI SDK