openclaw - ✅(Solved) Fix `memorySearch provider: "local"` fails with "Unknown memory embedding provider: local" but capability embedding path works [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#72875Fetched 2026-04-28 06:31:04
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
cross-referenced ×1referenced ×1subscribed ×1

memorySearch.provider = "local" appears to be a supported memory embedding configuration, but the memory CLI/runtime path can fail with:

Unknown memory embedding provider: local

The same local provider works through the embedding capability CLI, so this may be a provider-registration difference between the capability path and the memory runtime path.

Error Message

Error: Unknown memory embedding provider: local at getAdapter (.../dist/manager-.js) at createEmbeddingProvider (.../dist/manager-.js) at MemoryIndexManager.loadProviderResult (.../dist/manager-.js) at MemoryIndexManager.ensureProviderInitialized (.../dist/manager-.js) at MemoryIndexManager.probeVectorAvailability (.../dist/manager-*.js) at openclaw memory status --deep

Root Cause

memorySearch.provider = "local" appears to be a supported memory embedding configuration, but the memory CLI/runtime path can fail with:

Unknown memory embedding provider: local

The same local provider works through the embedding capability CLI, so this may be a provider-registration difference between the capability path and the memory runtime path.

Fix Action

Fix / Workaround

I understand installed dist files are built output and are not the correct PR target. I am mentioning this only to identify the suspected missing registration step, not as the proposed source patch.

Notes

  • If this has already been fixed after 2026.4.23, which release contains the fix?
  • If main expects a different initialization path, guidance on the correct source patch location would be appreciated.

PR fix notes

PR #72937: fix(memory): register built-in memory embedding providers before manager init (#72875)

Description (problem / solution / changelog)

Fixes #72875

Summary

  • Problem: The memory runtime path throws an Unknown memory embedding provider: local error, breaking memory sync and status checks.
  • Why it matters: Completely blocks the normal usage of local memory features.
  • What changed: Added explicit lazy registration logic (calling registerBuiltInMemoryEmbeddingProviders) before MemoryIndexManager initializes the provider, aligning it with the capability CLI path.
  • What did NOT change (scope boundary): Capability CLI path and other unrelated modules remain untouched.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #72875
  • Related #
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: MemoryIndexManager called createEmbeddingProvider without ensuring built-in providers were registered in the registry, unlike the CLI path.
  • Missing detection / guardrail: Lack of pre-check for registry state and auto-registration mechanism.
  • Contributing context (if known): N/A

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Existing coverage already sufficient
    • Unit test
    • Seam / integration test
    • End-to-end test
  • Target test or file: N/A
  • Scenario the test should lock in: N/A
  • Why this is the smallest reliable guardrail: N/A
  • Existing test that already covers this (if any): N/A
  • If no new test is added, why not: This was a missing initialization step in the runtime bootstrap sequence. Static analysis (pnpm check:changed typecheck/lint) confirms type safety and existing unit tests cover the provider registration mechanisms.

User-visible / Behavior Changes

None. (The memory feature simply works as originally intended instead of crashing).

Diagram (if applicable)

N/A

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation: N/A

Repro + Verification

Environment

  • OS: WSL (Ubuntu on Windows)
  • Runtime/container: Node.js / pnpm

Steps

  1. Run memory status check or trigger memory sync in the runtime path.
  2. Observe the error before the fix.

Expected

Memory operations complete successfully without throwing Unknown memory embedding provider: local.

Actual

(Before fix) Throws Unknown memory embedding provider: local. (After fix) Executes successfully.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

  • Verified scenarios: Ran pnpm check:changed locally — all typechecks (core, extensions, tests) passed, linting passed with 0 warnings/errors, no import cycles detected.
  • Edge cases checked: N/A
  • What you did not verify: Manual end-to-end UI testing (relying on CI and local static checks).

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (No)
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

None.

Changed files

  • extensions/memory-core/src/memory/manager.ts (modified, +2/-0)
  • extensions/memory-core/src/memory/provider-adapters.ts (modified, +4/-0)
  • src/memory-host-sdk/engine-embeddings.ts (modified, +1/-0)

Code Example

Unknown memory embedding provider: local

---

{
  "agents": {
    "defaults": {
      "memorySearch": {
        "enabled": true,
        "sources": ["memory"],
        "provider": "local",
        "fallback": "none",
        "local": {
          "modelPath": "/path/to/model.gguf",
          "modelCacheDir": "/path/to/model-cache"
        },
        "store": {
          "driver": "sqlite",
          "path": "/path/to/memory/{agentId}.sqlite",
          "vector": {
            "enabled": true
          }
        }
      }
    }
  }
}

---

src/config/schema.base.generated.ts:4275-4279
provider: {
  type: "string",
  title: "Memory Search Provider",
  description:
    'Selects the embedding backend used to build/query memory vectors: "openai", "gemini", "voyage", "mistral", "bedrock", "lmstudio", "ollama", or "local". Keep your most reliable provider here and configure fallback for resilience.',
}

---

src/config/schema.base.generated.ts:4457-4464
local: {
  type: "object",
  properties: {
    modelPath: {
      type: "string",
      title: "Local Embedding Model Path",
      description:
        "Specifies the local embedding model source for local memory search, such as a GGUF file path or `hf:` URI. Use this only when provider is `local`, and verify model compatibility before large index rebuilds.",
    },

---

extensions/memory-core/src/memory/provider-adapters.ts:87-115
const localAdapter: MemoryEmbeddingProviderAdapter = {
  id: "local",
  defaultModel: DEFAULT_LOCAL_MODEL,
  transport: "local",
  autoSelectPriority: 10,
  ...
};

export const builtinMemoryEmbeddingProviderAdapters = [localAdapter] as const;

---

extensions/memory-core/src/memory/provider-adapters.ts:125-135
export function registerBuiltInMemoryEmbeddingProviders(register: {
  registerMemoryEmbeddingProvider: (adapter: MemoryEmbeddingProviderAdapter) => void;
}): void {
  ...
  register.registerMemoryEmbeddingProvider(adapter);
}

---

openclaw memory status --deep

---

Unknown memory embedding provider: local

---

Error: Unknown memory embedding provider: local
    at getAdapter (.../dist/manager-*.js)
    at createEmbeddingProvider (.../dist/manager-*.js)
    at MemoryIndexManager.loadProviderResult (.../dist/manager-*.js)
    at MemoryIndexManager.ensureProviderInitialized (.../dist/manager-*.js)
    at MemoryIndexManager.probeVectorAvailability (.../dist/manager-*.js)
    at openclaw memory status --deep

---

{
  "agents": {
    "defaults": {
      "memorySearch": {
        "enabled": false
      }
    }
  }
}

---

openclaw config validate
openclaw memory status --deep

---

openclaw capability embedding providers --json

---

[
  {
    "available": true,
    "id": "local",
    "transport": "local",
    "autoSelectPriority": 10
  }
]

---

openclaw capability embedding create --provider local --text "ping" --json

---

{
  "ok": true,
  "provider": "local",
  "dimensions": 768
}

---

src/cli/capability-cli.ts:1356
ensureMemoryEmbeddingProvidersRegistered();

src/cli/capability-cli.ts:1388-1394
function ensureMemoryEmbeddingProvidersRegistered(): void {
  if (listMemoryEmbeddingProviders().length > 0) {
    return;
  }
  registerBuiltInMemoryEmbeddingProviders({
    registerMemoryEmbeddingProvider,
  });
}

---

extensions/memory-core/src/memory/manager.ts:156-165
private static async loadProviderResult(...) {
  return await createEmbeddingProvider({
    config: params.cfg,
    agentDir: resolveAgentDir(params.cfg, params.agentId),
    ...resolveMemoryPrimaryProviderRequest({ settings: params.settings }),
  });
}

---

extensions/memory-core/manager-runtime.ts:1
export { closeAllMemoryIndexManagers, MemoryIndexManager } from "./src/memory/manager-runtime.js";

---

extensions/memory-core/index.ts:30
registerBuiltInMemoryEmbeddingProviders(api);
RAW_BUFFERClick to expand / collapse

Summary

memorySearch.provider = "local" appears to be a supported memory embedding configuration, but the memory CLI/runtime path can fail with:

Unknown memory embedding provider: local

The same local provider works through the embedding capability CLI, so this may be a provider-registration difference between the capability path and the memory runtime path.

Impact

This prevents enabling local memory search with a local GGUF embedding model. In my setup, disabling agents.defaults.memorySearch.enabled restores normal gateway/CLI health, but leaves semantic memory search disabled.

Environment where reproduced

  • OpenClaw package version: 2026.4.23
  • Node: 22.22.0
  • Install method: global npm install
  • Memory store: SQLite-backed memory search with vector enabled
  • Local embedding model: GGUF embedding model

I also inspected latest source main before filing this:

  • Repository: openclaw/openclaw
  • main commit inspected: 3120401f
  • package.json version on main: 2026.4.26

The latest source still appears to have the same registration split described below, but I have not yet run a full source build/reproduction on main.

Relevant sanitized config

{
  "agents": {
    "defaults": {
      "memorySearch": {
        "enabled": true,
        "sources": ["memory"],
        "provider": "local",
        "fallback": "none",
        "local": {
          "modelPath": "/path/to/model.gguf",
          "modelCacheDir": "/path/to/model-cache"
        },
        "store": {
          "driver": "sqlite",
          "path": "/path/to/memory/{agentId}.sqlite",
          "vector": {
            "enabled": true
          }
        }
      }
    }
  }
}

Why local appears supported

I am not assuming this only from behavior; here is the source/schema evidence I found.

On latest source main (3120401f, package version 2026.4.26):

The line references below are from my local checkout of main at commit 3120401f; they may shift on newer commits.

  1. The generated config schema lists local as a memory search provider:
src/config/schema.base.generated.ts:4275-4279
provider: {
  type: "string",
  title: "Memory Search Provider",
  description:
    'Selects the embedding backend used to build/query memory vectors: "openai", "gemini", "voyage", "mistral", "bedrock", "lmstudio", "ollama", or "local". Keep your most reliable provider here and configure fallback for resilience.',
}
  1. The schema says local.modelPath accepts a GGUF path or hf: URI:
src/config/schema.base.generated.ts:4457-4464
local: {
  type: "object",
  properties: {
    modelPath: {
      type: "string",
      title: "Local Embedding Model Path",
      description:
        "Specifies the local embedding model source for local memory search, such as a GGUF file path or `hf:` URI. Use this only when provider is `local`, and verify model compatibility before large index rebuilds.",
    },
  1. The memory-core source defines a built-in local adapter:
extensions/memory-core/src/memory/provider-adapters.ts:87-115
const localAdapter: MemoryEmbeddingProviderAdapter = {
  id: "local",
  defaultModel: DEFAULT_LOCAL_MODEL,
  transport: "local",
  autoSelectPriority: 10,
  ...
};

export const builtinMemoryEmbeddingProviderAdapters = [localAdapter] as const;
  1. The memory-core source exposes a built-in provider registration helper:
extensions/memory-core/src/memory/provider-adapters.ts:125-135
export function registerBuiltInMemoryEmbeddingProviders(register: {
  registerMemoryEmbeddingProvider: (adapter: MemoryEmbeddingProviderAdapter) => void;
}): void {
  ...
  register.registerMemoryEmbeddingProvider(adapter);
}

Actual behavior

With memory search enabled and provider = "local", this command triggers the failure:

openclaw memory status --deep

The memory runtime/CLI initialization fails with:

Unknown memory embedding provider: local

Sanitized stack shape from the installed 2026.4.23 package:

Error: Unknown memory embedding provider: local
    at getAdapter (.../dist/manager-*.js)
    at createEmbeddingProvider (.../dist/manager-*.js)
    at MemoryIndexManager.loadProviderResult (.../dist/manager-*.js)
    at MemoryIndexManager.ensureProviderInitialized (.../dist/manager-*.js)
    at MemoryIndexManager.probeVectorAvailability (.../dist/manager-*.js)
    at openclaw memory status --deep

Disabling memory search avoids the error:

{
  "agents": {
    "defaults": {
      "memorySearch": {
        "enabled": false
      }
    }
  }
}

Expected behavior

If local is a supported memory embedding provider and a valid local model path is configured, memory CLI/runtime commands that initialize memory search should not throw Unknown memory embedding provider: local.

For example:

openclaw config validate
openclaw memory status --deep

should either report local embedding readiness or a local runtime/model setup error, not an unknown provider error.

Evidence that local embeddings work through another path

The local provider is visible and usable through the capability embedding path in the installed package:

openclaw capability embedding providers --json

Sanitized result shape:

[
  {
    "available": true,
    "id": "local",
    "transport": "local",
    "autoSelectPriority": 10
  }
]

And:

openclaw capability embedding create --provider local --text "ping" --json

Sanitized result shape:

{
  "ok": true,
  "provider": "local",
  "dimensions": 768
}

Suspected cause

The capability embedding CLI path explicitly registers built-in memory embedding providers before creating embeddings:

src/cli/capability-cli.ts:1356
ensureMemoryEmbeddingProvidersRegistered();

src/cli/capability-cli.ts:1388-1394
function ensureMemoryEmbeddingProvidersRegistered(): void {
  if (listMemoryEmbeddingProviders().length > 0) {
    return;
  }
  registerBuiltInMemoryEmbeddingProviders({
    registerMemoryEmbeddingProvider,
  });
}

The memory manager path appears to create the embedding provider without an equivalent built-in registration step:

extensions/memory-core/src/memory/manager.ts:156-165
private static async loadProviderResult(...) {
  return await createEmbeddingProvider({
    config: params.cfg,
    agentDir: resolveAgentDir(params.cfg, params.agentId),
    ...resolveMemoryPrimaryProviderRequest({ settings: params.settings }),
  });
}

The latest source main manager runtime entrypoint is only a re-export:

extensions/memory-core/manager-runtime.ts:1
export { closeAllMemoryIndexManagers, MemoryIndexManager } from "./src/memory/manager-runtime.js";

The memory-core plugin entry does register built-ins during plugin registration:

extensions/memory-core/index.ts:30
registerBuiltInMemoryEmbeddingProviders(api);

But the memory CLI/runtime path that dynamically loads the memory manager seems able to run without that plugin registration having populated the memory embedding provider registry.

Diagnostic-only local proof

As a diagnostic experiment only, registering built-in memory embedding providers before creating/using MemoryIndexManager allowed the memory manager to resolve provider: "local" in an isolated test.

I understand installed dist files are built output and are not the correct PR target. I am mentioning this only to identify the suspected missing registration step, not as the proposed source patch.

Suggested direction

Please confirm the intended architecture for memory embedding provider registration in CLI/runtime paths.

If the analysis is correct, a source-level fix could register built-in memory embedding providers before memory manager/provider initialization in the memory CLI/runtime path, or centralize registration so capability and memory runtime paths behave consistently.

A regression test would be useful for:

  • memory search enabled,
  • provider: "local",
  • local/built-in provider registry available,
  • expected: no Unknown memory embedding provider: local when memory status/provider initialization runs.

Notes

  • If this has already been fixed after 2026.4.23, which release contains the fix?
  • If main expects a different initialization path, guidance on the correct source patch location would be appreciated.

extent analysis

TL;DR

The issue can be resolved by registering built-in memory embedding providers before initializing the memory manager in the memory CLI/runtime path.

Guidance

  • Review the memory CLI/runtime path to ensure built-in memory embedding providers are registered before creating the MemoryIndexManager.
  • Verify that the registerBuiltInMemoryEmbeddingProviders function is called before the loadProviderResult method in the memory manager.
  • Consider centralizing the registration of built-in memory embedding providers to ensure consistency between the capability and memory runtime paths.
  • Create a regression test to validate that the Unknown memory embedding provider: local error is resolved when memory search is enabled and the local provider is configured.

Example

No code snippet is provided as the issue requires a review of the existing codebase and registration flow.

Notes

The issue appears to be related to the registration of built-in memory embedding providers in the memory CLI/runtime path. The capability embedding CLI path explicitly registers these providers, but the memory manager path does not. The suggested direction is to register these providers before initializing the memory manager.

Recommendation

Apply a workaround by registering built-in memory embedding providers before initializing the memory manager, as this is the most direct way to resolve the issue. If a fix is available in a later release, upgrading to that release may also resolve the issue. However, without further information on the release containing the fix, applying the workaround is the recommended course of action.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

If local is a supported memory embedding provider and a valid local model path is configured, memory CLI/runtime commands that initialize memory search should not throw Unknown memory embedding provider: local.

For example:

openclaw config validate
openclaw memory status --deep

should either report local embedding readiness or a local runtime/model setup error, not an unknown provider error.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix `memorySearch provider: "local"` fails with "Unknown memory embedding provider: local" but capability embedding path works [1 pull requests, 1 participants]