{
  "name": "Summarize This Page",
  "description": "Get a short, skimmable summary of the page you're on — written on your device, no account.",
  "tags": [
    "summarize",
    "web page",
    "on-device ai",
    "reading",
    "article"
  ],
  "type": "triggered",
  "nodes": [
    {
      "id": "sticky-intro",
      "position": {
        "x": 20,
        "y": 20
      },
      "data": {
        "color": "#fff266",
        "content": "📄 Summarize the page you're on.\n\nPress Run on any article or long page and get a few short bullet points. The summary is written locally in your browser — nothing is sent to a server. Pick a model the first time."
      },
      "type": "stickyNote",
      "width": 340,
      "height": 180
    },
    {
      "id": "trigger-run",
      "position": {
        "x": 100,
        "y": 280
      },
      "data": {
        "instance": {
          "id": "af-base-node:trigger:whenStarted"
        },
        "label": "Run now",
        "inputs": {},
        "parameters": {
          "notes": "Starts the workflow when you press Run."
        }
      },
      "type": "trigger"
    },
    {
      "id": "get-text",
      "position": {
        "x": 420,
        "y": 280
      },
      "data": {
        "instance": {
          "id": "af-base-node:basic:getAllTextNode"
        },
        "label": "Read the current page",
        "inputs": {
          "outputFieldName": "text",
          "options": {
            "visibleOnly": true
          }
        },
        "parameters": {
          "notes": "Grabs the readable text from the page you're currently viewing."
        }
      },
      "type": "basic"
    },
    {
      "id": "summarize",
      "position": {
        "x": 740,
        "y": 280
      },
      "data": {
        "instance": {
          "id": "af-base-node:agent:summarization-chain"
        },
        "label": "Summarize it",
        "inputs": {
          "text": "{{ $input.text }}",
          "options": {
            "maxWords": 120,
            "style": "a few bullet points"
          }
        },
        "parameters": {
          "notes": "Condenses the page into a few short bullet points."
        }
      },
      "type": "agent"
    },
    {
      "id": "local-model",
      "position": {
        "x": 740,
        "y": 500
      },
      "data": {
        "instance": {
          "id": "af-base-node:dependency:webLLM"
        },
        "label": "Local AI model",
        "inputs": {
          "model": "",
          "options": {
            "temperature": 0.4
          }
        },
        "parameters": {
          "notes": "Runs the summary locally in your browser. Pick a model the first time — it downloads once, then works offline."
        }
      },
      "type": "dependency"
    },
    {
      "id": "show-summary",
      "position": {
        "x": 1060,
        "y": 280
      },
      "data": {
        "instance": {
          "id": "af-base-node:basic:displayMarkdownNode"
        },
        "label": "Show the summary",
        "inputs": {
          "title": "Page summary",
          "content": "{{ $input.summary }}"
        },
        "parameters": {
          "notes": "Displays the finished summary."
        }
      },
      "type": "basic"
    },
    {
      "id": "sticky-model",
      "position": {
        "x": 740,
        "y": 660
      },
      "data": {
        "color": "#c9f0d1",
        "content": "Setup needed: pick a local model the first time you run this. It downloads once, then runs fully offline."
      },
      "type": "stickyNote",
      "width": 300,
      "height": 110
    }
  ],
  "edges": [
    {
      "id": "e-run-get",
      "type": "flowEdge",
      "source": "trigger-run",
      "target": "get-text"
    },
    {
      "id": "e-get-summarize",
      "type": "flowEdge",
      "source": "get-text",
      "target": "summarize"
    },
    {
      "id": "e-summarize-model",
      "type": "flowEdge",
      "source": "summarize",
      "target": "local-model",
      "sourceHandle": "dependency-0"
    },
    {
      "id": "e-summarize-show",
      "type": "flowEdge",
      "source": "summarize",
      "target": "show-summary"
    }
  ]
}