[OMEGA-248] Memory Backup and Restore - #329
Conversation
Install import-kb v0.2.1 in the image and invoke its memory portability module during startup. This replaces the separate memory-portability package reference.
Queue confirmed export requests in channel handlers and process them before the next agent prompt. This keeps commands outside the LLM while making archive creation synchronous with normal memory writes.
Restore direct history and ChromaDB access now that exports run sequentially in the main loop. The gateway lock is no longer needed.
Feat/user memory portability
… resolved bootstrap conflict
|
Please answer the usual PR questions:
|
…being unsupported in the standalone run of omegaclaw
# Conflicts: # scripts/omegaclaw
Its more of a confirmation rather than an authentication. |
I don't see any reason why confirmation is needed. |
|
QA note: both Local and OpenAI embeddings exporting/importing cases should be tested. |
# Conflicts: # src/channels.py
|
@vsbogd addressed the comments, enabled wsocket support, removed confirmation check, updated README with clear scope and limitation of memory-import |
|
|
| raise ValueError(f"Unsupported embedding provider: {embedding_provider!r}") | ||
|
|
||
| os.environ["EMBEDDING_PROVIDER"] = embedding_provider | ||
| _transfer = MemoryTransfer(_TRANSFER_DIR) |
There was a problem hiding this comment.
MemoryTransfer is instantiated without passing MemoryStore argument. In such case MemoryTransfer uses default MemoryStore instance which uses default memory_dir, chroma_db and collection values. This couples OmegaClaw code with library code. If memory dir or chroma db location are changed via settings or collection name is changed in "petta chroma db" library the import-kb should also be changed (see https://github.com/asi-alliance/import-knowledge-package/pull/1/changes#r3845201282). We need to instantiate MemoryStore here with passing all necessary paths to it. Otherwise if user changes memoryDirectory parameter the export doesn't work.
vsbogd
left a comment
There was a problem hiding this comment.
@blackhammer116 one comment left (https://github.com/asi-alliance/OmegaClaw-Core/pull/329/changes#r3880411652) and I think it is critical. Other than that looks good to me.
|
Verified against acf9230 with an image built from this branch, real providers (Anthropic for the agent loop, real OpenAI key for embeddings), no mocks for the memory feature. What I checked
Findings
Verdict: PASS |
Description
This PR adds operator-controlled memory backup and restore support to OmegaClaw Core while keeping archive processing inside the standalone import-kb package.
It supports:
OmegaClaw Core now handles:
Archive creation, validation, import, rollback, recovery, and ChromaDB record handling remain in the import-kb dependency.
Export flow
Start OmegaClaw with a host transfer directory:
Then request an export through a supported channel:
The resulting .tar.gz archive is written to the mounted host directory. Export is disabled by default and is not supported through WebSocket chat.
Import flow
Optional component flags:
Before the agent starts, the entrypoint:
Testing
Added coverage for:
How Has This Been Tested?
Checklist