Intrinsic Labs

OpenLoom

A protocol for loom interfaces

Current Version: 2.0 (draft)

← Aspen Grove

Contents

6. Minimal example

A complete, conforming document — one tree, one branch point:

{
  "format": "open-loom",
  "version": "2.0",
  "trees": [{
    "id": "t1",
    "title": "Hello",
    "rootNodeIds": ["a"],
    "currentNodeId": "c",
    "nodes": {
      "a": { "id": "a", "content": [{ "type": "text", "text": "Once upon a time" }], "author": { "role": "human" } },
      "b": { "id": "b", "content": [{ "type": "text", "text": " there was a fox." }], "author": { "role": "model" } },
      "c": { "id": "c", "content": [{ "type": "text", "text": " there was a loom." }], "author": { "role": "model" } }
    },
    "edges": [
      { "type": "continuation", "sources": [{ "nodeId": "a" }], "targetNodeId": "b" },
      { "type": "continuation", "sources": [{ "nodeId": "a" }], "targetNodeId": "c" }
    ]
  }]
}