Environment:42 evey Hermes plugins Qdrant
| 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-knowledgemust exist (created by the setup process)
Credentials
The following environment variable must be set:
QDRANT_URL: Base URL of the Qdrant server (e.g.,http://localhost:6333)
For the RAG plugin, also:
EMBED_BASE_URL: Root of an OpenAI-compatible embeddings serverLITELLM_KEYorOPENAI_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.requestHTTP calls — noqdrant-clientpip package needed. - Collection name: Hardcoded to
evey-knowledgeacross all plugins. - Embedding model: Memory-consolidate uses
snowflake-arctic-embed2via Ollama; RAG usesarctic-embedvia an OpenAI-compatible endpoint. Vector dimensions must match the collection's configured size. - Point IDs: Memory-consolidate generates point IDs from
hashlib.md5of 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.