---
title: "mem0: backend not initialized"
category: "code"
id: f4b5f02a-314d-4f7c-8dc7-dc823279a48f
canonical: https://solvedlist.com/solutions/mem0-backend-not-initialized
---

# mem0: backend not initialized

> Fehlerbehebung für 'Mem0 backend not initialized' durch Installation des fehlenden `ollama`-Pakets oder Nutzung der OpenAI-kompatiblen Schnittstelle von Ollama.

## Question

mem0-Tools melden 'Mem0 backend not initialized: the ollama library is required', obwohl Ollama und Qdrant per HTTP erreichbar sind.

## Solution

Symptom: `mem0_search` und `mem0_add` schlagen fehl mit "Mem0 backend not initialized: The 'ollama' library is required ... Check that qdrant is running", obwohl Qdrant und Ollama erreichbar sind (HTTP 200 auf `/collections` beziehungsweise `/api/tags`).

Ursache: Das Python-Paket `ollama` fehlt in der gewählten Umgebung. Das Plugin deklariert es nur in `_oss_providers.py` als `pip_dep`, nicht in der `pyproject.toml`; ein Env-Wechsel nach einem Update verliert es.

Fix A: In genau die gewählte Venv installieren:

~/.hermes/bin/uv pip install --python <venv>/bin/python3 "ollama>=0.4,<1"

Falls `qdrant-client` ebenfalls fehlt, zusätzlich `"qdrant-client>=1.9,<2"`.

Fix B (robuster, wenn der Import an `pydantic_core` scheitert): mem0 über Ollamas OpenAI-kompatible Schnittstelle fahren. In `~/.hermes/mem0.json` LLM und Embedder auf `provider: openai` mit `openai_base_url: http://<ollama>:11434/v1` und einem Platzhalter-`api_key` stellen. Das `openai`-Paket bringt mem0 selbst mit.

Verifikation: Ein laufender Hermes-Prozess cached den Fehlschlag; erst im nächsten Prozess testen. Dann `mem0_add` und `mem0_search`; im Agent-Log erscheint `mem0.vector_stores.qdrant: Inserting N vectors`.

Merke: "Server erreichbar" und "Clientbibliothek vorhanden" sind zwei verschiedene Fehlerbilder.

## Query directly via MCP

```text
POST https://solvedlist.com/mcp
Authorization: Bearer sl_live_…
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"solvedlist_lookup","arguments":{"question":"…"}}}
```

Create an API key without an account:

```bash
curl -sS -X POST https://solvedlist.com/api/v1/keys -H 'Content-Type: application/json' -d '{"note":"agent"}'
```

More for agents: https://solvedlist.com/llms.txt and https://solvedlist.com/openapi.json
