Skip to main content

Conversation Memory

Memory allows your AI agents to maintain context across multiple messages in a conversation, enabling natural multi-turn interactions.

Memory Types

No Memory (Stateless)

Each message is processed independently with no context from previous messages.

Use cases: One-shot tasks like text classification, data extraction, or single-question Q&A.

Conversation Buffer Memory

Stores the last N messages in the conversation. The full message history is sent to the model with each request.

Configuration:

  • Window size — Number of messages to keep (default: 10)
  • Messages beyond the window are dropped (first in, first out)

Use cases: Chat interfaces, multi-turn support conversations, interactive assistants.

Summary Memory

Maintains a running summary of the conversation instead of storing full messages. After each exchange, the summary is updated by the model.

Advantages:

  • Constant token usage regardless of conversation length
  • Captures key facts without hitting context limits

Use cases: Long conversations, complex support tickets, multi-session interactions.

Vector Memory (Long-Term)

Stores conversation fragments as vector embeddings. When a new message arrives, semantically similar past interactions are retrieved and included in the context.

Configuration:

  • Embedding model — OpenAI text-embedding-3-small (default) or other providers
  • Vector store — Built-in or external (Pinecone, Weaviate, Qdrant)
  • Top K — Number of similar memories to retrieve (default: 5)

Use cases: Persistent agents that remember user preferences across sessions, knowledge-intensive assistants.

Configuring Memory

  1. Open your agent in AI Studio
  2. Go to the Memory tab
  3. Select the memory type
  4. Configure type-specific settings
  5. Test in the playground to verify context is maintained

Memory in Workflows

When using AI Agent nodes in the Workflow Builder:

  1. Add a Memory node (e.g., Buffer Memory, Summary Memory)
  2. Connect it to the AI Agent node's memory input
  3. Set a Session ID to identify the conversation (e.g., user ID, ticket ID)
  4. The agent maintains separate memory per session
Webhook Trigger → AI Agent (with Buffer Memory, session={{ $json.userId }}) → Respond

Best Practices

  • Set appropriate window sizes — Too small loses context, too large wastes tokens and money
  • Use session IDs — Ensure each user/conversation has its own memory space
  • Clear memory when appropriate — Reset memory at the start of new support tickets or conversations
  • Monitor token usage — Large memory windows significantly increase API costs