🧵 1/ LLMs are stateless. They don’t remember past interactions. Every prompt is treated as an isolated request. To build actual agents, we need memory. Here’s how to do it using Spring AI and Redis — short-term + long-term memory, fully integrated. (@redis.io)
Post
3/ Short-term memory = the active conversation. It's a list of msgs (user + assistant) that you pass into the LLM. We store it in Redis Lists, reload it on each message, and trim or summarize it to avoid token overflows. In this demo, I reload the chat history from Redis:
0 reposts0 likes