SmartMemory
Guides

OKF Portability

OKF Portability

SmartMemory can export a workspace as an OKF bundle and import that bundle into another workspace. OKF is the Google Open Knowledge Format, a portable memory format built from Markdown files and YAML frontmatter. SmartMemory writes v0.2 bundles and still imports v0.1 bundles.

Each exported bundle contains OKF pages for the workspace. The files are suitable for portable storage, transfer, and an Obsidian-native round trip. SmartMemory preserves its smartmemory extension data alongside the standard OKF fields so it can restore the behavior-bearing memory details that OKF alone cannot represent.

Declared type portability

A v0.2 bundle carries the workspace's declared class and relation declarations in a separate section, alongside the items. This matters when a workspace uses declared memory types: without the declarations, items of a declared class would be refused on import into a workspace that has never heard of that class.

Imports are staged. If a declaration in the bundle conflicts with one already present in the destination workspace, the whole import is refused rather than merged silently, so an import can never partially reshape an existing schema. Bundles at v0.1 carry items only and continue to import unchanged.

Export a workspace

Use the service endpoint to download a compressed bundle for the active workspace:

GET /memory/okf/export

The endpoint accepts optional memory_type and limit query parameters. Its response is a tar.gz download containing the OKF bundle.

The CLI provides the same operation:

sm export

Import a bundle

Upload an OKF bundle to the destination workspace:

POST /memory/okf/import

The request uses a multipart file field. The response reports the number of pages imported, the number that failed, and the destination workspace ID.

The CLI mirror is:

sm import

Imports are copies into the destination workspace. Cross-workspace resources are rebound to the destination so a bundle does not retain another workspace's item identity.

Obsidian-native round trip

The SmartMemory Obsidian integration reads and writes the same OKF Markdown and YAML representation. You can export a workspace, keep or edit the pages in an Obsidian vault, and import the bundle again without converting it through a proprietary vault-only format.

Unknown OKF fields are retained during a SmartMemory round trip when they are not promoted into SmartMemory fields. Formatting can change because the codec preserves document meaning rather than exact YAML layout.

Decisions on import

Decision pages import as fresh decisions in the destination workspace. Decision identity is item-addressed, so a cross-workspace import does not preserve supersession chains or evidence links. Treat an imported decision as a new destination-workspace decision, then recreate any required relationships there.

On this page