Environment:42 evey Hermes plugins Ollama
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Embeddings, Memory |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
Ollama local model server providing embedding generation via the /api/embeddings endpoint, using the snowflake-arctic-embed2 model for memory consolidation.
Description
This environment provides access to a local Ollama instance for generating text embeddings. The memory-consolidate plugin uses Ollama to embed learned facts before upserting them as vectors into Qdrant. The embedding request sends {"model": "snowflake-arctic-embed2", "prompt": fact} to {OLLAMA_URL}/api/embeddings and reads the "embedding" field from the response. Ollama must have the snowflake-arctic-embed2 model pulled. This is a direct HTTP call because Hermes's ctx.llm has no embeddings API.
Usage
Use this environment for memory consolidation vector embedding (consolidate_daily_memory embeds facts before storing them in Qdrant). Requires OLLAMA_URL and QDRANT_URL to both be set; if either is missing, the embedding step is silently skipped.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Any (HTTP client) | Ollama runs on Linux/macOS/Windows |
| Hardware | Any CPU/GPU | Embedding models are lightweight; CPU is sufficient |
| Network | HTTP to Ollama server | 30-second timeout for embedding requests |
| Python | 3.10+ | urllib.request, json from stdlib
|
Dependencies
System Packages
- Ollama binary installed and running
Python Packages
- Python stdlib only:
urllib.request,json
External Services
- Ollama server accessible via HTTP at
OLLAMA_URL - Model
snowflake-arctic-embed2pulled:ollama pull snowflake-arctic-embed2
Credentials
The following environment variable must be set:
OLLAMA_URL: Base URL of the Ollama server (e.g.,http://localhost:11434)
No authentication is required by default; Ollama runs without auth on localhost.
Quick Install
# Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh
# Pull the embedding model:
ollama pull snowflake-arctic-embed2
# Set the environment variable:
export OLLAMA_URL="http://localhost:11434"
# Test:
curl "$OLLAMA_URL/api/embeddings" \
-d '{"model":"snowflake-arctic-embed2","prompt":"test embedding"}'
Code Evidence
Embedding request from evey-memory-consolidate/__init__.py:181-185:
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"]
Model and URL config from evey-memory-consolidate/__init__.py:20-23:
QDRANT_URL = os.environ.get("QDRANT_URL", "") # optional with OLLAMA_URL: vector upsert
OLLAMA_URL = os.environ.get("OLLAMA_URL", "")
MEMORY_PATH = Path(os.environ.get("HERMES_HOME", os.path.expanduser("~/.hermes"))) / "memories" / "MEMORY.md"
EMBED_MODEL = "snowflake-arctic-embed2"
Guard clause from evey-memory-consolidate/__init__.py:173-175:
def _embed_to_qdrant(facts):
if not QDRANT_URL or not OLLAMA_URL:
return
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| Vector upsert skipped silently | OLLAMA_URL or QDRANT_URL not set |
Set both env vars; embedding requires both |
model not found |
snowflake-arctic-embed2 not pulled |
Run ollama pull snowflake-arctic-embed2
|
URLError: connection refused |
Ollama server not running | Start Ollama: ollama serve or check OLLAMA_URL
|
| Embedding fails, upsert skipped | All embedding errors wrapped in except Exception: pass |
Check Ollama logs for the specific error |
Compatibility Notes
- No Ollama client library: Uses raw
urllib.requestHTTP calls — noollamapip package needed. - Model name: Hardcoded to
snowflake-arctic-embed2. To use a different embedding model, changeEMBED_MODELin the source and ensure the Qdrant collection's vector size matches. - Paired with Qdrant: Ollama provides embeddings; Qdrant stores them. Both must be configured together for memory consolidation to work.
- Graceful degradation: If Ollama is unconfigured or unreachable, the embedding step is silently skipped — MEMORY.md is still updated, just without vector storage.