kucukkanat/edgewise

Six verbs for on-device AI in TypeScript. Edgewise runs language, vision, speech, judging, embedding, image and forecasting models where your code runs: in the browser through WebGPU or WebAssembly, and in Bun or Node through ONNX Runtime, with vgpu for WebGPU on the server.

TypeScript

7

28 commits

updated Oct 15, 2026

See the code

README

Edgewise: a faceted raven head with an amber eye

Edgewise

Six verbs for on-device AI in TypeScript. Edgewise runs language, vision, speech, judging, embedding, image and forecasting models where your code runs: in the browser through WebGPU or WebAssembly, and in Bun or Node through ONNX Runtime, with vgpu for WebGPU on the server.

Documentation · Live demos · Models · API reference

bun add edgewise
import { generate, evaluate, embed, speak, paint, forecast, choice } from 'edgewise';

// generate → text, from text, images or audio
const { text } = await generate({ model: 'text:default', input: 'Three names for a bakery?' });

// evaluate → typed decisions from small encoders
const { answers } = await evaluate({
  model: 'judge:router',
  state: 'My invoice charged me twice.',
  questions: { lane: choice({ billing: 'billing', tech: 'technical support', chat: 'small talk' }) },
});

// embed → vectors
const { embedding } = await embed({ model: 'embed:default', input: 'How do I reset my password?' });

// speak → audio (streams sentence by sentence), or a cloned voice with consent
const audio = await speak({ model: 'voice:default', input: 'Hello from your device.' });

// paint → image (preview)
const { image } = await paint({ model: 'image:default', prompt: 'a lighthouse at sunset, watercolor', allowPreview: true });

// forecast → numbers with ranges
const { median, quantiles } = await forecast({ model: 'forecast:default', series: hourly, horizon: 24 });

Why

  • Six verbs, grouped by output. A vision-language model and a speech recognizer both produce text, so both use generate. New model families plug into a verb instead of adding API.
  • One package, three runtimes. The same code runs in browsers, Bun and Node. Every result reports which device and backend actually ran.
  • Await or stream, same call. generate, speak and paint return a Run: await it, or for await it.
  • Pinned, verified models. Every model is pinned to an exact revision; files Edgewise hosts are checked against SHA-256.
  • Tested with real models. A model is stable only when real-model tests pass on Bun, Node and Chromium.

Entry points

Import
edgewisethe verbs, mic(), audioSource(), tool(), question builders, configure(), capabilities(), registry
edgewise/helpersroute, lint, redact, caption, ocr, vectorIndex, detectAnomalies, …
edgewise/reacthooks: useModel, useChat, useEvaluate, useSpeak, …
edgewise/ai-sdkVercel AI SDK providers
edgewise/testmock models for unit tests
edgewise/workerrun every verb in a Web Worker: serveWorker(), connectWorker()

Optional peers: zod (schemas, tools), phonemizer (Kokoro TTS; bundles GPL-3.0 espeak-ng), react, ai and @ai-sdk/provider.

Development

bun install
bun run typecheck && bun run lint
bun run test            # unit tests on Bun, Node and Chromium
bun run test:models     # real models on all three (downloads ~5 GB)
bun run build           # dist/
bun run docs          # docs/dist, the GitHub Pages site

The ONNX export scripts for the models Edgewise hosts (Chronos-Bolt, the LiquidAI LFM2.5 encoders, LiquidAI d1-omni and d1-3B) are in scripts/export; the bucket README lists each hosted file with its source, licence and parity.

Licence

MIT. Each model keeps its own licence, listed in the model table.

ai
browser
edge-ai
edge-computing
edge-tts
llm-agent
llm-inference
llm-tools
voice-ai
voice-assistant
voice-cloning
voice-recognition

kucukkanat/edgewise

Six verbs for on-device AI in TypeScript. Edgewise runs language, vision, speech, judging, embedding, image and forecasting models where your code runs: in the browser through WebGPU or WebAssembly, and in Bun or Node through ONNX Runtime, with vgpu for WebGPU on the server.

TypeScript

7

28 commits

updated Oct 15, 2026

See the code

README

Edgewise: a faceted raven head with an amber eye

Edgewise

Six verbs for on-device AI in TypeScript. Edgewise runs language, vision, speech, judging, embedding, image and forecasting models where your code runs: in the browser through WebGPU or WebAssembly, and in Bun or Node through ONNX Runtime, with vgpu for WebGPU on the server.

Documentation · Live demos · Models · API reference

bun add edgewise
import { generate, evaluate, embed, speak, paint, forecast, choice } from 'edgewise';

// generate → text, from text, images or audio
const { text } = await generate({ model: 'text:default', input: 'Three names for a bakery?' });

// evaluate → typed decisions from small encoders
const { answers } = await evaluate({
  model: 'judge:router',
  state: 'My invoice charged me twice.',
  questions: { lane: choice({ billing: 'billing', tech: 'technical support', chat: 'small talk' }) },
});

// embed → vectors
const { embedding } = await embed({ model: 'embed:default', input: 'How do I reset my password?' });

// speak → audio (streams sentence by sentence), or a cloned voice with consent
const audio = await speak({ model: 'voice:default', input: 'Hello from your device.' });

// paint → image (preview)
const { image } = await paint({ model: 'image:default', prompt: 'a lighthouse at sunset, watercolor', allowPreview: true });

// forecast → numbers with ranges
const { median, quantiles } = await forecast({ model: 'forecast:default', series: hourly, horizon: 24 });

Why

  • Six verbs, grouped by output. A vision-language model and a speech recognizer both produce text, so both use generate. New model families plug into a verb instead of adding API.
  • One package, three runtimes. The same code runs in browsers, Bun and Node. Every result reports which device and backend actually ran.
  • Await or stream, same call. generate, speak and paint return a Run: await it, or for await it.
  • Pinned, verified models. Every model is pinned to an exact revision; files Edgewise hosts are checked against SHA-256.
  • Tested with real models. A model is stable only when real-model tests pass on Bun, Node and Chromium.

Entry points

Import
edgewisethe verbs, mic(), audioSource(), tool(), question builders, configure(), capabilities(), registry
edgewise/helpersroute, lint, redact, caption, ocr, vectorIndex, detectAnomalies, …
edgewise/reacthooks: useModel, useChat, useEvaluate, useSpeak, …
edgewise/ai-sdkVercel AI SDK providers
edgewise/testmock models for unit tests
edgewise/workerrun every verb in a Web Worker: serveWorker(), connectWorker()

Optional peers: zod (schemas, tools), phonemizer (Kokoro TTS; bundles GPL-3.0 espeak-ng), react, ai and @ai-sdk/provider.

Development

bun install
bun run typecheck && bun run lint
bun run test            # unit tests on Bun, Node and Chromium
bun run test:models     # real models on all three (downloads ~5 GB)
bun run build           # dist/
bun run docs          # docs/dist, the GitHub Pages site

The ONNX export scripts for the models Edgewise hosts (Chronos-Bolt, the LiquidAI LFM2.5 encoders, LiquidAI d1-omni and d1-3B) are in scripts/export; the bucket README lists each hosted file with its source, licence and parity.

Licence

MIT. Each model keeps its own licence, listed in the model table.

ai
browser
edge-ai
edge-computing
edge-tts
llm-agent
llm-inference
llm-tools
voice-ai
voice-assistant
voice-cloning
voice-recognition

Project health

Latest release

0.4.1 · Oct 15, 2026

Releases this year

4