360 Secure SkillHub
360 安全技能中心

OpenClaw Ollama Memory

核心功能:为OpenClaw替换云端嵌入API,通过本地Ollama运行nomic-embed-text模型,实现语义记忆搜索。典型场景:需要私密、离线记忆检索,不愿使用付费云服务的OpenClaw用户。需先安装Ollama并拉取模型,配置OpenClaw参数后重启,无需API密钥,全程本地运行。

djc00p
djc00p
热度 66.38
最近更新 2026-05-11 17:38:03
分类:开发依赖:纯提示词应用场景:API 集成 / DevOps / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add openclaw-ollama-memory
Metadata
name
openclaw-ollama-memory
description
Set up local semantic memory search in OpenClaw using Ollama + nomic-embed-text. Free, private, offline-capable. Replaces cloud embedding APIs (OpenAI, Gemini) with a locally-running model. Trigger phrases: ollama memory, local embeddings, private memory search, offline memory, free embeddings, nomic-embed-text.
metadata
{"clawdbot":{"emoji":"🧠","requires":{"bins":["ollama","curl"]},"os":["linux","darwin","win32"]}}

OpenClaw Ollama Memory

Local semantic memory search for OpenClaw using Ollama — free, private, no API key required.

Quick Start

1. Install & Run Ollama

Download from https://ollama.ai, then pull the embedding model:

ollama pull nomic-embed-text

Verify Ollama is running:

curl http://127.0.0.1:11434/api/tags

2. Configure OpenClaw

Edit ~/.openclaw/openclaw.json and add under agents.defaults.memorySearch:

{
  "agents": {
    "defaults": {
      "memorySearch": {
        "provider": "ollama",
        "model": "nomic-embed-text:latest",
        "remote": {
          "baseUrl": "http://127.0.0.1:11434"
        }
      }
    }
  }
}

3. Restart OpenClaw

openclaw gateway restart

Key Points

  • Ollama must be explicit — use provider: "ollama", not "openai". OpenClaw doesn't auto-detect Ollama.
  • No API key needed — runs locally, fully offline.
  • nomic-embed-text — 274MB model, fast, accurate, free.
  • baseUrl format — http://127.0.0.1:11434 (no /v1 suffix, no trailing slash).

Next Steps

  • See references/config-reference.md for advanced tuning (hybrid search, MMR, temporal decay, extra paths).
  • See references/troubleshooting.md for common errors and fixes.