{
  "$type": "site.standard.document",
  "content": {
    "$type": "pub.leaflet.content",
    "pages": [
      {
        "$type": "pub.leaflet.pages.linearDocument",
        "blocks": [
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "A couple weeks ago I was writing more bash than I care to admit and the \"language\"(if you can call it that) is quite useful.\n"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.bskyPost",
              "clientHost": "bsky.app",
              "postRef": {
                "cid": "bafyreiclfehohhceacfgyvt3lnj4v2qaezoiadu4hrj6hoort35hvspgom",
                "uri": "at://did:plc:da6iyhwpub7pnqbj5booh2by/app.bsky.feed.post/3mkmm7k3e6k2y"
              }
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#link",
                      "uri": "https://github.com/hawk0120/flash"
                    }
                  ],
                  "index": {
                    "byteEnd": 49,
                    "byteStart": 44
                  }
                }
              ],
              "plaintext": "\nI decided to build an agent harness in it. flash is a lightweight AI agent framework in roughly 300 lines of bash. It uses Ollama to query a llm and lets the model use shell tools to complete tasks."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.header",
              "level": 3,
              "plaintext": "How it works"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#bold"
                    }
                  ],
                  "index": {
                    "byteEnd": 35,
                    "byteStart": 13
                  }
                }
              ],
              "plaintext": "Flash uses a two-model architecture:"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.unorderedList",
              "children": [
                {
                  "$type": "pub.leaflet.blocks.unorderedList#listItem",
                  "content": {
                    "$type": "pub.leaflet.blocks.text",
                    "facets": [
                      {
                        "features": [
                          {
                            "$type": "pub.leaflet.richtext.facet#bold"
                          }
                        ],
                        "index": {
                          "byteEnd": 10,
                          "byteStart": 0
                        }
                      }
                    ],
                    "plaintext": "Gemma4:E4B (execution model) has access to tools. it decides when to run shell commands, fetch URLs, or manage a todo list via function calling."
                  }
                },
                {
                  "$type": "pub.leaflet.blocks.unorderedList#listItem",
                  "content": {
                    "$type": "pub.leaflet.blocks.text",
                    "facets": [
                      {
                        "features": [
                          {
                            "$type": "pub.leaflet.richtext.facet#bold"
                          }
                        ],
                        "index": {
                          "byteEnd": 10,
                          "byteStart": 0
                        }
                      },
                      {
                        "features": [
                          {
                            "$type": "pub.leaflet.richtext.facet#code"
                          }
                        ],
                        "index": {
                          "byteEnd": 310,
                          "byteStart": 301
                        }
                      },
                      {
                        "features": [
                          {
                            "$type": "pub.leaflet.richtext.facet#code"
                          }
                        ],
                        "index": {
                          "byteEnd": 378,
                          "byteStart": 370
                        }
                      }
                    ],
                    "plaintext": "Gemma4:E2B (response model) takes the tool results and generates the final reply. No tools, just text. The idea here is when a conversation is needed this model is quicker on the resources I currently have it running on.\nThe models hit a local Ollama API, and chat history persists as JSON files in a sessions/ directory. You can switch between sessions at runtime with /session."
                  }
                }
              ]
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.header",
              "level": 3,
              "plaintext": "Tools are just shell scripts"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#code"
                    }
                  ],
                  "index": {
                    "byteEnd": 30,
                    "byteStart": 27
                  }
                },
                {
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#code"
                    }
                  ],
                  "index": {
                    "byteEnd": 45,
                    "byteStart": 39
                  }
                }
              ],
              "plaintext": "Every tool is a standalone .sh file in tools/:"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.unorderedList",
              "children": [
                {
                  "$type": "pub.leaflet.blocks.unorderedList#listItem",
                  "content": {
                    "$type": "pub.leaflet.blocks.text",
                    "facets": [
                      {
                        "features": [
                          {
                            "$type": "pub.leaflet.richtext.facet#code"
                          }
                        ],
                        "index": {
                          "byteEnd": 5,
                          "byteStart": 0
                        }
                      }
                    ],
                    "plaintext": "sh.sh - runs any shell command"
                  }
                },
                {
                  "$type": "pub.leaflet.blocks.unorderedList#listItem",
                  "content": {
                    "$type": "pub.leaflet.blocks.text",
                    "facets": [
                      {
                        "features": [
                          {
                            "$type": "pub.leaflet.richtext.facet#code"
                          }
                        ],
                        "index": {
                          "byteEnd": 11,
                          "byteStart": 0
                        }
                      }
                    ],
                    "plaintext": "webfetch.sh - fetches and strips HTML from a URL"
                  }
                },
                {
                  "$type": "pub.leaflet.blocks.unorderedList#listItem",
                  "content": {
                    "$type": "pub.leaflet.blocks.text",
                    "facets": [
                      {
                        "features": [
                          {
                            "$type": "pub.leaflet.richtext.facet#code"
                          }
                        ],
                        "index": {
                          "byteEnd": 11,
                          "byteStart": 0
                        }
                      },
                      {
                        "features": [
                          {
                            "$type": "pub.leaflet.richtext.facet#code"
                          }
                        ],
                        "index": {
                          "byteEnd": 25,
                          "byteStart": 13
                        }
                      },
                      {
                        "features": [
                          {
                            "$type": "pub.leaflet.richtext.facet#code"
                          }
                        ],
                        "index": {
                          "byteEnd": 39,
                          "byteStart": 27
                        }
                      }
                    ],
                    "plaintext": "todo_add.sh, todo_done.sh, todo_list.sh - lightweight task management\nThe agent can call them in parallel, collect results, and feed them back to the model."
                  }
                }
              ]
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.header",
              "level": 3,
              "plaintext": "Why?"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "Most agent harnesses are big and cumbersome. I wanted to run something that would be quick and easy to use locally. flash lives in my local file system uses a local model. It's a bash script that is self modifying and almost any consume grade laptop could rrun."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "The whole thing fits in a Docker image based on Alpine with just bash, curl, and jq."
            }
          }
        ],
        "id": "0199e447-9593-7bb8-ad9d-08b7243f6c74"
      }
    ]
  },
  "description": "",
  "path": "/3mlw4y76d622k",
  "publishedAt": "2026-05-15T20:05:33.713Z",
  "site": "at://did:plc:da6iyhwpub7pnqbj5booh2by/site.standard.publication/3m2p7f6h6h226",
  "tags": [],
  "title": "flash"
}