Skip to main content

Build it

Time to build, on a real project. Everything here is the actual build, with the real screens and the things that tripped us up.

Order matters. Each step depends on the one before it, and building out of order is where wiring gets half-connected:

#StepWhy here
1Shared tools and variablesEvery flow calls them; a node can't reference what doesn't exist
2The session-start lookupEverything downstream reads the employee record it writes
3The entry flowThe front door that routes into the rest
4The letter flowThe worked example — build this one carefully and the next is faster
5The booking flowThe same skeleton, with a real availability gate
6The policy agentNeeds the knowledge base populated first
7Test, then publishPublishing locks the project pending approval

For the mechanics of a node's fields, see the Agent node. These pages are the HR reasoning.

1. Build the shared tools and variables first

Create the workflows every flow calls: getEmployeeDetails, accessCheck, the validate… workflows (year, DOB, appointment date, phone, state, city), and the action workflows generateLetter, checkAvailability, bookAppointment, and notify.

While you're building a template, each of these is a dummy-safe workflow that returns realistic sample data, never a live apiCall. That lets the whole assistant run and be tested end to end today, and you swap in the real system on adoption without touching a single agent.

Create the shared variables in the same pass, all global so every journey can read them:

VariableHolds
employeethe record: id, region, entitlements, eligibility flags
identityVerifiedwhether a flow has proved identity this session
selectedServicewhich journey the entry routed to

A goal or a condition can only read a variable that already exists with the right name and type, so declaring them first saves a round of silent failures. Anything only one flow needs — a letter year, an appointment date — stays journey-scoped.

2. Load the employee at session start

Wire getEmployeeDetails as an On session start hook, with Store output inemployee.

This is the highest-leverage piece of wiring in the assistant. Every journey needs to know who's asking; doing it here means it happens once per conversation instead of once per journey, and no agent has to carry the identity tool.

Have the workflow return a status alongside the record. The hook runs before the first reply, so a failed lookup is otherwise silent — and an agent that only sees an empty variable cannot tell an outage from an unknown employee. Every gate node in the flows below depends on being able to tell those apart.

3–6. The flows

Each has its own page: the canvas, the Start trigger, every node's goal, instructions, tools, exits and variables, and the unhappy paths.

7. Test as you go

After each flow, open the Playground and run the path that should break, not the happy one.

The playground chat showing the letter request and the identity gate.
1/1Testing live: "I need an employment letter" routes into the letter flow, which refuses to proceed until it has verified who is asking.

Drive the unhappy paths on purpose: a self-only employee naming a colleague, an invalid date, an availability check that fails, a policy the handbook doesn't cover. The full set — and how to keep it as a regression suite — is in Prove it.

8. Publish

Publishing is a governed step, and worth understanding before you click it. Publish to Live sends an approval request, and the project locks from further edits until that request is approved. It also promotes to the configured live channels, and knowledge-base files in the live environment are replaced by the current ones.

The Publish-to-Live dialog.
1/1Publish to Live: an approval request, the channels it will go live on, the approver, and a required comment.

Test in draft first — the Playground runs the draft — and publish only once the paths that break quietly are all green.


Next: The entry flow.