Study interchange format
Draft specification (
0.1.0). Subject to revision before1.0.0.
The OpenL2 Study Interchange Format (openl2-study) is a self-contained JSON format for exchanging spaced-repetition memory state and optional review history between language-learning applications.
Each item embeds a self-contained concept object (language, kind, text, and optional sense, pos, skill, realizes_concept) so exports can be read and imported by any SRS app without requiring an external OpenL2 Language Library. Applications that use OpenL2 libraries can resolve items to canonical library Concepts downstream.
See the Specification overview for how this format relates to Concepts, Libraries, and Courses.
File format & encoding
Section titled “File format & encoding”- Serialization: UTF-8 JSON (
.openl2-study.json), optionally gzip-compressed (.openl2-study.json.gz). - Timestamps: RFC 3339 UTC strings (e.g.,
2026-11-29T18:50:00Z). - Versioning:
spec_versionuses strict SemVer (MAJOR.MINOR.PATCH).
Top-level structure
Section titled “Top-level structure”{ "format": "openl2-study", "spec_version": "0.1.0", "exported_at": "2026-11-29T18:50:00Z", "source": { "app": "jetway", "version": "1.4.0" }, "scheduler": { "algorithm": "fsrs-6", "weights": [0.212, 1.2931, 2.3065, 8.2956] }, "items": [ ... ], "reviews": [ ... ]}Top-level fields
Section titled “Top-level fields”| Field | Required | Description |
|---|---|---|
format |
Yes | Must be "openl2-study". |
spec_version |
Yes | SemVer string for this specification (e.g., "0.1.0"). |
exported_at |
Yes | RFC 3339 UTC timestamp when the file was generated. |
items |
Yes | Array of current learner memory state records. |
source |
No | Exporting application provenance ({ "app": "...", "version": "..." }). |
scheduler |
No | Default scheduler configuration (e.g., algorithm and optional FSRS weights). Avoids repeating parameter arrays on every item. |
reviews |
No | Chronological array of atomic review events. Omit for snapshot-only exports; include to support FSRS parameter optimization, cross-algorithm replay, or multi-app merging. |
extensions |
No | Reverse-DNS namespaced map for app-specific document metadata. |
Self-contained Concept object (item.concept)
Section titled “Self-contained Concept object (item.concept)”Every item carries a nested concept object containing the core OpenL2 Concept identity fields defined in Concepts, Skills, and annotations:
| Field | Required | Description |
|---|---|---|
language |
Yes | Lowercase BCP 47 language tag (e.g., de, en, es-mx, zh-cn, ja-jp; see Language codes). |
kind |
Yes | "lexical", "communicative_expression", "skill", or "orthography". |
text |
Yes | Target-language surface form or Skill display signature (e.g., "der Kaffee", "<Nomen>, dem <Subjekt> <Verb>", "行"). |
sense |
No | Study-language sense or disambiguating gloss (expected for lexical and communicative_expression Concepts). |
pos |
No | Part of speech when helpful for disambiguation. |
skill |
No | Owning Skill name (for kind: "skill"). |
realizes_concept |
No | For kind: "skill" Concepts that realize an inflected form of a Lexical Concept (without collapsing their learner states): { "text": "...", "sense": "...", "pos": "...", "concept_key": "..." } (text required; others optional). |
concept_key |
No | Optional canonical OpenL2 Concept id hint for fast library resolution. |
external_id |
No | Optional stable identifier in the source app (e.g., "anki:note:172839"). |
extensions |
No | Reverse-DNS namespaced map for Concept-level metadata (e.g., L1 gloss, pronunciation/pinyin, frequency_rank, idiomatic, media references). |
Item state (items[])
Section titled “Item state (items[])”Each item pairs a concept object and scheduler-agnostic portable fields with an optional algorithm-specific block keyed by algorithm family (fsrs, sm2, etc.):
{ "concept": { "language": "de", "kind": "skill", "skill": "Präsens (unregelmäßig)", "text": "er spricht", "realizes_concept": { "text": "sprechen", "concept_key": "sprechen" }, "concept_key": "sprechen-praesens-3sg", "extensions": { "ai.jetway": { "l1_gloss": "he speaks" } } }, "status": "review", "due_at": "2026-12-06T12:00:00Z", "last_reviewed_at": "2026-11-29T12:00:00Z", "reps": 7, "lapses": 1, "fsrs": { "stability": 7.14, "difficulty": 5.82 }, "extensions": { "ai.jetway": { "mastery_band": "developing" } }}Core item fields
Section titled “Core item fields”| Field | Required | Description |
|---|---|---|
concept |
Yes | Self-contained Concept object (see above). |
status |
Yes | One of "new", "learning", "review", "relearning", "suspended", "known". |
due_at |
No | RFC 3339 UTC timestamp when next review is due. null or omitted for "new", "suspended", or "known" items. |
last_reviewed_at |
No | RFC 3339 UTC timestamp of the most recent review. |
reps |
No | Total completed reviews (>= 0). |
lapses |
No | Total lapses after graduating to "review" (>= 0). |
extensions |
No | Reverse-DNS namespaced object for learner/scheduling-level fields (e.g., recognition vs. production splits, mastery bands, deck tags). |
Standard algorithm blocks
Section titled “Standard algorithm blocks”Algorithm-specific scheduling state lives in a dedicated object on the item, without duplicating status, due_at, or last_reviewed_at:
FSRS (fsrs)
Section titled “FSRS (fsrs)”Use top-level scheduler.algorithm values such as "fsrs-4.5", "fsrs-5", or "fsrs-6".
"fsrs": { "stability": 7.14, "difficulty": 5.82, "step": null}stability: Memory stability in days (interval at which retrievability reaches 90%).difficulty: Item difficulty (1.0–10.0).step(optional): Current intra-day learning/relearning step index (0-based integer, ornullwhen in"review").algorithm(optional): Per-item algorithm override (e.g.,"fsrs-5") if different from top-levelscheduler.algorithm.
SM-2 (sm2)
Section titled “SM-2 (sm2)”Use top-level scheduler.algorithm: "sm2".
"sm2": { "ease_factor": 2.5, "interval_days": 14}ease_factor: Current ease multiplier (e.g.,2.5).interval_days: Current scheduled interval in days.
Other schedulers (Leitner, custom models, etc.) may define their own algorithm key or place state under extensions.
Review log (reviews[], optional)
Section titled “Review log (reviews[], optional)”Include reviews when exporting history for FSRS weight optimization, migrating across different schedulers or FSRS versions, or merging progress across multiple apps.
{ "id": "01JDF8Q7V4X9K2M3N5P6R8T0VW", "reviewed_at": "2026-11-29T12:00:00Z", "language": "de", "concept_key": "sprechen-praesens-3sg", "text": "er spricht", "rating": 3, "evidence": "implicit"}| Field | Required | Description |
|---|---|---|
reviewed_at |
Yes | RFC 3339 UTC timestamp of the review. |
language |
Yes | Lowercase BCP 47 language tag matching item.concept.language. |
concept_key / external_id / text |
Yes | At least one identifier matching the reviewed item.concept in items[]. |
rating |
Yes | Integer 1 (again), 2 (hard), 3 (good), or 4 (easy). Binary pass/fail apps should map fail → 1 and pass → 3. |
id |
No | Globally unique event ID (UUID/ULID) for idempotent deduplication when merging exports. |
evidence |
No | "explicit" (isolated flashcard/drill, default) or "implicit" (natural reuse during reading, listening, or role-play). |
extensions |
No | Reverse-DNS namespaced object for telemetry (e.g., response duration, exercise reference). |
Events in reviews should be ordered chronologically by reviewed_at ascending.
Interoperability rules
Section titled “Interoperability rules”- Extension preservation: Importers must ignore unknown keys inside
extensions(at document, item, concept, or review level) and should preserve them when re-exporting. Keys insideextensionsmust use reverse-DNS notation (e.g.,"ai.jetway","net.ankiweb"). - Downstream library resolution: Because items are self-contained, importers do not need an OpenL2 library to read or schedule them. Tools that map items onto a library should match by
concept.concept_key(including libraryaliases) first, then fall back to(language, kind, text, sense, pos). - Algorithm fallback: When an importer does not support an item’s algorithm block (or runs a different FSRS version):
- If
reviewsare present, replay the item’s review events under the destination scheduler. - Otherwise, seed from portable fields (
status,due_at,last_reviewed_at,reps,lapses) or approximatestability/difficultyfrominterval_days/ease_factor.
- If
- Merging multiple exports: When combining exports from two apps, deduplicate
reviewsbyid(or(reviewed_at, target, rating)whenidis absent), sort chronologically, and recompute item states.
See also
Section titled “See also”- Specification overview — How Concepts, Libraries, Courses, and Study Interchange fit together.
- Concepts, Skills, and annotations — Concept kinds (
lexical,communicative_expression,skill,orthography) andrealizes_concept. - Integrating OpenL2 — Learner modeling boundaries and Python compilation APIs.