private app context local model backends validated output

Dhamaka

Ship the model to the data.

Browser-local LLM workflows for web apps that already hold the context: schemas, selections, formulas, drafts, permissions, and tools. The model reasons in the tab; your app validates what can change.

Dark dashboard with browser-local workflow metrics and operating signals
Local loop

Context, tools, and checks stay together.

Dhamaka is useful when the model can reason over private app state, call exact product tools, and return output your UI can validate before anything changes.

Context

Bring schemas, selections, formulas, drafts, rows, and permissions into the workflow your app already owns.

Tools

Let the model request exact lookups, calculations, rewrites, and product actions without pretending to be the database.

Validation

Apply only structured output that clears confidence gates, schema checks, and review rules before anything changes.

Workflow layer

Complex app work without sending private state away.

Workflow is the core API. Give Dhamaka intent, input, app context, schema, tools, and validators. A local model handles messy reasoning while deterministic code owns the action layer.

  • 1Pass the same context your UI already has: selected records, formulas, schemas, drafts, permissions, and open app state.
  • 2Let the model request app tools for exact lookups, rewrites, policy checks, and calculations.
  • 3Apply only the results that clear validators, confidence gates, and review rules.
await workflow.run({
  intent: "Turn this invoice into an AP draft",
  context: { vendorSchema, openPOs, selectedCompany },
  schema: { invoiceNo: "string", total: "number" },
  tools: [matchPurchaseOrder, normalizeVendor],
  validators: [
    totalMustBePositive,
    confidenceAtLeast(0.7)
  ]
})
Capability families

Three surfaces, one local trust boundary.

Dhamaka sits above browser model runtimes. The SDK keeps one product API while the runtime chooses LanguageModel, Transformers.js, WASM, or MockEngine depending on the environment.

WF

Workflow

Model-first app work with context, tools, schema, validators, confidence, and review state.

Workflow.run tool calls needsReview
TR

Transform

Focused rewrites and explanations for formulas, DSL snippets, field values, and structured text.

formula explain debug
RX

Reflex

Narrow UI primitives for smart fields, smart forms, contextual spellcheck, and smart paste.

SmartField SmartText paste
EV

Evals

Published task and browser checks keep regressions visible, including failures that still need work.

64/65 18/18 17/17
Trust boundary

user intent
  -> private app context
  -> local model reasoning
  -> deterministic tools
  -> validators
  -> review or apply

provider calls: 0
Architecture

The app keeps control over what changes.

The model can reason, but the product owns permissions, persistence, calculations, and review gates. That matters for ERP formulas, invoice imports, CRM cleanup, policy checks, and any workflow where private context is the product.

  • AThe user's data stays in the tab instead of traveling to a provider endpoint.
  • BTools return exact results the model can use without pretending to be a database or calculator.
  • CValidators decide whether structured output can be applied, edited, or sent to review.
Locationtab
Provider calls0
Task evals64/65
Runtime checks18/18
LicenseApache-2.0
Install

Attach Dhamaka where your app already has intent and context.

Use it in import screens, spreadsheet-like editors, admin panels, textareas, form fields, and workflow-heavy product surfaces where the model needs private state to be useful.

import { Workflow } from "dhamaka";

const workflow = new Workflow({ backend: "auto" });

const result = await workflow.run({
  intent,
  input,
  context,
  schema,
  tools,
  validators
});

if (!result.needsReview) apply(result.output);
01

Is this a runtime?

Not primarily. It is the workflow layer above browser model runtimes, with tools and validators built for product work.

02

What if Prompt API is unavailable?

The API stays stable while the runtime falls back through Transformers.js, WASM, and MockEngine.

03

Why local?

Because complex app tasks need private context, and the browser already has that context in memory.