boaz · v0.9.6 · free, MIT, open source
Boaz is a free, open-source assistant that answers from your app's own routes, facts and rules, calls them when a question needs live state, and shows the facts behind every sentence. No LLM, no API key, no download.
By the numbers
Install
Boaz is MIT and framework-free: no service to run, no key to provision, no weights to fetch. Published to npm as @shobyde/boaz; every release is tagged, built from source, and carries the same prebuilt dist/.
npm install @shobyde/boaz # or pin the release tarball, which is the same dist/ npm install @shobyde/boaz@0.9.6 npx boaz init --skill # the skill that keeps capabilities in sync npx boaz verify # check the declarations, exit 1 on an error npx boaz audit --probes agent-probes.json --module agent-setup.mjs npx boaz bench --probes agent-probes.json --module agent-setup.mjs --samples
import { createConversation } from '@shobyde/boaz/conversation'; import { defineCapability } from '@shobyde/boaz/core'; const chat = createConversation({ system: 'Answer from the project record.', knowledge: { facts, rules, answers }, tools: [ defineCapability({ id: 'projects.list', kind: 'query', title: 'List projects', description: 'Reads the project record.', paramsSchema: { type: 'object', properties: {}, additionalProperties: false, }, handler: async () => ({ projects }), }), ], }); for await (const event of chat.stream('Which projects use Python?')) { if (event.type === 'text.delta') append(event.text); if (event.type === 'tool.use') showTool(event.id, event.args); if (event.type === 'surface') render(event.messages); }
Knowledge is the app's facts and answer rules. Tools are the capabilities it already owns. The host keeps the rendering.
@shobyde/boaz/conversationThe SDK facade: createConversation({ system, knowledge, tools }), typed stream(), memory and tool continuation@shobyde/boaz/coreRegistry, JSON Schema validation, BM25 retrieval, the tool loop, and a deterministic keyword engine@shobyde/boaz/rulesFacts, Datalog rules, and the answer contract that turns solutions into a sentence@shobyde/boaz/viteScans the declarations with the TypeScript AST, emits the manifest, serves it as boaz:manifest@shobyde/boaz/probesTurns a manifest into a probe file, in the CLI or in a browser tab@shobyde/boaz/buildThe AST extractor, the diagnostic code table and the terminal report@shobyde/boaz/reactAgentProvider, useAgentChat, useRegisterCapability. The core needs no framework@shobyde/boaz/domLabelled, budgeted page text for a custom engine that wants grounding@shobyde/boaz/extractEmail, phone, URL and LinkedIn scanning for rules that need a value off the pageLive
The same rules and capabilities the site's assistant uses, wired to the text on this page. Nothing is sent anywhere, and every reply shows the steps that produced it. Ask for a card to watch an A2UI surface render with the page's own components.
Try "which projects use Python?", "what is his email?", or "how many posts are there?".
Tool call: a question about projects runs projects.list and reasons over its rows.
A2UI: a card question returns a surface, and the renderer paints it here with this page's components.
Waiting for a question.
The trade most assistants make
Shipping an assistant usually means shipping weights: hundreds of megabytes, a WebGPU requirement, and an answer nobody can check. On a phone with metered data, or a work laptop with the CDN blocked, the assistant is a spinner.
Boaz takes the other position. The app publishes what it can do and what it knows. The library retrieves, joins and composes. When the facts run out, it reads the page it is standing on. Every reply can be traced to the rows that produced it.
Hosted modelper token, per call
Model in the tabWebLLM, Prompt API
Boazthis page
The honest limit. This is not a general-purpose chatbot. It cannot write an essay about a topic nobody declared, and it should not pretend to. It answers what the app actually knows, which on most pages is most of what a visitor asks.
Anatomy
A build step extracts them with the TypeScript AST into one manifest: routes, actions, queries, and prose knowledge.
BM25 over titles, keywords and descriptions. Thirty-two capabilities take about three microseconds, which is why retrieval is not the thing the visitor waits for.
A rule declares the tools it needs. The runtime runs one, hands back the structured result, and the engine turns it into facts for this turn.
A small Datalog subset: joins, scoped assumptions, a depth cap.
projects_using(?P) :- uses(?P, ?T), asked(?T).
The app writes the words, the library streams them, and the steps it took stay on screen above the answer.
// The app's half: which tool, and how a // solution becomes a sentence. { id: 'projects.using', title: 'Which projects use a technology', keywords: ['which projects use', 'built with'], goal: 'projects_using(?P)', steps: [{ capabilityId: 'projects.list', toFacts: (result) => result.projects.flatMap((p) => [ fact('project', slug(p.title), p.title), ...p.stack.map((t) => fact('uses', slug(p.title), t)), ]), }], compose: ({ solutions }) => `${solutions.length} projects use it.`, }
A2UI
A handler can return a declarative surface instead of prose: a stream of components, bindings and data. The agent never touches the DOM. The host renders the surface with its own buttons, its own type, its own spacing, so an answer that is a card looks like every other card on the site.
{ "createSurface": { "surfaceId": "s1" } }
{ "updateComponents": { "surfaceId": "s1", "components": [
{ "id": "root", "component": "Card", "child": "col" },
{ "id": "col", "component": "Column", "children": ["title", "body"] },
{ "id": "title", "component": "Text", "text": { "@path": "/project/title" } },
] } }
Private meeting notes that never leave the machine: on-device transcription, local summaries, no accounts.
Whisper · GGUF · macOS + Linux
◇ A2UI · Show the Hobnob card
Checked, not hoped. Every surface the assistant can emit is rendered in CI and inspected by groundglass: dangling children, cycles, unresolved bindings and unreachable components fail the build, so a missing piece cannot vanish silently.
When the facts run out
Nobody declares an email address as a fact, and they should not have to. Ask for one and the engine scans the text the host already has, including link targets, and answers with where it read it.
> which projects use python? Readback and Groundglass use it. > and SQLite? Readback uses it. # a continuation with no subject of its own # repeats the last rule instead of guessing > and? Readback and Groundglass use it.
Numbers
| What | Measured | Why |
|---|---|---|
| Install | 0 bytes | No weights, no worker, no cache to warm. |
| Rank 31 capabilities | 3 µs | BM25 over an 12 kB manifest already in memory. |
| Join 32 facts | 0.03 ms | A depth-capped unification over rows the app declared. |
| First word | about 12 ms | Retrieval, rule evaluation, composition, and one animation frame. |
| Step visibility | 650 ms lead-in | Deliberate pacing: the trace is readable before the answer starts. |
| Network during a turn | none | The page's own data and DOM are the only sources. |
About the timings. Compute is measured on the production bundle in this browser. The lead-in is presentation, not work: a reply is finished in milliseconds, so the pause exists to make the trace legible, and it is skipped when the tab is hidden.
Honesty
Questions
Yes. MIT licensed, no per-call billing, no hosted tier to upgrade into, no account. The whole cost is the JavaScript already in your bundle.
Neither. No model runs in the loop, so there is nothing to download and nothing to authenticate. A turn makes no network request; the page's own data and DOM are the source.
A model in the tab still guesses. Boaz retrieves a capability or joins a rule, so the sentence is derived from rows the app declared and it can show them. The trade is coverage: it answers what was declared, and says out loud when the answer is not there.
For navigation, "what does this section do", pricing, docs lookup and "show me the form", yes: those are declarations plus a few rules. For open-ended conversation about anything, no, and the page says so when it cannot answer.
Nothing per turn. The work happens in the visitor's browser against an 12 kB manifest, so an answer costs about what rendering a list costs.
This site's assistant runs on it: 31 declared capabilities, rules over the project and post data, and a page scan for contact details. Install it with npm install @shobyde/boaz, or read the source and the release tarball on GitHub.
The name
In Ruth 4, Boaz settles a transaction at the city gate, in front of ten elders, where it can be witnessed: "you are witnesses this day." In Ruth 2:11, asked why Ruth had found favor, he answers from what had been reported to him, not from what he could guess.
That is the contract this library keeps, in both directions. A change happens where it can be seen: the id must exist in the manifest, the arguments are validated before a handler runs, and a mutating action waits for a confirmation. An answer comes from the record: facts the app declared, rules it wrote, or the page it is standing on, with the steps shown above the sentence.
Formerly client-agent. The package carried that name through 0.6.10. 0.7.0 renamed the package, the CLI, the virtual module and the shipped skill to boaz. From 0.8.1 it publishes on npm as @shobyde/boaz, because the unscoped name trips npm's typo-squatting filter: the import paths carry the scope, the CLI is still boaz, and the behaviour is unchanged.