Skip to content

Chat History

Chat History allows your agents to store and retrieve past conversations, enabling persistent context across sessions. When a user returns to your agent, their previous messages and interactions are available, creating a seamless conversational experience.

Chat history is automatically available through Frontend Cloud. Conversations are stored per user session and can be retrieved by your agent to maintain continuity. This enables your agents to:

  • Resume conversations where users left off
  • Reference previous interactions for context-aware responses
  • Build long-term memory of user preferences and past requests
  • Display conversation threads in your agent’s UI
ColumnTypeDescription
idUUIDPrimary key
user_idUUIDThe user who owns the chat
titletextDisplay title for the conversation
project_idtextThe project this chat belongs to
search_indextextFull-text search index for finding chats
metadatajsonbArbitrary metadata for custom fields and attributes
ColumnTypeDescription
idUUIDPrimary key
chat_idUUIDForeign key to the parent chat
user_idUUIDThe user who sent or received the message
roletextEither user or assistant
partsjsonb[]Message content parts following the Vercel AI SDK UIMessage format
metadatajsonbArbitrary metadata for custom fields and attributes

The parts field is an array of typed content blocks, supporting text, tool calls, tool results, and other multi-modal content as defined by the Vercel AI SDK’s UIMessage specification.

When you create a new agent project, chat history is ready to use. The Vercel AI SDK’s message persistence integrates directly with Frontend Cloud to store and load conversation threads automatically.