Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:42 evey Hermes plugins Qdrant

From Leeroopedia
Knowledge Sources
Domains Vector_Search, Memory, RAG
Last Updated 2026-10-29 00:00 GMT

Overview

Qdrant vector database for semantic knowledge search and memory embedding storage, accessed via REST API with the evey-knowledge collection.

Description

This environment provides access to a Qdrant vector database instance. The plugins use the REST API to upsert and search vectors in the evey-knowledge collection. The memory-consolidate plugin upserts learned facts as vectors with metadata (source, type, category, content, date). The RAG plugin performs semantic search with optional type filtering and retrieves collection statistics. Both use urllib.request for direct HTTP calls — Hermes's ctx.llm has no embeddings API, so vector operations stay outside the LLM gateway.

Usage

Use this environment for memory consolidation vector upserts (consolidate_daily_memory stores learned facts as vectors) and semantic knowledge search (evey-rag's knowledge_search and knowledge_stats tools). The memory-consolidate plugin requires QDRANT_URL and OLLAMA_URL together for the full pipeline; the RAG plugin requires QDRANT_URL and EMBED_BASE_URL.

System Requirements

Category Requirement Notes
OS Any (HTTP client) Uses urllib.request from stdlib
Hardware Network access to Qdrant server Self-hosted or cloud
Network HTTP/HTTPS to Qdrant 5-30 second timeout per query
Python 3.10+ urllib.request, json, hashlib from stdlib

Dependencies

System Packages

  • None — uses only Python stdlib

Python Packages

  • Python stdlib only: urllib.request, json, hashlib, time

External Services

  • Qdrant instance (self-hosted Docker or cloud) accessible via HTTP/HTTPS
  • Collection evey-knowledge must exist (created by the setup process)

Credentials

The following environment variable must be set:

For the RAG plugin, also:

  • EMBED_BASE_URL: Root of an OpenAI-compatible embeddings server
  • LITELLM_KEY or OPENAI_API_KEY: API key for the embeddings server (if it requires one)

No Qdrant API key is used in the plugin code; access control is configured server-side.

Quick Install

# Self-host Qdrant (Docker):
docker run -d --name qdrant -p 6333:6333 \
  qdrant/qdrant

# Set the environment variable:
export QDRANT_URL="http://localhost:6333"

# Create the evey-knowledge collection:
curl -X PUT "$QDRANT_URL/collections/evey-knowledge" \
  -H "Content-Type: application/json" \
  -d '{"vectors": {"size": 1024, "distance": "Cosine"}}'

# For RAG, also set:
export EMBED_BASE_URL="http://localhost:4000"
export LITELLM_KEY="sk-..."

Code Evidence

Vector upsert from evey-memory-consolidate/__init__.py:173-201:

def _embed_to_qdrant(facts):
    if not QDRANT_URL or not OLLAMA_URL:
        return
    import hashlib
    for i, fact in enumerate(facts.split("\n")):
        if not fact.strip() or not fact.startswith("-"):
            continue
        try:
            data = json.dumps({"model": EMBED_MODEL, "prompt": fact}).encode()
            req = urllib.request.Request(f"{OLLAMA_URL}/api/embeddings", data=data,
                headers={"Content-Type": "application/json"})
            with urllib.request.urlopen(req, timeout=30) as resp:
                vector = json.loads(resp.read())["embedding"]
            point_id = int(hashlib.md5(f"memory:{time.strftime('%Y%m%d')}:{i}".encode()).hexdigest()[:15], 16)
            upsert = json.dumps({"points": [{"id": point_id, "vector": vector, "payload": {
                "source": "memory-consolidation", "type": "learned-fact",
                "category": category, "content": fact_text, "date": time.strftime("%Y-%m-%d"),
            }}]}).encode()
            req = urllib.request.Request(f"{QDRANT_URL}/collections/evey-knowledge/points",
                data=upsert, method="PUT", headers={"Content-Type": "application/json"})
            urllib.request.urlopen(req, timeout=5)
        except Exception:
            pass

Semantic search from evey-rag/__init__.py:74-86:

def _search(vector, limit=5, doc_type=None):
    body = {"vector": vector, "limit": limit, "with_payload": True}
    if doc_type:
        body["filter"] = {"must": [{"key": "type", "match": {"value": doc_type}}]}
    data = json.dumps(body).encode()
    req = urllib.request.Request(
        f"{QDRANT_URL}/collections/{COLLECTION}/points/search",
        data=data, method="POST", headers={"Content-Type": "application/json"},
    )
    with urllib.request.urlopen(req, timeout=15) as resp:
        return json.loads(resp.read())

Common Errors

Error Message Cause Solution
not configured: set QDRANT_URL QDRANT_URL not set Set QDRANT_URL in the agent's environment
Vector upsert silently fails except Exception: pass wraps all errors Check Qdrant server is running and collection exists
not configured: set QDRANT_URL and EMBED_BASE_URL RAG missing both vars Set both QDRANT_URL and EMBED_BASE_URL
collection not found evey-knowledge collection doesn't exist Create it via the Qdrant REST API (see Quick Install)

Compatibility Notes

  • No Qdrant client library: Uses raw urllib.request HTTP calls — no qdrant-client pip package needed.
  • Collection name: Hardcoded to evey-knowledge across all plugins.
  • Embedding model: Memory-consolidate uses snowflake-arctic-embed2 via Ollama; RAG uses arctic-embed via an OpenAI-compatible endpoint. Vector dimensions must match the collection's configured size.
  • Point IDs: Memory-consolidate generates point IDs from hashlib.md5 of date+index; RAG relies on Qdrant's search API.
  • Graceful degradation: If Qdrant is unconfigured, memory-consolidate skips vector upsert; RAG returns an error message.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment