Skip to content

Technical Support · Case study

A diagnostic assistant combines observations with questions and actions that help determine the next step. ExecKernel can represent that route and check which choices the available data permits. Your application obtains the observations, presents the instructions and keeps the association between a person and their case.

Technical Support applies that design to an internet connection. Its interface resembles a conversation with a support service: you choose an incident, confirm steps and receive a result. The observations come from prepared scenarios in the backend. Checks, reconnection and support handoffs are simulated actions.

Compare two diagnoses with the same beginning

Section titled “Compare two diagnoses with the same beginning”

Open the demo and select Laptop loses Wi-Fi. Follow these choices:

  1. Only one device is affected.
  2. Wi-Fi is disconnected.
  3. Reconnect and test.
  4. Connectivity test passed.

The application ends with Connection restored. The confirmed route contains edges 101, 201, 211 and 501.

Start a New diagnosis and select Persistent device issue. Repeat the first three steps. The successful test is now blocked, and you can choose Connectivity still fails; escalate, edge 504. The result is Escalated to technical support.

The two scenarios have the same observations except for the final check’s result:

Context value Laptop loses Wi-Fi Persistent device issue
scope "device" "device"
wifi_connected false false
connection_restored true false

Here we reuse the idea of session context: values the engine uses to evaluate choices. This demo prepares them when the case starts. Clicking “Reconnect and test” advances to the step that uses connection_restored; it does not run a network test or change that value.

Technical Support subgraph: both cases share nodes 10, 20, 21 and 50. At 50, connection_restored true permits edge 501 to terminal 90; false permits edge 504 to terminal 93.

The diagram selects the two exits being compared. The complete graph also allows an earlier handoff or an attempt to repeat a diagnosis. The seven scenario definitions show the observations supplied by each scenario.

The conversation shows confirmed choices and, at the end, the terminal’s title and content. The side panel presents observations derived from edges already traversed. A check that has not been visited therefore appears as “Not checked”, even if the scenario has contained its value from the start.

Actual Laptop loses Wi-Fi screen: four confirmed choices, successful connectivity and a Connection restored result. Wi-Fi retains the Disconnected observation from the step where it was checked.

The Wi-Fi status still says “Disconnected” because it describes that observation in the route. The later connectivity check appears separately. The application is explaining a diagnosis rather than displaying current device telemetry.

Actual Persistent device issue screen: the same first three steps lead to a failed test and an Escalated to technical support result.

From a backend observation to an available choice

Section titled “From a backend observation to an available choice”

The browser starts a case by sending its scenario identifier and language. The Node.js backend looks up that scenario in its data and gives its observations to the SDK:

const session = await this.engine(lang).startSession({
...scenario.facts,
scenario_id: scenario.id,
});

This fragment belongs to CaseService.start() in demos/technical-support/backend/src/case-service.ts. scenario is the scenario the backend has just validated. this.engine(lang) constructs a JavaScript SDK client configured for the technical-support graph and the remote API.

This uses the integration described in JavaScript and TypeScript SDK: the SDK sends HTTP operations and the API runs the engine. The service credential stays in the backend. The browser does not submit arbitrary context or decide whether the router is online.

At the verification node, graph conditions connect each exit to a particular observation. This is the fragment for the two edges being compared:

[
{
"edge_id": 501,
"rule": "context_value",
"params": {
"key": "connection_restored",
"operator": "==",
"value": true
}
},
{
"edge_id": 504,
"rule": "context_value",
"params": {
"key": "connection_restored",
"operator": "==",
"value": false
}
}
]

The engine evaluates those conditions and returns the choices’ availability in the payload, the data your application uses to present the current step. This applies the separation between presentation data and interface explained in Payloads and presentation. The application uses that result to enable its controls. Its selectable() function, in frontend/src/api.ts, accepts an option when it is available and is not marked disabled:

export const selectable = (e: Edge) =>
e.availability === 'available' && e.enabled !== false;

The function interprets the payload; it does not reimplement the diagnostic conditions. When someone clicks an option, the backend asks the engine to select it, and the engine checks it again. The buttons, route and result can therefore reflect the same decision.

Keep the case when the engine runs in another service

Section titled “Keep the case when the engine runs in another service”

The application coordinates three pieces:

Piece What it keeps or does
Browser Presents the returned case and sends caseId, revision, edgeId and language to the backend.
Node.js backend and its SQLite database Check which visitor owns the case, associate its identifier with the remote session and record operations whose outcome needs verification.
ExecKernel API Executes the graph and keeps the engine session, including its context and route.

caseId is the application’s reference. The remote session has a different identifier, saved in the backend association and not exposed by the case view. revision identifies the state the interface was displaying; if another operation has changed it, the backend rejects a choice based on the previous revision.

To continue a known case, the backend first restores its session. This fragment condenses the successful selection path inside CaseService, after ownership, revision and recovery checks:

const session = await this.engine(lang).restoreSession(row.engine_id);
await session.selectEdge(edgeId);
const actual = await this.engine(lang).restoreSession(row.engine_id);

row is the persisted case association; edgeId identifies the selected option. The final read obtains the confirmed state and its presentation in the requested language. The backend uses that result to prepare the view that replaces the previous one.

You can observe recovery without causing a failure: finish either diagnosis and reload the page. While the visitor workspace remains valid, the application reads the saved association, restores the remote session and displays the same result and route.

A lost response needs more care. The application records that a selection was in progress and reads the remote state. If it can confirm progress, it updates the screen. If it finds the same revision, it retains the uncertainty and blocks further choices: that read does not prove that the earlier request failed. It also avoids automatically creating another session when a start has no confirmed identifier. Client errors, transport and diagnostics develops this distinction between a rejection and an unknown outcome.

Turn the terminal into an understandable result

Section titled “Turn the terminal into an understandable result”

A terminal payload provides a title and outputs that your application can display or interpret. In Technical Support, the conversation component presents the title and iterates over the outputs:

<h3>{current.payload.title}</h3>
{current.payload.outputs.map((output, index) => (
<p key={index}>
{output.content ?? output.label ?? output.type}
</p>
))}

This is a reduced presentation fragment from frontend/src/main.tsx; current contains the case view sent by the backend. The message’s appearance and the diagnostic panel belong to the application. The graph provides these results:

Terminal Result presented by the demo
90 Connection restored after a successful simulated check.
92 Operator incident identified. Reach it with Regional service incident, then edges 102, 301 and 311.
93 Simulated support handoff for further investigation.

The terminal output describes what happened in the simulation. It does not configure a device or open a ticket. In your application, you would obtain observations from your checks and services, and coordinate any real action as an explicit business operation.

The design lets you change the source of those observations while keeping the responsibilities clear: your backend supplies checked data, the graph determines permitted choices, and your interface explains progress and the result.