#13045: feat(doctor): add memory search embeddings provider health check
docs
commands
stale
Cluster:
Doctor and Memory Health Checks
## Summary
Adds diagnostic check in `openclaw doctor` to warn when memory search is enabled but no embeddings provider is configured.
## Problem (Issue #13027)
Users were experiencing silent memory recall failures because:
- Memory search was enabled by default
- No embeddings provider was configured (no API keys, no local model)
- The failure mode was subtle - agent simply couldn't recall from MEMORY.md
- Users blamed "AI forgot" instead of configuration issue
- No prominent warning during setup or at runtime
## Solution
Added `noteMemorySearchHealth()` check in doctor command that:
- Detects when memorySearch is enabled (or default enabled)
- Validates provider-specific requirements:
- `auto`: checks for any available provider (OpenAI/Gemini/Voyage API keys or local model path)
- `openai`: validates OPENAI_API_KEY
- `gemini`: validates GEMINI_API_KEY
- `voyage`: validates VOYAGE_API_KEY
- `local`: validates model path is configured
- Provides actionable fix suggestions for each scenario
- References `openclaw memory status --deep` for verification
## Changes
- **src/commands/doctor-memory.ts** (new): Memory search health check logic
- **src/commands/doctor.ts**: Added call to `noteMemorySearchHealth()`
- **src/commands/doctor-memory.test.ts** (new): 14 comprehensive tests
## Testing
```bash
pnpm test doctor-memory
# ✓ 14 tests passing
```
Test coverage:
- Disabled memory search (no warning)
- Auto provider with/without API keys
- Specific providers with/without credentials
- Empty/whitespace model paths
- Implicit enabled state
## Example Output
When memory search is enabled but no provider is configured:
```
⚠️ Memory search is enabled but no embeddings provider is configured.
Memory search requires semantic embeddings to work. Without a provider,
the memory_search tool will fail and your agent cannot recall information
from MEMORY.md or memory/*.md files.
Fix options (choose one):
1. Use OpenAI (recommended for most users):
export OPENAI_API_KEY="sk-..."
Or run: openclaw configure
2. Use Google Gemini (free tier available):
export GEMINI_API_KEY="..."
Or run: openclaw onboard --auth-choice gemini-api-key
[... more options ...]
```
## Related
Closes #13027
---
This surfaces configuration issues early (during `openclaw doctor`) rather than at runtime when memory recall silently fails.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a new `noteMemorySearchHealth()` diagnostic that runs during `openclaw doctor` to warn when memory search is enabled but no embeddings provider appears to be configured (no relevant API keys and no local model path). It also adds a redirect entry in `docs/docs.json` and includes a Vitest suite covering common provider/config combinations.
The core change is wired into `src/commands/doctor.ts` so the warning is surfaced early during `doctor`, before users hit silent recall failures at runtime.
<h3>Confidence Score: 3/5</h3>
- This PR is mostly safe to merge, but the new tests’ env handling and the doctor warning gating should be adjusted to avoid flaky tests and false-positive warnings.
- Core implementation is straightforward and localized, but the Vitest suite reassigns `process.env` (can be flaky across Node/test runners) and the new doctor check currently warns even when memory search isn’t explicitly enabled in config, which may produce noise for some users/config shapes.
- src/commands/doctor-memory.test.ts, src/commands/doctor-memory.ts
<!-- greptile_other_comments_section -->
<sub>(5/5) You can turn off certain types of comments like style [here](https://app.greptile.com/review/github)!</sub>
**Context used:**
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
<!-- /greptile_comment -->
Most Similar PRs
#21631: feat(doctor): detect memory plugins in memory search health check
by tsukhani · 2026-02-20
84.6%
#17660: fix: skip embedding provider check in doctor when QMD backend is co...
by echoVic · 2026-02-16
83.2%
#22327: fix(doctor): use gateway health status for memory search key check
by therk · 2026-02-21
82.8%
#20125: fix(doctor): skip memorySearch provider check when using QMD backend
by brandonwise · 2026-02-18
82.7%
#18546: fix(doctor): replace deprecated `auth add` command reference
by Phineas1500 · 2026-02-16
81.4%
#21471: fix: check QMD backend before memory search config
by lbo728 · 2026-02-20
79.8%
#11179: fix(memory): replace confusing "No API key" errors in memory tools ...
by liuxiaopai-ai · 2026-02-07
79.3%
#21240: fix: GH#20607 prevent doctor from dropping custom config sections
by theognis1002 · 2026-02-19
79.3%
#11158: doctor: warn when system RAM is at or below 2 GB (deafult in the mo...
by jasonthewhale · 2026-02-07
79.1%
#11271: Doctor: enhance network connectivity diagnostics
by MackDing · 2026-02-07
76.6%