Memory LanceDB
기준일: 2026-07-26
공식 기준: Memory LanceDB
Memory LanceDB 문서는 OpenClaw 공식 문서(plugins/memory-lancedb)를 한국어로 정리한 가이드입니다. Configure the official external LanceDB memory plugin, including local Ollama-compatible embeddings 명령·설정 키·코드 예시는 공식 문서를 그대로 보존하며, 해석과 절차 안내는 한국어로 제공합니다. 최종 동작은 설치된 CLI 버전과 공식 원문을 확인하세요.
핵심 요약
Configure the official external LanceDB memory plugin, including local Ollama-compatible embeddings
한국어 가이드 범위: plugins/memory-lancedb 경로의 설정·명령·제약·예시를 학습용으로 재구성합니다.
문서 구성
공식 문서의 주요 섹션은 다음과 같습니다.
- 설치
- 빠른 시작
- Embedding config
- Dimensions
- Ollama embeddings
- Recall and capture limits
- 명령
- Storage
- Runtime dependencies and platform support
- 트러블슈팅
- Input length exceeds the context length
- Unsupported embedding model
- Plugin loads but no memories appear
- 관련 문서
상세 내용
본문
memory-lancedb is an official external plugin that stores long-term memory in LanceDB with vector search. It can auto-recall relevant memories before a model turn and auto-capture important facts after a response.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
설치
The plugin is published to npm; it is not bundled into the OpenClaw runtime image. Installing it writes the plugin entry, enables it, and switches plugins.slots.memory to memory-lancedb. If another plugin currently owns the memory slot, that plugin is disabled with a warning.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
openclaw plugins install @openclaw/memory-lancedb
빠른 시작
Restart the Gateway after changing plugin config, then verify it loaded:
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
{
plugins: {
slots: {
memory: "memory-lancedb",
},
entries: {
"memory-lancedb": {
enabled: true,
config: {
embedding: {
provider: "openai",
model: "text-embedding-3-small",
},
autoRecall: true,
autoCapture: false,
},
},
},
},
}
openclaw gateway restart
openclaw plugins list
Embedding config
embedding is required and must include at least one field. provider defaults to openai; model defaults to text-embedding-3-small.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
- Provider adapter path (default): set
embedding.providerand omit - Direct OpenAI-compatible client path: leave
embedding.providerunset
| Field | Type | Notes |
|---|---|---|
embedding.provider |
string | Adapter id, e.g. openai, github-copilot, ollama. Default openai. |
embedding.model |
string | Default text-embedding-3-small. |
embedding.apiKey |
string | Optional; supports ${ENV_VAR} expansion. |
embedding.baseUrl |
string | Optional; supports ${ENV_VAR} expansion. |
embedding.dimensions |
integer (>=1) | Required for models not in the built-in table (see below). |
{
plugins: {
entries: {
"memory-lancedb": {
enabled: true,
config: {
embedding: {
provider: "github-copilot",
model: "text-embedding-3-small",
},
},
},
},
},
}
Dimensions
OpenClaw has a built-in dimension for text-embedding-3-small (1536) and text-embedding-3-large (3072) only. Any other model needs an explicit embedding.dimensions so LanceDB can create the vector column, for example ZhiPu embedding-3 at 2048 dimensions:
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
{
plugins: {
entries: {
"memory-lancedb": {
enabled: true,
config: {
embedding: {
apiKey: "${ZHIPU_API_KEY}",
baseUrl: "https://open.bigmodel.cn/api/paas/v4",
model: "embedding-3",
dimensions: 2048,
},
},
},
},
},
}
Ollama embeddings
Use the bundled Ollama provider adapter path (embedding.provider: "ollama"). It calls Ollama's native /api/embed endpoint and follows the same auth/base URL rules as the Ollama provider.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
{
plugins: {
slots: {
memory: "memory-lancedb",
},
entries: {
"memory-lancedb": {
enabled: true,
config: {
embedding: {
provider: "ollama",
baseUrl: "http://127.0.0.1:11434",
model: "mxbai-embed-large",
dimensions: 1024,
},
recallMaxChars: 400,
autoRecall: true,
autoCapture: false,
},
},
},
},
}
Recall and capture limits
recallMaxChars bounds the before_prompt_build auto-recall query, the memory_recall tool, the memory_forget query path, and openclaw ltm search. Auto-recall embeds the latest user message from the turn and falls back to the full prompt only when no user message is present, keeping channel metadata and large prompt blocks out of the embedding request.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
| Setting | Default | Range | Applies to |
|---|---|---|---|
recallMaxChars |
1000 |
100-10000 | Text sent to the embedding API for recall. |
captureMaxChars |
500 |
100-10000 | Message length eligible for auto-capture. |
customTriggers |
[] |
0-50 items, each <=100 chars | Literal phrases that make auto-capture consider a message. |
명령
memory-lancedb registers the ltm CLI namespace whenever it is installed (not only when it owns the active memory slot):
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
memory_recall: vector search over stored memories.memory_store: save a fact, preference, decision, or entity (rejects textmemory_forget: delete bymemoryId, or byquery(auto-deletes a single
| Flag | Default | Notes |
|---|---|---|
--agent <id> |
configured default agent | Selects the private agent namespace. Available on list, search, query, and stats. |
--cols <columns> |
id,text,importance,category,createdAt |
Comma-separated column allowlist. |
--filter <condition> |
none | One comparison over an output column, such as category = 'preference' or importance >= 0.8. String values must be quoted. |
--limit <n> |
10 |
Positive integer. |
--order-by <column>:<asc|desc> |
none | Sorted in memory after the filter runs; the sort column is auto-added to the projection and stripped from output if it was not requested. |
openclaw ltm list [--agent <id>] [--limit <n>] [--order-by-created-at]
openclaw ltm search <query> [--agent <id>] [--limit <n>]
openclaw ltm stats [--agent <id>]
openclaw ltm query --agent research --cols id,text,createdAt --limit 20
openclaw ltm query --filter "category = 'preference'" --order-by createdAt:desc
Storage
LanceDB data defaults to ~/.openclaw/memory/lancedb. Override with dbPath:
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
{
plugins: {
entries: {
"memory-lancedb": {
enabled: true,
config: {
dbPath: "~/.openclaw/memory/lancedb",
embedding: {
apiKey: "${OPENAI_API_KEY}",
model: "text-embedding-3-small",
},
},
},
},
},
}
{
plugins: {
entries: {
"memory-lancedb": {
enabled: true,
config: {
dbPath: "s3://memory-bucket/openclaw",
storageOptions: {
access_key: "${AWS_ACCESS_KEY_ID}",
secret_key: "${AWS_SECRET_ACCESS_KEY}",
endpoint: "${AWS_ENDPOINT_URL}",
},
embedding: {
apiKey: "${OPENAI_API_KEY}",
model: "text-embedding-3-small",
},
},
},
},
},
}
Runtime dependencies and platform support
memory-lancedb depends on the native @lancedb/lancedb package, owned by the plugin package (not the OpenClaw core dist). Gateway startup does not repair plugin dependencies; if the native dependency is missing or fails to load, reinstall or update the plugin package and restart the Gateway.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
트러블슈팅
이 섹션의 세부 항목은 공식 문서 트러블슈팅를 참고하세요.
Input length exceeds the context length
The embedding model rejected the recall query:
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
memory-lancedb: recall failed: Error: 400 the input length exceeds the context length
{
plugins: {
entries: {
"memory-lancedb": {
config: {
recallMaxChars: 400,
},
},
},
},
}
curl http://127.0.0.1:11434/api/embed \
-H "Content-Type: application/json" \
-d '{"model":"mxbai-embed-large","input":"hello"}'
Unsupported embedding model
Without embedding.dimensions, only the built-in OpenAI embedding dimensions are known (text-embedding-3-small, text-embedding-3-large). For any other model, set embedding.dimensions to the vector size that model reports.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
Plugin loads but no memories appear
Confirm plugins.slots.memory points at memory-lancedb, then run:
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
openclaw ltm stats
openclaw ltm search "recent preference"
관련 문서
주요 항목:
- Memory overview
- Active memory
- Memory search
- Memory Wiki
- Ollama
실습 체크리스트
- 공식 문서와 로컬 버전을 대조합니다:
https://docs.openclaw.ai/plugins/memory-lancedb - 관련 CLI는
openclaw --help및 하위 명령--help로 옵션을 확인합니다. - 설정 변경 시
openclaw config/openclaw doctor로 유효성을 검사합니다. - Gateway·채널·플러그인 변경 후에는 필요 시 Gateway를 재시작합니다.
자주 쓰는 명령·설정 예시
openclaw plugins install @openclaw/memory-lancedb
{
plugins: {
slots: {
memory: "memory-lancedb",
},
entries: {
"memory-lancedb": {
enabled: true,
config: {
embedding: {
provider: "openai",
model: "text-embedding-3-small",
},
autoRecall: true,
autoCapture: false,
},
},
},
},
}
openclaw gateway restart
openclaw plugins list
{
plugins: {
entries: {
"memory-lancedb": {
enabled: true,
config: {
embedding: {
provider: "github-copilot",
model: "text-embedding-3-small",
},
},
},
},
},
}
{
plugins: {
entries: {
"memory-lancedb": {
enabled: true,
config: {
embedding: {
apiKey: "${ZHIPU_API_KEY}",
baseUrl: "https://open.bigmodel.cn/api/paas/v4",
model: "embedding-3",
dimensions: 2048,
},
},
},
},
},
}
{
plugins: {
slots: {
memory: "memory-lancedb",
},
entries: {
"memory-lancedb": {
enabled: true,
config: {
embedding: {
provider: "ollama",
baseUrl: "http://127.0.0.1:11434",
model: "mxbai-embed-large",
dimensions: 1024,
},
recallMaxChars: 400,
autoRecall: true,
autoCapture: false,
},
},
},
},
}
관련 링크
이 가이드는 공식 문서를 한국어 학습용으로 재구성한 것입니다. 옵션 기본값·플래그 이름은 설치 버전에 따라 달라질 수 있습니다.