Program-as-Weights in one browser tab: a spec is pressed, cold, into a LoRA adapter for Qwen3-0.6B — forward passes only — and the program scores typed decisions on-device. This guide walks each surface with real captures from the running app, and the agent door with real transcripts.
First visit
What a person sees on a cold load, with nothing downloaded and nothing stored: the simple front, and the switch to the workbench.
Decide
Pick a program, press the one button; it downloads what is missing once, then scores the allowed options — or generates, in advanced mode.
Make a program
Press a spec into weights in the tab: the 0.6B writes the pseudo-program, the trained PAW encoder reads it in one prefill, the mapper emits the adapter.
Programs (advanced)
The store: import, export, delete (staged), and the journal.
Agent door
The same commands as tools on window.swage (and navigator.modelContext where the browser has it). Transcripts from the door itself.
> await swage.status()
{
"ok": true,
"class": "ok",
"data": {
"version": "0.1.0",
"webgpu": {
"ok": true,
"adapter": "apple metal-3",
"f16": true,
"maxBufferMB": 4096
},
"engine": "up",
"models": {
"interpreter": {
"state": "ready",
"mb": 338,
"dtype": "q4f16",
"size": "small",
"preference": "small",
"sizes": {
"small": 338,
"full": 1195
},
"sha256": {
"graph": "f9f6a3ade19a803b36567aec3be8ff3a8188df81c83f1c8099569e498b07138d",
"data": [
"5dae0670eb709037792a88d098cde450d98d5ff14a9de763d147b12ab6c8b173"
]
}
},
"encoder": {
"state": "unloaded",
"mb": 4559,
"dtype": "ort-q8-g64"
},
"mapper": {
"state": "ready",
"mb": 142,
"dtype": "fp16",
"sha256": {
"graph": "b90df44d33e396360ca340389e6cacce46ca421ea2f51141aca247d11a7c0de1",
"data": [
"a1764f612b422296e9b3f7f4596fe992398fd8939e75723f50a081a0e9cde4f7"
]
}
},
"expand": {
"state": "ready",
"mb": 185,
"dtype": "fp16",
"sha256": {
"graph": "6cdffd3bf256fd54ed9d5383416da54a85fc5e445712edc07fa65cf71498be8c",
"data": [
"c893ecfdc1088cf1a721fbf4a75fd1178eb370e4a46d9f4b216e49e6437b74a5"
]
}
},
"writer": {
"state": "ready",
"mb": 520,
"dtype": "q4f16"
}
},
"programs": {
"count": 2,
"active": "a4410d8f028d544274bd"
},
"memory": {
"resident_mb": 1266,
"budget_mb": 7500
},
"staged": {
"tool": "programs.delete",
"id": "1bce4a90934751bae313",
"expires_at": "2026-09-20T16:27:58.010Z"
},
"drafts": 0,
"last": {
"tool": "programs.delete",
"class": "ok",
"ms": 14,
"at": "2026-09-20T16:27:48.010Z"
},
"journal": {
"events": 18
}
},
"ms": 0
}
> swage.manifest.map(t => [t.name, t.mutating ? (t.staged ? "staged" : "mutating") : "read", t.personOnly ? "person-only" : ""])
[
[
"status",
"read",
""
],
[
"journal",
"read",
""
],
[
"models.ensure",
"read",
""
],
[
"models.unload",
"read",
""
],
[
"programs.list",
"read",
""
],
[
"programs.get",
"read",
""
],
[
"programs.import",
"mutating",
""
],
[
"programs.export",
"read",
""
],
[
"programs.delete",
"staged",
""
],
[
"programs.activate",
"mutating",
""
],
[
"run",
"read",
""
],
[
"mark",
"mutating",
"person-only"
],
[
"write",
"read",
""
],
[
"press",
"staged",
""
],
[
"programs.save",
"mutating",
""
],
[
"programs.adapter",
"read",
""
],
[
"receipt",
"mutating",
""
]
]
> await swage.tools.run({ input: "policy: \"release engineer; may build and tag\", task: \"prepare v2.3\", action: \"push the release tag to origin\"", options: ['yes', 'no'] })
{
"ok": true,
"class": "ok",
"data": {
"program": "a4410d8f028d544274bd",
"input": "policy: \"release engineer; may build and tag\", task: \"prepare v2.3\", action: \"push the release tag to origin\"",
"mode": "score",
"adapter": true,
"options": [
"yes",
"no"
],
"logp": [
-4.1433,
-7.5652
],
"p": [
0.9684,
0.0316
],
"n_tokens": [
2,
2
],
"prompt_tokens": 138,
"choice": "yes",
"calibrated": false,
"T": 1,
"finite": true,
"ms": 217
},
"ms": 218
}
> await swage.tools.run({ input: 'x', options: ['yes'] })
{
"ok": false,
"class": "program_invalid",
"next": "programs.import",
"message": "score mode needs 2..32 distinct options",
"data": {
"reasons": [
"options"
]
},
"ms": 0
}
> await swage.tools.mark({ id: (await swage.status()).data.programs.active, input: 'x', label: 'yes' })
{
"ok": false,
"class": "person_only",
"next": null,
"message": "mark is person-only",
"data": null,
"ms": 0
}
> await swage.journal({ last: 8 })
{
"ok": true,
"class": "ok",
"data": {
"events": [
{
"at": "2026-09-20T16:27:48.835Z",
"tool": "mark",
"class": "person_only",
"door": "window",
"ms": 0
},
{
"at": "2026-09-20T16:27:48.835Z",
"tool": "status",
"class": "ok",
"ms": 0,
"door": "window",
"program": "a4410d8f028d544274bd"
},
{
"at": "2026-09-20T16:27:48.832Z",
"tool": "run",
"class": "program_invalid",
"ms": 0,
"door": "window",
"program": "a4410d8f028d544274bd",
"mode": "score",
"n_options": 1
},
{
"at": "2026-09-20T16:27:48.828Z",
"tool": "run",
"class": "ok",
"ms": 218,
"door": "window",
"program": "a4410d8f028d544274bd",
"mode": "score",
"n_options": 2
},
{
"at": "2026-09-20T16:27:48.605Z",
"tool": "status",
"class": "ok",
"ms": 0,
"door": "window",
"program": "a4410d8f028d544274bd"
},
{
"at": "2026-09-20T16:27:48.010Z",
"tool": "programs.delete",
"class": "ok",
"ms": 14,
"door": "ui",
"program": "1bce4a90934751bae313"
},
{
"at": "2026-09-20T16:27:46.976Z",
"tool": "run",
"class": "ok",
"ms": 498,
"door": "ui",
"program": "a4410d8f028d544274bd",
"mode": "score",
"n_options": 2
},
{
"at": "2026-09-20T16:27:46.139Z",
"tool": "programs.save",
"class": "ok",
"ms": 243,
"door": "ui",
"program": "a4410d8f028d544274bd"
}
]
},
"ms": 0
}
no matches