◊
Fall Kit
v3.2.0 · the shared brain · MIT
part of the AI Native Solutions estate · MIT · tested on GitHub's machines

One brain for every build. Yours to switch on.

Fall Kit is one small script. Put it in a web page and that page gets an AI helper that the person using it controls: off, a model that runs inside their own browser, or their own key to a frontier model such as Claude. Nothing goes through us: there is no server, no account and no middleman.

It is also the first of five studs on the Lego socket, the standard every estate build carries so that any build fits any other.

Start here

If you are using an estate build

  1. Find the small AI chip on the page (on this page it sits in the header, top right).
  2. Click it. Pick Off (the build works without AI), In your browser (a model downloads once and runs on your own machine), or Your own key.
  3. For your own key: choose the provider, paste the key, close the panel. The key stays in this tab and is gone when you close it, unless you tick remember my keys on this device.
  4. Ask: the top of the same panel has Ask about this page. Type a question about the build you are on, such as "how do I use this?", and the brain you picked answers from the page's own words.
  5. Use the build as normal. Wherever it offers AI help of its own, that help comes from the same brain.

If you are building one

  1. Add one line before </body>: <script src="https://sjgant80-hub.github.io/fall-kit/shim.js" defer></script>. Or copy the kit into the page with node porter.mjs <your-build> so it works offline.
  2. Call FallKit.aiComplete(system, question) or FallKit.aiChat(system, history, question) wherever you want help. Both return null when AI is off: your page then does its own thing.
  3. Write the build's kard.json with node kard-writer.mjs <your-build> --name <repo> --title "…" --retires "…" --category "…" so the build fits the socket.
  4. Check it: open the page, click the chip and ask about the page; then add node kard-writer.mjs . --check to the build's tests so the kard can never drift from its files.

How it works

Your page asks a question. Fall Kit sends it to whichever brain the person picked, and hands back the words of the answer, or null.

How a question travels through Fall Kit Your pageasks a question Fall Kitin the same page Offanswers null · the page does its own thing In your browsera model on your own machine · nothing leaves it Your own keystraight to the provider you chose · not through us
  1. The page asks. It passes an opening (who the helper is and what it knows), the conversation so far, and the new question.
  2. Off: the kit gives no answer, at once (in code, null), and the build carries on without AI. No download, no call. Every estate build must still work this way.
  3. In your browser: the kit loads WebLLM the first time you choose it, then the model answers on your own graphics chip. Nothing is sent anywhere.
  4. Your own key: the kit builds the provider's request itself (below is the real one), sends it from your browser straight to the provider, and reads back only the words of the answer, never the model's private thinking.
  5. The receipt: FallKit.lastUsage() then says how many tokens the provider read, how many it recycled from its cache, and how many it wrote.

The real request, built by the kit on this page

This calls FallKit.requestOf, the same code that builds every Claude request. The key is a stand-in label and nothing is sent.

→ press the button

Recycling: the opening is paid for once

Every question in a talk sends the same opening before the new words. Fall Kit puts that opening first, keeps it the same every time, and marks it for the provider's cache. The provider then stores it once and reads it back for every later question at a fraction of the price. On Claude Opus 5.5 a cache read costs $0.20 per million tokens instead of $4; writing it costs $5 per million, once. OpenAI, Google and OpenRouter recycle repeated openings on their own.

Two conditions, stated straight: the opening must be at least 512 tokens on the newest Claude models, and the next question must start within five minutes (each read restarts the five minutes). Prices: Anthropic's published Claude API rates for Claude Opus 5.5 (pricing; the cache write is 1.25 times the input rate and the five-minute window is on the prompt caching page). This page's tests check every rate written here against recycle.mjs.

In your own code: keep your opening the same string on every call, and hand the conversation back exactly as FallKit.aiChat returned it (see Embed). The kit does the marking; FallKit.lastUsage().recycled tells you it worked.

What it costs your team, worked out by recycle.mjs

The sum, with the starting figures: without recycling, each of 6 questions pays for 2,150 tokens in at $4 a million and 400 out at $20 a million: $0.0996 a talk. With recycling, the 2,000-token opening is written once at $5 a million and read back 5 times at $0.20 a million, the 150 new tokens of each question are paid at $4, and the answers cost the same: $0.0636 a talk. 20 people × 40 talks = 800 talks a month.

Answers include the model's thinking, which is billed as output. Only the opening is counted as recycled; a real talk also re-reads its earlier turns from the cache, so the true saving is larger.

Your keys stay in the tab

Every estate page lives at the same web address, sjgant80-hub.github.io, and browsers give pages at one address one shared storage. A key kept there could be read by any of them. So from version 3:

The Lego socket

A Lego brick fits any other because every brick has the same studs in the same places. The socket is that idea for software: five things every estate build carries, measured from the build's own files and written down in one small file, kard.json. Anything built now or later can read that file and know how to fit.

The five studs of the socket an estate build brain manifest mesh memory proof
StudWhat it meansHow it is measured
brainFall Kit is in the build, so it has the AI helper: at the least, you can ask it about the page you are on.Fall Kit's markers in the page (and which version), its one-line loader, or a linked copy of fall-kit.js
manifestThe build says who it is, what rented tool it retires and where it lives.its kard.json, checked field by field
meshBuilds open on the same device can talk; some talk across devices too.Fall Kit's same-device channel or the build's own; the build's own WebRTC for across devices
memoryThe build keeps your work on your own device.IndexedDB or local storage in the build's own code (the kit keeping its settings does not count)
proofThe build is tested on GitHub's machines, not just on ours.its workflows, and its test files

A build fits when it has every stud. One that does not still has a kard; the kard simply names the stud it lacks. Anything can read these files: a catalogue, a game's gear cards, or another build checking whether it fits.

The 100 builds, read live from their own kard.json

This page fetches each build's kard.json now and checks it with socket.mjs, the same checker the tests prove. A build whose file is missing or wrong says so.

…reading 100 builds
BuildRetiresBrainMeshMemoryProofFits

The shared foundation

The socket says what a build carries; Fall Kit core is what lets builds work together. It is a small set of modules every estate node runs. Every node signs what it says in LIGHT and checks what it hears before reading a byte. It learns from attacks any other node refuses, keeps its memory as one LIGHT vault, cannot spend past its budget, and records the work other nodes do for it. break-it and konomi-slm run on it today. Nine claims were sealed before the code, and the page re-runs the proof in your browser.

Open the foundation and run the proof →

Try it live

Ask the brain you picked in the chip

With the chip on Off you get the kit's null, as every build would. Pick In your browser or Your own key in the chip first for a real answer.

→ the answer appears here

The brains you can pick

TierWhat you getWhere the work happens
T0 · OffThe build runs fully without AI. The default for every install.Nothing downloads, nothing is called
T2 · In your browserWebLLM: 1B (700 MB, any laptop) · 3B (2 GB, the default) · 7B and 8B (5 GB, a decent graphics chip) · 70B (40 GB, a serious machine)Your own graphics chip, through WebGPU. Nothing is sent.
T3 · Your own keyAnthropic (Claude Opus 5.5 · Sonnet 5.5 · Haiku 5.5) · OpenAI · Google Gemini · OpenRouter · Groq · Cerebras · DeepSeek · Mistral · Cohere · Together · Hugging Face · xAI. Images, video, voice and listening too.From your browser straight to the provider. Not through us.

Blueprint

How the kit is built, file by file, and what proves each part.

FileWhat it doesWhat proves it
fall-kit.jsThe brain: the tier picker, the AI chip with Ask about this page and its settings, one way to call every provider for text, images, video, voice and listening, recycling, usage receipts, keys held in the tab, the same-device mesh.test.mjs: 19 tests, run on GitHub's machines (this page's own test counts them)
socket.mjsThe socket: measures a build's five studs from its files, makes its kard (the build's kard.json: what it is, what rented tool it retires, where it lives and which studs it has), checks any kard.json field by field, and says whether a build's tests passed on GitHub (verdictOf: green when one run succeeded and none failed or is still running).socket.test.mjs and the mutation witness: every planted bug caught
recycle.mjsThe recycling saving at published prices, for one talk and for a team's month.recycle.test.mjs and the mutation witness
kard-writer.mjsWrites a build's kard.json from its own files. With --check it fails the build's tests if the file no longer matches.uses socket.mjs; nothing is typed by hand
porter.mjsCopies the kit into a build between its markers, before the page's own </head>; --update replaces an older copy in place.the build's own page gate
costcase.mjsThe cost case below: a rented assistant seat for each person, against the kit with your own key or in your browser, every outside figure read from the sourced basis.costcase.test.mjs and the mutation witness: every planted bug caught
basis/basis.jsonThe sourced figures the cost case reads (ONS, DESNZ, the ECB, the vendors' own price pages), each with its link. The figures are not ours: each names its public source. The file is copied byte for byte from the estate's sovereign-enterprise build at a pinned commit.basis/vendor.mjs --check in CI fetches the source at that commit and refuses a single changed byte
page.test.mjsThis page's own test: every section a stranger needs is here, every number written in its text matches the kernel that makes it, and the credits are on it.run on GitHub's machines with the rest
markup.mjsFinds where a tag sits in the page's markup and passes over the same tag inside a script's text, so the kit is never put into the middle of a build's own code.markup.test.mjs and the mutation witness
shim.jsThe one-line loader for a build that does not carry its own copy. Does nothing if the kit is already there.this repository's page gate
socket-watch.mjsClones every build each day and re-measures it against its own kard.json. A kard that no longer matches its build is named.the socket-watch workflow: red when any kard stops telling the truth
socket-snapshot.mjsA dated record of all 100 builds in socket-kards.json: each one's kard as its site serves it, the commit its site serves, every test run GitHub holds for that commit, and what its live page answered. Kardlings makes its gear cards from it.verdictOf in socket.mjs (tested, and the mutation witness catches every planted bug) decides green from the runs themselves; the record keeps every run, so anyone can work the verdict out again, and each run id is a receipt anyone can open on GitHub
socket-builds.jsonThe 100 builds that carry the socket, with what each retires.a test checks every entry can make a valid kard
.github/workflowsci runs every test and the mutation witness; gate checks the page parses, links resolve and no key is committed.green or red on every push

Embed in your build

Two ways. Copy it in for a build that works offline: node porter.mjs <build-dir> puts fall-kit.js into the page between its markers. Or load it with one line, which always gets the newest version.

<script src="https://sjgant80-hub.github.io/fall-kit/fall-kit.js"></script>
<script>
  FallKit.init({ seedName: 'my-build', chipAnchor: 'header nav' });

  // one question · null when AI is off, so the build does its own thing
  const draft = await FallKit.aiComplete('You are a tight technical writer.', 'Summarise: ' + text, 200);

  // a conversation that recycles its opening · the history only grows, never edited
  const r = await FallKit.aiChat(OPENING, history, question, 600);
  if (r) { history.push({ role: 'user', content: question }, r.assistant); show(r.text); }
  console.log(FallKit.lastUsage());   // { read, recycled, written, out }
</script>

When something goes wrong

Public API

CallReturnsWhat
FallKit.init({seedName, chipAnchor}){version}Adds the styles and the AI chip; safe to call twice
FallKit.aiComplete(system, question, maxTokens)string | nullOne question. Off → null; the caller must handle it
FallKit.aiChat(system, history, question, maxTokens){text, assistant} | nullA conversation. Append the question and assistant to your history as they are
FallKit.askPage(question){text, why}What the chip's Ask box does: answers from the page's own words; why says what to do when it cannot
FallKit.lastUsage(){read, recycled, written, out} | nullWhat the last call cost, in tokens
FallKit.forgetKeys()voidClears every key, kept or not
FallKit.requestOf(type, opts)requestThe exact request the kit would send; the key stays in a header
FallKit.aiImage · aiVideo · aiTTS · aiSTTresult | nullImages, video, speech and listening, through the same tiers
FallKit.loadWebLLM(model?)PromiseLoads an in-browser model on the person's say-so
FallKit.openSettings()voidOpens the settings panel
FallKit.meshStart · meshPostvoid · boolThe same-device channel fall-signal, shared by estate builds open on one device
FallKit.helpSection()string (HTML)The standard help text for a build's Help tab

For a business

Put an AI helper in every tool your people already use, without a new vendor, a new seat licence or a server, and pay the AI provider only for the words actually sent.

What it does for each role

RoleWhat changes
CEOAI help inside every internal tool, under your own control, in weeks rather than a procurement cycle. No new company sits between you and the model.
CFONo licence fee: the kit is MIT. You pay your chosen provider at its published rates for what is used, and recycling cuts the repeated part. The calculator above works out the month for your numbers; the cost case below sets a year of it against a rented assistant seat for each person, on sourced figures, over as many years as you choose.
COOThe same chip and the same settings in every tool, so people learn it once. Tools keep working when AI is off.
CTO / CISONo server and no proxy to run or secure. Keys are held in the tab and never stored unless the person chooses. Requests go straight from the browser to the provider, keys in headers only. A page's content security policy can allow exactly the providers you approve and nothing else. The source is open and tested on every change.
TeamsHelp where the work is, with the provider the company approved, or a model on their own machine when the data must not leave it.
ProcurementNothing to license and no new data processor to assess: the kit is MIT code you copy into your own pages, with no server, account or analytics of ours. The one contract that matters is the one you already hold with the AI provider you choose, or none at all when the model runs in the browser. Support, if you want it, is agreed per deployment (below).

The cost case: a rented assistant seat, or the kit

What the AI helper itself costs your team, three ways. Every outside figure comes from a sourced basis, each one linked below with what it is; the figures are not ours (each names its public source), and the file is copied byte for byte from the estate's sovereign-enterprise, and CI refuses a single changed byte. The people, the questions, the words and the hours are yours to set; the starting figures are assumptions, not measurements. The sums are costcase.mjs, mutation-tested on every change. No price of ours appears: the kit has none.

…loading the sourced basis

Where each figure comes from:

What a seat buys is more than a helper in your own pages: Microsoft 365 Copilot works inside Microsoft 365, with your organisation's data there. This compares what the helper costs, not what each one does. Where your people need that, keep the seats; in the tools Fall Kit sits in, nobody needs one.

Security, data protection and compliance

<meta http-equiv="Content-Security-Policy" content="default-src 'self';
  script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';
  connect-src 'self' https://api.anthropic.com https://api.openai.com
    https://generativelanguage.googleapis.com https://openrouter.ai">

Any address the policy leaves out is blocked by the browser, so a call to an unapproved provider fails before it leaves. Allowing In your browser as well means adding WebLLM's script host and the hosts its models download from; open the browser's console, which names every address a policy blocks.

Rolling it out

  1. Week 1: add the kit to one tool. It starts Off, so nothing changes for anyone.
  2. Week 2: a pilot team turns on In your browser, where the data must stay on the machine, and Your own key with the company's provider.
  3. Week 3 on: add it to the next tool with porter.mjs; write each tool's kard.json so it fits the socket.

Support and ownership

Supplied by AI Native Solutions; start through that site. Support, service levels, warranty and liability are agreed per deployment, in each deployment's agreement. The code is MIT-licensed: copy the kit into your own tools and it is yours, with no lock-in and nothing to renew, and it keeps running without us, because nothing of ours is in the path between your page and the provider you chose. Public questions and fixes can also go through the GitHub repository.

Leaving: there is nothing to leave. Delete the kit from a page and the page works as it did with AI off; your keys, your provider account and your data were never ours.

Risks, answered straight

The case for the board

AI in every tool, owned outright, no per-seat licence, no new data processor, and a provider bill in which the opening every talk repeats is written once and then read back at a fraction of its price. The cost case above sets that against a seat for each person on sourced figures you can check line by line. The source is open, and the tests run where anyone can see them.

The paper: an AI helper the person controls

The problem. A tool that wants AI help usually bolts on a rented layer: a seat for every person, or a server of the vendor's that holds the keys and passes every question through. Each is one more bill, one more company that sees the work, and one more thing to secure; when it is down, the tool's AI is down, and often the tool with it.

The design. Put the whole helper in the page, as one small script, and let the person using it choose where the thinking happens. Four choices carry the weight:

What is checked. Every push runs the kit's tests, the socket's, recycling's, the cost case's and this page's on GitHub's machines; a mutation gate (witness) plants bugs in each pure kernel and fails unless a test catches every one; a page gate checks the page parses, its links resolve and no key is committed. Anyone can watch those runs on the repository.

Honest limits. A key in a tab can be read by any script already running on that page, so a content security policy and trusted pages are part of using it. In-browser models need WebGPU and room for the model. The cost case leaves recycling out and, unless you set the hours, counts a laptop's extra draw for every hour of the year, so both kit lines are at their highest for the figures in the basis; on Claude Opus 5.5, the kit's default, the own-key line is twice that before recycling. This page keeps nothing of its own on your device, so its own kard says it has no memory stud; the kit's settings live inside the kit.

Doctrine

◊ Fall Kit v3.2.0 · MIT · github.com/sjgant80-hub/fall-kit · supplied by AI Native Solutions · gated by witness
Powered by the Konomi architecture, created by Thomas Frumkin.