Skip to content
Dashboard

What is agent memory? Building stateful AI agents

Copy link to headingWhy stateless models make memory an engineering problem

Copy link to headingShort-term vs long-term memory

Copy link to headingThe four types of agent memory

Copy link to headingWhen you actually need long-term memory

Copy link to headingWhy bigger context windows don't fix it

Copy link to headingThe write side breaks first

Copy link to headingWhy serverless and stateful agents are mismatched

Copy link to headingPersisting state correctly: UIMessage and ModelMessage

const result = streamText({
model: openai('gpt-4o'),
messages: convertToModelMessages(validatedMessages),
});
return result.toUIMessageStreamResponse({
originalMessages: validatedMessages,
onFinish: ({ messages }) => {
saveChat({ chatId: id, messages });
},
});

Copy link to headingTreating model choice as a cost lever, not an architecture commitment

Copy link to headingAgent memory is a state problem, not a memory problem

Copy link to headingFAQ

Ready to deploy?