Skip to main content

How Conversations Work

Conversations are stored as conversation memories. Create one with kind="conversation" and a messages list, then append more messages to the same memory_id over time.
  • kind="conversation": Marks the memory as a conversation (set on memories.create).
  • messages: A list of message objects, each with role (user, assistant, or system) and content.
  • memory_id: The id returned from memories.create(). Pass it as the first argument to memories.append() to add more messages.
Conversation memories contain the full message history. See Core Concepts for the memory/source model.

Creating and Adding Messages

Retrieving Conversations

Use memories.list() to retrieve conversations with their message chunks, or memories.retrieve() for a single conversation.

Next Steps