Feature Request: Documentation and schema guide for importing historical chat logs
Problem When integrating Mnemon into an existing project, there is currently no standardized methodology for importing historical context or old chat logs.
While it is possible to parse chat exports and use an LLM to generate a memory.json file, doing this without an official schema or guide involves heavy guesswork. Without knowing the exact fields, relationships, and optimal data shapes Mnemon expects, users risk generating poor-quality graph content that fails to leverage the system's full capabilities.
Proposed solution Provide a definitive guide, official schema, or standard LLM prompt template that users can leverage to extract memories from existing chat files.
This documentation should clearly outline the optimal shape and required fields for the data. A reference guide would ensure that user-generated imports are fully compatible and maximize the use of Mnemon's graph features prior to insertion.
Alternatives considered
Manual trial and error: (Current state) Guessing the required JSON structure, which is error-prone.
Dedicated import script: A built-in CLI tool to parse standard markdown chats into memory.json. (A documentation guide would be a lighter-lift first step, however).
Additional context I ran a pilot test for this workflow: I converted an existing chat history to Markdown and asked Claude to generate the corresponding memory.json file. However, the resulting JSON was missing key components that Mnemon seemingly requires to function correctly. Having an official reference guide for the expected JSON structure would completely solve this onboarding friction.
Yes, this seems like the right direction.
Rather than exposing Mnemon's internal database schema directly, I think we should define a versioned public import schema for a "memory draft" file. Mnemon's internal schema will continue to evolve, but the public import schema can give users and LLMs a stable target to generate against, with schema_version and forward-compatible import support.
The intended workflow would be:
- Mnemon documents the memory draft JSON schema with field-level descriptions.
- We provide a reference prompt for converting Markdown/chat exports into that schema.
mnemon import <file>validates the draft and imports it through Mnemon's normal write path, so deduplication, graph construction, embeddings, and lifecycle scoring are handled by Mnemon.
This would make the supported path:
chat export / Markdown -> LLM using Mnemon prompt -> memory draft JSON -> mnemon import
Would that solve the import workflow you had in mind?
Yes. Software development is not really my domain. But, let me know if i can be of help.
Thanks, that's helpful.
We'll work on an initial schema/docs/import flow. Once it's ready, it would be useful to validate it against your chat import use case.
Hi, thanks again for raising this.
This is now available in the latest release, v0.1.11.
The simplest way to use it is to ask an agent with the Mnemon skill installed:
Import this chat export into Mnemon memory.
The skill now knows the import workflow: generate memory_draft.json, validate it first, then import it.
If you want to run it manually, the minimal flow is:
mnemon import --dry-run memory_draft.json
mnemon import memory_draft.json
The draft schema and copy-paste LLM prompt are documented here:
- English: https://github.com/mnemon-dev/mnemon/blob/master/docs/IMPORT.md
- 中文: https://github.com/mnemon-dev/mnemon/blob/master/docs/zh/IMPORT.md
The import path handles validation, deduplication, graph edges, historical timestamps, and lifecycle scoring. Appreciate the suggestion. It helped shape this into a complete import workflow, not just a schema note.
Closing as completed: the versioned historical-chat draft schema, import and dry-run paths, deduplication, edges, timestamps, and English/Chinese documentation shipped via #41. The focused import suites pass on current master.