{
  "name": "Study Buddy",
  "version": 1,
  "nodes": [
    {
      "localID": 0,
      "typeID": "trigger.keyboard_shortcut",
      "customName": "Control-Option-S",
      "isDisabled": false,
      "x": 60.0,
      "y": 120.0,
      "config": {
        "shortcut": "ctrl+option+s",
        "consumeKey": true,
        "customArgs": {}
      }
    },
    {
      "localID": 1,
      "typeID": "action.chat",
      "customName": "Study Buddy",
      "isDisabled": false,
      "x": 380.0,
      "y": 120.0,
      "config": {
        "title": "Study Buddy",
        "placeholder": "Ask about chapter 3, or say quiz me",
        "historyTurns": 40,
        "conversation": "fresh",
        "responseTemplate": "{{result}}",
        "tool_web_search": false,
        "tool_web_fetch": false
      }
    },
    {
      "localID": 2,
      "typeID": "transformer.extract_text_pdf",
      "customName": "Read chapter 3",
      "isDisabled": false,
      "x": 700.0,
      "y": 400.0,
      "config": {
        "filePath": "/Users/Shared/Study/chapter-3.pdf",
        "pageRange": "",
        "outputKey": "chapter",
        "renderPageImages": false
      }
    },
    {
      "localID": 3,
      "typeID": "ai.prompt",
      "customName": "Tutor",
      "isDisabled": false,
      "x": 1020.0,
      "y": 400.0,
      "config": {
        "prompt": "Chapter:\n{{chapter}}\n\nConversation so far:\n{{historyText}}\n\nUser: {{message}}",
        "systemPrompt": "You are a study partner for one chapter. The chapter's text is in the prompt. Answer only from it, and if something is not in the chapter, say so.\n\nWork in one of two modes, chosen by what the student writes.\n\nExplain: when they ask a question or ask you to explain something, answer in plain words in a short paragraph, then quote the sentence from the chapter you relied on.\n\nQuiz: when they say \"quiz me\", ask one question about the chapter and stop. When they answer, start with Correct, Partly or Wrong, say in one or two sentences what the chapter says, then write the running score on its own line as \"Score: X/Y\", then ask the next question. Take the score from the last \"Score:\" line in the conversation. Stay in quiz mode until they say \"stop\", then give the final score and list the topics they missed.\n\nNever ask more than one question in a reply.",
        "imagePath": "",
        "provider": "",
        "model": "",
        "temperature": 0.4,
        "maxTokens": 0,
        "outputSchema": ""
      }
    },
    {
      "localID": 4,
      "typeID": "note",
      "customName": "Open",
      "isDisabled": false,
      "x": 20.0,
      "y": 40.0,
      "config": {
        "backdrop": true,
        "color": "#64B5F6",
        "text": "Open the window",
        "_width": 680.0,
        "_height": 240.0
      }
    },
    {
      "localID": 5,
      "typeID": "note",
      "customName": "Lap",
      "isDisabled": false,
      "x": 660.0,
      "y": 320.0,
      "config": {
        "backdrop": true,
        "color": "#BA68C8",
        "text": "Every message: one lap",
        "_width": 680.0,
        "_height": 240.0
      }
    }
  ],
  "connections": [
    {
      "sourceLocalID": 0,
      "sourcePortID": "outlet_output",
      "targetLocalID": 1,
      "targetPortID": "inlet_input"
    },
    {
      "sourceLocalID": 1,
      "sourcePortID": "outlet_call",
      "targetLocalID": 2,
      "targetPortID": "inlet_input"
    },
    {
      "sourceLocalID": 2,
      "sourcePortID": "outlet_document",
      "targetLocalID": 3,
      "targetPortID": "inlet_input"
    },
    {
      "sourceLocalID": 3,
      "sourcePortID": "outlet_result",
      "targetLocalID": 1,
      "targetPortID": "inlet_response"
    }
  ],
  "background": {
    "type": "image",
    "ref": {
      "type": "bundled",
      "id": "graphite"
    },
    "fit": "cover"
  }
}