liveBook · Manning

QdrantMemoryStore

As explained in Build a Multi-Agent System (from Scratch)

QdrantMemoryStore is a book-specific memory-store backend that indexes and retrieves episodes using Qdrant.

QdrantMemoryStore implements BaseMemoryStore for episodic memory backed by a Qdrant collection. It embeds episodes and queries in the same vector space, then retrieves episodes by similarity; smaller embedding-space distances indicate greater similarity. section 7.3.2

Its main configuration and flow are:

  • Configure the collection, embedding model, client, maximum results, recall mode, and episode key function. section 7.3.2
  • write() ensures the collection exists, derives text from the episode, and upserts its Qdrant point. section 7.3.2
  • _search() queries Qdrant with embedded query text and returns up to max_results episodes. section 7.3.2

Recall a related Hailstone episode

With max_results=1, recalling “Hailstone sequence starting from 6” returns the stored episode for a task starting from 6, including its result and step metadata. section 7.3.2

Figure 7.5 Recording an Episode as a point in the embedding space and recalling the most similar Episode objects to a given query

See how an episode and query are represented in embedding space to find similar episodes. section 7.3.2

How Build a Multi-Agent System (from Scratch) covers it

How deep it goes
Describes configuration, episode persistence, and bounded similarity queries through Qdrant.
Examples
Demonstrates recalling a stored Hailstone-sequence episode using a similar task query.
What you can do after
Apply it via Qdrant's Python client to persist episodes and retrieve similar tasks.
How it connects
Connects episodic memory to embeddings, semantic search, Qdrant, and the BaseMemoryStore interface.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Multi-Agent System (from Scratch). The section links point to the parts of the book it draws on.