Qdrant Memory

Vector store memory for AI agents — stores conversation history in Qdrant and retrieves semantically relevant past context.

When to Use

Use Qdrant Memory when:

  • The agent needs to recall information from conversations that happened days or weeks ago
  • You need semantic search ("find messages where the user talked about billing") rather than just recent messages
  • You are building long-running assistants, knowledge workers, or support agents with persistent context
  • A sliding message window alone is not enough — the agent forgets important context from earlier

For short conversations or prototyping, Window Memory is simpler and has no external dependencies.

Inputs

None. Qdrant Memory is a sub-node — it does not accept data from the main workflow. Connect its Memory output handle to an AI Agent's Memory input handle (dashed purple edge).

Output

None — memory is consumed internally by the connected AI Agent and does not emit data to the main workflow.

Connection Handle

HandleTypeDescription
memorymemoryConnect to an AI Agent's Memory input. Only one memory provider can be connected per agent.

Settings

SettingTypeDefaultDescription
qdrantUrlstringhttp://localhost:6333Qdrant server URL (e.g. http://localhost:6333 or https://your-cluster.qdrant.io). Supports {{ }} bindings.
collectionNamestringtensorify_memoryQdrant collection name. Auto-created on first use if it does not exist.
embeddingModelselecttext-embedding-3-smallOpenAI embedding model for vectorizing messages. Options: text-embedding-3-small (1536d, fast), text-embedding-3-large (3072d, accurate), text-embedding-ada-002 (1536d, legacy).
topKnumber5Number of semantically similar past messages to retrieve.
recentWindownumber4Number of most recent messages to always include for immediate context.
sessionKeystring""Per-user or per-thread scope key. Supports {{ }} bindings, e.g. user:{{ input.body.user_id }}.

Required Secrets

Configure on the Environment Variables page:

VariableRequiredDescription
OPENAI_API_KEYYesOpenAI API key for generating text embeddings. Create one at platform.openai.com/api-keys.
QDRANT_API_KEYNoQdrant API key. Required when your Qdrant instance uses API key authentication (e.g. Qdrant Cloud). See Qdrant authentication docs.

Example

Canvas

Build a support agent with long-term memory:

  1. Add an API Endpoint trigger with openai-chat protocol
  2. Add an AI Agent node with a customer support system prompt
  3. Add a Qdrant Memory node and connect its Memory handle to the agent's Memory handle
  4. Configure Qdrant Memory:
    • Qdrant URL: your Qdrant Cloud cluster URL
    • Collection Name: tensorify_memory
    • Embedding Model: text-embedding-3-small
    • Top K: 5
    • Recent Window: 4
    • Session Key: customer:{{ "{{ api_request.body.customer_id }}" }}
  5. Add OPENAI_API_KEY (and QDRANT_API_KEY if using Qdrant Cloud) to Environment Variables
  6. Connect the agent's response output to a Return node

The agent remembers recent messages and recalls semantically relevant past interactions — even if the customer has not contacted you in weeks.

Hybrid retrieval: On each message, Qdrant Memory returns the recentWindow most recent messages plus up to topK semantically similar older messages (deduplicated). New user and assistant messages are embedded and stored in Qdrant after each turn.

TSL

import api from @tensorify/api-trigger:1.0.0
import agent from @tensorify/ai-agent:1.0.0
import memory from @tensorify/memory-qdrant:1.0.0
import respond from @tensorify/return:3.0.0

node api @tensorify/api-trigger:1.0.0 {
    path = "/v1"
    method = "POST"
    responseMode = "use-workflow-response"
    protocol = "openai-chat"
}

node agent @tensorify/ai-agent:1.0.0 {
    provider = "openai"
    model = "gpt-4o"
    systemPrompt = "You are a helpful customer support agent."
}

node memory @tensorify/memory-qdrant:1.0.0 {
    qdrantUrl = "https://your-cluster.qdrant.io"
    collectionName = "tensorify_memory"
    embeddingModel = "text-embedding-3-small"
    topK = 5
    recentWindow = 4
    sessionKey = "customer:{{ api_request.body.customer_id }}"
}

node respond @tensorify/return:3.0.0 {
    returnMode = "simple"
}

api.payload -> agent.message
memory.memory -> agent.memory
agent.response -> respond.input

Common Gotchas

  • Qdrant must be reachable: The plugin connects to Qdrant via HTTP. If the server is unreachable, memory load/save fails and the agent runs without conversation context.
  • Embedding costs: Every load() and save() call makes OpenAI embedding API requests. With text-embedding-3-small, this is very affordable (~$0.02 per million tokens).
  • Collection auto-creation: The collection is created automatically on first use with vector dimensions matching your chosen embedding model.
  • Session key in production: Without a sessionKey, all users share the same memory space. Always set a session key in production.
  • Embedding model changes: Switching embeddingModel after data is stored requires a new collection — vector dimensions differ between models.
  • Only one memory provider: An agent accepts a single memory connection. You cannot combine Qdrant Memory and Window Memory on the same agent.

See Also

On this page