TraceAvatar
Menu

Case study

Built with TraceAvatar: DutyCaptain

DutyCaptain is an AI-agent console with many screens. Its guides play on the page you are on, are recorded and fixed by its admins in the console, and are checked against the live app every night.
published guides, each one a page's Show me
6
kinds of notice that offer a guide
5
browser tests, run on 3 browsers
32 × 3
every guide played on the live console in CI
Nightly

Counted from DutyCaptain's code, not estimated. DutyCaptain is an AI-agent console (Next.js), a HelloWorld Technologies product, like TraceAvatar.

The problem

Many screens, and help that goes stale

Customers set up tasks, connect accounts, review drafts and buy credits, each on its own screen. Help articles fell behind the console within weeks, and support answered the same “where is it?” questions by hand.

What DutyCaptain did

Each clip is the real app, recorded by TraceAvatar's own renderer on a demo account.
  1. 1

    Show me on every page

    A Show me menu in the top bar lists the guides for the page you are on. Before a guide plays, its requirements are checked (3 kinds, such as “a draft to review”), so a guide never stalls on an empty page; it says what is missing instead.
    Show me on DutyCaptain: Connect your X account, drawn over the real page.
  2. 2

    Do it for me, where it helps

    2 guides can also do the task: the form is filled in front of the user, and starting the task stays with them.
    Do it for me on DutyCaptain: it types the task for you and stops at Start task.
  3. 3

    Admins record guides in the console

    An admin presses Record, does the task once, and saves. A new guide is a draft until it is published, and editing one keeps the old version.
    Record mode on DutyCaptain: use the page, Stop, review, Save, Publish.
  4. 4

    A broken step is fixed by pointing at it

    When the console changes and a step can't find its element, the guide stops there and offers Fix this step: an admin points at the element the step meant, and the guide is saved with the fix.
    Repair on DutyCaptain: a broken step, fixed by pointing at the right element.
  5. 5

    Check all, from the admin page

    Every guide is played on the live console, one after another, and each one's result is shown beside it.
    Check all: every guide played on the live app, results kept.
  6. 6

    Guides in notices and support replies

    Every guide has a link. A notice finds its guide by data (the guide's helps_with), so no code names a guide, and support pastes the same links into replies.
    Copy link: every guide has one, ready for a reply.

The code

Copied from DutyCaptain's repo as it is, not rewritten for this page.
The guides mount: one menu per page, Do it for me, and recording for admins
<TraceGuides
  guides={manifest}
  launcher={false}
  perform
  navigate={navigate}
  currentPath={() => window.location.pathname}
  prepare={async (requires) => {
    const r = await prepareGuide(requires);
    if (checking) refused.current = r === true || (typeof r === 'object' && r.ok) ? null : (typeof r === 'object' && r.say) || 'It can\u2019t start here.';
    return r;
  }}
  {...(checking ? { rate: CHECK_RATE, links: false } : {})}
  record={admin && !checking ? { allowed: () => isAdmin(session.user()), save, requires: ['signed-in'], ai: assistAi } : undefined}
  // The list needs the manifest read in: show the menu once the guides are ready.
  onReady={(g) => { if (!g) { setGuides(null); return; } g.ready.then(() => setGuides(g)).catch(() => {}); }} />

dutycaptain-web/src/components/shell/ShowMeGuides.tsx:199-213

Before a guide plays: what the page needs
export async function prepareGuide(requires: string[]): Promise<PrepareResult> {
  for (const r of requires) {
    const why = await REQUIREMENTS[r]?.check();
    if (why) return { ok: false, say: why };
  }
  return true;
}

dutycaptain-web/src/components/shell/ShowMeGuides.tsx:62-68

A notice finds its guide by data, not by name
async function guideForNotice(type, deepLink) {
  const g = (await noticeGuides()).find((r) => Array.isArray(r.helps_with) && r.helps_with.includes(type));
  if (!g) return null;

dutycaptain-api/src/modules/guides/guides.service.js:217-219

Every guide checked against the live console, nightly
on:
  schedule:
    - cron: '30 2 * * *' # 03:30 in Lagos
  workflow_dispatch: {}

dutycaptain-web/.github/workflows/guides.yml:10-13

We built DutyCaptain, and we built TraceAvatar for it. The guides are the help: when the console changes, a nightly check tells us which guide broke, and fixing it takes a click, not a rewrite.
The DutyCaptain team (that's us, the makers of TraceAvatar)

Another app, built differently: Built with TraceAvatar: SpeedyMessaging →

Try it on your app, free

Open source and free to try, always. Or we make the videos for you.