dash
SDK Reference
Early access — request a key
for AI builders & hosts
v0.1 preview · @assembl/dash
v0.1 preview · @assembl/dash
Add a reward layer to your agent's working state in one call. Dash renders a sponsored line + the fill-the-dog loader beneath your own status, banks value to the user, and fires events you can react to. This is the reference for that API — the package is in early access, so request a key and we'll send you the install.
01 — Request a key
Or email assembl@assembl.co.nz. No spam — a named human in Aotearoa reads every request.
02 — Initialize
import Dash from '@assembl/dash';
Dash.init({
publishableKey: 'pk_live_…',
region: 'nz', // data residency
theme: 'auto' // 'light' | 'dark' | 'auto'
});
Dash.init({
publishableKey: 'pk_live_…',
region: 'nz', // data residency
theme: 'auto' // 'light' | 'dark' | 'auto'
});
03 — Show it while the agent works
// call when your agent starts a long task
const session = Dash.show({
context: 'agent',
status: 'Reconciling June invoices',
steps: { current: 4, total: 6 },
mount: '#agent-status' // selector or el
});
const session = Dash.show({
context: 'agent',
status: 'Reconciling June invoices',
steps: { current: 4, total: 6 },
mount: '#agent-status' // selector or el
});
show() options
04 — Drive & finish the session
session.update({ current: 5 }); // advance the dog's fill
session.setStatus('Almost there…');
session.complete(); // shows "you earned $X" + banks it
session.dismiss(); // cancel, no payout
session.setStatus('Almost there…');
session.complete(); // shows "you earned $X" + banks it
session.dismiss(); // cancel, no payout
05 — Events
Dash.on('earned', ({ amount, reward }) => {});
Dash.on('optin', ({ userId }) => {});
Dash.on('optout', () => {});
Dash.on('error', (err) => {});
Dash.on('optin', ({ userId }) => {});
Dash.on('optout', () => {});
Dash.on('error', (err) => {});
06 — Surfaces
agent
Under an agent's live status. Full loader.
host
Full-screen loading takeover. White-label.
inline
Compact one-line bar for tight UIs.
07 — White-label theming
Dash.theme({
accent: '#FFD42A',
ink: '#3A3832',
radius: 26,
mascot: true // show dog
});
accent: '#FFD42A',
ink: '#3A3832',
radius: 26,
mascot: true // show dog
});
08 — Server webhook & trust
POST /your/webhook (signed: Dash-Signature)
{ event: 'reward.banked', userId, amount, reward, ts }
{ event: 'reward.banked', userId, amount, reward, ts }
Opt-in only
NZ data residency
No under-16 targeting
Signed webhooks
Assembl-governed
dash
SDK v0.1 · docs.dash.assembl.co.nz