Qdrant Vector Database Explained: How AI Agents Remember Things
SNBD Host Team
If you have set up an AI agent or read about platforms like OpenClaw or Hermes, you have probably encountered the word "Qdrant." It is described as a "vector database" — which sounds technical, and people often gloss over it without really explaining what it does.
This post explains what Qdrant is, why AI agents need it, what a vector database actually is (with a real analogy), and how to get started with it if you are building your own agent setup.
The Problem: Why AI Agents Forget
Large language models — the AI behind ChatGPT, Claude, and every AI chatbot — work by processing text. You send them a message along with some context, they generate a response. When the conversation is over, nothing is saved. The next time you send a message, the model starts completely fresh.
This is fine for a one-off query. It is a serious problem for a customer service agent that is supposed to know your order history, your past complaints, and the fact that you prefer to be contacted in Bangla rather than English.
AI models have a "context window" — a limit on how much text they can process at once. Even if you stuffed every past conversation into the context window, you would hit the limit quickly. And processing a massive context is slow and expensive.
The solution is a vector database like Qdrant: a system that stores information in a way that lets you quickly retrieve only the relevant pieces when they are needed.
What Is a Vector, and Why Does It Matter?
Here is the key concept, explained without equations.
Imagine you have a map of Dhaka. You can describe any location on that map with two numbers: latitude and longitude. "Gulshan-2" might be (23.7937, 90.4066). "Banani" might be (23.7934, 90.4006). These numbers are a vector — a point in space.
Now: things that are close together on the map have similar coordinates. Gulshan-2 and Banani have nearly identical coordinates because they are neighbours.
AI models can do something similar with text. When you run text through an "embedding model," it converts the text into a list of numbers — a vector — that represents its meaning. Text with similar meanings gets similar vectors.
For example:
- "Where is my delivery?" → vector: [0.23, -0.71, 0.44, ...]
- "What's the status of my order?" → vector: [0.25, -0.69, 0.43, ...]
- "What is your return policy?" → vector: [-0.12, 0.33, -0.67, ...]
The first two questions mean roughly the same thing — their vectors are close together. The third question is completely different — its vector is far away from the others.
A vector database stores these vectors and, crucially, can very quickly find vectors that are close to a query vector. This is called similarity search or nearest-neighbour search.
How Qdrant Gives AI Agents Memory
Here is how it works in practice when an AI agent uses Qdrant:
Storing information
When a customer conversation ends, the key facts from that conversation are embedded (converted to vectors) and stored in Qdrant. Along with the vector, you store the original text and any metadata (customer ID, date, topic).
Over time, Qdrant accumulates thousands of these vectors — representing past conversations, your product catalog, your FAQ, past orders, whatever you have fed it.
Retrieving relevant information
When a new customer message arrives, the AI agent does not just send it to the language model. First, it converts the customer's message into a vector and searches Qdrant for the most similar stored vectors.
If the customer asks "what happened with my delivery last month?", Qdrant returns the past conversation records about their delivery. Those records get included in the context sent to the language model, which can then give an informed answer.
The language model only sees the relevant pieces — not every past conversation. This is efficient, accurate, and fast.
This pattern is called RAG
The technical name for this approach is Retrieval-Augmented Generation (RAG). You retrieve relevant context from a database, then augment the prompt to the language model with that context. It is the core technique behind almost all production AI agents that need to handle specific business knowledge.
Why Qdrant Specifically?
There are several vector databases: Pinecone, Weaviate, Chroma, Milvus, and Qdrant, among others. Qdrant is particularly popular for self-hosted AI agent setups because:
- It is fully open-source. You can run it on your own VPS for free.
- It is written in Rust, which makes it fast and memory-efficient.
- It has a clean REST API and Python/JavaScript clients that work well with common AI frameworks.
- It supports filtering. You can search for similar vectors and filter by metadata — for example, "find conversations similar to this query that belong to customer_id 12345."
- It integrates natively with OpenClaw and LangChain — the most common agent frameworks.
Running Qdrant Yourself
Qdrant runs as a Docker container. On a VPS with Docker installed:
docker pull qdrant/qdrant
docker run -p 6333:6333 -p 6334:6334 -v $(pwd)/qdrant_storage:/qdrant/storage:z qdrant/qdrant
This starts a Qdrant instance accessible on port 6333. The data is stored in a local directory — meaning it persists between container restarts.
Qdrant's web UI is available at http://your-server-ip:6333/dashboard and lets you see your collections, run searches, and inspect stored vectors without writing code.
For a basic AI agent deployment, Qdrant runs comfortably on 1GB RAM with small collections (under 100,000 vectors). Larger collections — millions of stored conversations or a full product catalog — require more RAM and benefit from a dedicated server.
What Goes Into Qdrant for a Customer Service Agent?
For a WhatsApp customer service agent for a Bangladesh e-commerce business, a typical Qdrant setup might store:
- FAQ chunks: Each FAQ entry (question + answer) stored as a vector
- Product catalog entries: Each product's name, description, and specs as a vector
- Past conversation summaries: A short summary of each past customer conversation, tagged with the customer's phone number
- Policy documents: Return policy, shipping terms — chunked into paragraphs, each stored as a vector
When a customer asks a question, Qdrant retrieves the 3–5 most relevant chunks from across all of these collections. The language model receives those chunks as context and generates an accurate, specific answer.
Qdrant in the OpenClaw and Hermes Stack
OpenClaw uses Qdrant as its memory layer out of the box. When you configure an OpenClaw agent, you point it at a Qdrant endpoint and it handles the embedding, storage, and retrieval automatically. You do not need to write any RAG code yourself — the platform handles it.
SNBD HOST Hermes hosting also includes Qdrant in the managed stack. Your Hermes AI agent has persistent memory across conversations without any additional database setup on your part.
If you are building your own custom agent, the qdrant-client Python library and @qdrant/js-client-rest JavaScript package make it straightforward to connect Qdrant to any codebase.
When You Do Not Need Qdrant
Qdrant is not necessary for every AI use case. If you are building a simple FAQ bot where the knowledge base fits entirely within the model's context window (a few thousand words), you can skip the vector database entirely and just include the FAQ in the system prompt.
You need Qdrant when:
- Your knowledge base is large (more than a few hundred KB of text)
- You need the agent to remember facts from past conversations
- You need fast, accurate retrieval from a product catalog or document library
- You are building something with multiple users who each need their own memory
For most production customer service agents, those conditions are all true — which is why Qdrant has become the default memory layer in serious AI agent deployments.
Qdrant Performance and Scaling
Qdrant is designed to stay fast even as your collection grows. It uses approximate nearest-neighbour search algorithms (specifically HNSW — Hierarchical Navigable Small World graphs) that return results in milliseconds even across millions of stored vectors. For context, a typical small-business deployment might have 50,000–200,000 vectors after a year of operation — well within the range where a single-node Qdrant instance on modest hardware performs excellently.
You only need to think about Qdrant scaling when:
- Your collection exceeds several million vectors
- You need high availability (multiple Qdrant nodes for redundancy)
- You are running very high query concurrency — thousands of simultaneous searches per second
For any Bangladesh business-scale deployment, a single Qdrant instance running on the same VPS as your AI agent is sufficient. Qdrant's resource footprint is light — a collection of 500,000 vectors typically requires around 1–2GB RAM.
Security Considerations for Qdrant
By default, Qdrant does not require authentication. If you are running it on a VPS, the dashboard and API are accessible to anyone who can reach port 6333. In production, this is a serious security risk — you do not want competitors or bad actors querying your customer data.
Enable Qdrant's API key authentication in production:
# In your qdrant config.yaml
service:
api_key: "your-strong-random-api-key"
Also use a firewall (UFW or your cloud provider's security groups) to restrict port 6333 access to only the servers that need it — your agent application, nothing else. Never expose Qdrant to the public internet without authentication.