Skip to content
Talk to an engineer

Canvas

Onboarding guide

A setup guide that stays open beside the chat while the user works through 3–7 steps in your app. The agent explains the current step; only your app ticks a step off.

KindCanvas · ONBOARDINGAgent waitsNoMobileNo canvas: a checklist card

Use it when: A new user needs to finish 3–7 setup steps in your app, in order. The guide stays open beside the chat while the user works and the agent explains the current step.

Use something else when: One step (tell the user in chat, or spotlight it). Steps the agent does itself (that’s an action, not a guide). Mobile: the canvas isn’t available; use the checklist card (mountMobile).

The template callsThe agent getsWhen
canvas.setState(patch)Canvas stateA step is done (your app, or “I’ve done this”). The agent sees it with the user’s next message.
displayed()FUNCTION_TOOL_DISPLAYEDMobile checklist card: as soon as it shows.

Besides its data, the template draws these as itself: mountState() on the canvas, mountMobileState() in the mobile card. Pick one on the preview with State.

StateWhen it shows
LoadingThe guide opens at once while your app reads which steps the user already did, and again after Try again.
EmptyYour app has no setup steps for this user, for example a teammate who joined a workspace an admin already set up.
ErrorYour app couldn’t read the user’s progress. Try again loads the steps in place; steps already done stay done.
mountState({ root, head, title: "…", state: { kind: "error", text: "…", retry } });
mountMobileState({ root, head, title: "…", state: { kind: "error", text: "…", retry } });

The hosted action and the in-page handler below show each case. The state types are LoadingState, EmptyState and ErrorState in fs-kit.

FieldTypeNotes
titlestring
intro (optional)string
canvasTitle (optional)stringThe canvas header (setTitle, up to 80 characters).
eyebrow (optional)string
doneTitle (optional)string
doneText (optional)string
stepsOnboardingStep[]
currentstring | nullThe step the user is on. The agent moves it only when the user asks.
FieldTypeNotes
idstring
titlestring
detailstring
donebooleanOnly your app sets this, when the user really did the step. The agent never does.
minutes (optional)number
cta (optional){ label: string; href?: string }The step’s button. Without actions.go, href is opened.
auto (optional)booleanYour app detects this step itself: hides “I’ve done this”.
FieldTypeNotes
go() (optional)(step: OnboardingStep) => voidTake the user to the step in your app (navigate, spotlight).
finish() (optional)() => voidThe last screen’s button. Default: close the canvas.
subscribe() (optional)(onChange: (patch: Partial<OnboardingState>) => void) => () => voidYour app reports progress here (a step the user really finished). The guide redraws and shares it with the agent through canvas.setState. Return the unsubscribe.

Copy the template and the shared kit into your code: agent/ui/ in an agent repo, or anywhere in your app. The template imports only ./fs-kit.js. Then wire it up from the hosted action or the in-page handler.

The hosted action needs an agent repo with one folder per action (agent/actions/<action_key>/index.ts). If your repo keeps its actions in agent/actions/index.ts, use the in-page handler: it runs the same template in your app.

All templates in machine-readable form: /ui-catalog/catalog.json.