Simulation Chatbots
Create the simulation chatbots
-
Under your course page, create a simulation by clicking the “Simulation Chatbot” button.

-
Configure the module icon. You may click the icon to select a color and an emoji.

-
Configure the background image. The background image will be used as the backdrop for the simulation.

You can select a local image or import from a URL.

-
Input the name and description for the simulation.

-
Define characters. A simulation should have at least one character.

In the Characters section, you can also configure optional simulation settings:
- Text-to-speech (Voice): disable to make the simulation text-only (no audio).
- Emotional TTS (Emotional text): enable to allow emotion-aware text output for voice playback (if supported in your deployment).

When editing a character, provide:
- Description: when this character should respond to the user.
- Character profile: background/profile and the rules for the AI model to follow.
- Examples and sample questions (optional).
- (Optional) Advanced settings: assistant mode and voice / emotional TTS settings.


You can define additional characters, e.g., an assistant character to respond to general questions. The parameter
{available_actions}can be used in the character profile so the AI model knows the available actions in the scenario.In Advanced settings for a character, you can optionally configure:
- Assistant Mode: when enabled, this character will only respond in a
separate assistant chat dialog (useful for a general “Assistant” that
shouldn’t mix with the patient transcript).

- Memory scope: controls how much conversation history the character sees — Full conversation, Own replies only, or No memory (each turn is independent). Useful for evaluators or characters that should not reference earlier off-topic chat.
- Text-to-speech (Voice): enable/disable voice playback for the simulation.
When enabled, you can choose a voice for the character.

-
Configure the trigger message. The trigger message defines the message to be sent to the character when the simulation starts.

-
Click “Create” to create the module. After creating the module, you will be redirected to the module page. If you wish to hide the module from the students, click “Edit” and switch the visibility to “Hidden from students”.

Export and import simulations
You can copy a simulation configuration between courses or back it up as a file. Export and import are available in two places:
- Create page — accordion Import Existing Simulation (import only; no export on create).
- Module settings page — accordions for JSON and XLSX export and import.
JSON (recommended for full fidelity)
JSON is the richest format. It includes characters, actions, starter guide pages,
reference asset IDs, completion trigger, voice/emotional-TTS settings, multi-stage
rules, design documents, and all other settings data.
| Import location | What survives |
|---|---|
| Settings page | Full round-trip — all fields including settings. |
| Create page | Form fields plus imported settings (stages, design docs, TTS flags, etc.) are preserved when you click Create. |
Tips:
- Use JSON when cloning a simulation with stages, Scenario Overview pages, or design documents.
- Reference asset IDs (
viewerAssetIds) are copied as-is. Assets must exist in the target course or learners will not see those references. - Export/import operates on the saved simulation, not an in-progress AI designer draft. Use Revise with AI after import if you need further AI edits.
- Simulation grading rubrics are managed separately on the grading page (not included in simulation JSON/XLSX).
XLSX (spreadsheet-friendly subset)
XLSX is useful for bulk-editing characters and actions in Excel or Google Sheets. A full export includes these sheets:
| Sheet | Contents |
|---|---|
| Agents | Characters including voice, memory scope, assistant/implicit flags, output mime type |
| Actions | Actions including output mime type (Text vs Widget) |
| Simulation Overview | Name, description, icon, colors, avatars, trigger, viewer asset IDs |
| Starter Guide | Scenario Overview pages (page, title, content) |
| Settings | Completion trigger, TTS, emotional TTS, language code |
| Stage Meta | Stage count, DESIGN.md, Instructor Guide |
| Stage Rules | Stage goals, minimum/maximum student messages, and how students move between stages |
| Action Stages | Which stages each action appears in |
Older XLSX files with only the first three sheets still import correctly; optional
sheets are skipped when absent. On the settings page, a partial XLSX import
that omits settings leaves your existing stage and TTS configuration unchanged.
Note: The simulation map layout is recomputed on load (auto-layout). Manually dragged node positions are not stored in export files; stage structure, characters, and actions round-trip correctly.
Multi-stage simulations
You can split a simulation into 1–10 stages (for example history taking → examination → management). Many simulations only need one stage. Add more when students should work through clear steps in order.
How stages work
Open How stages work to set two choices that apply to the whole simulation:
How learners continue
| Choice | What students see |
|---|---|
| Learner chooses when to continue | After they send enough messages, a Continue button appears (or Complete simulation on the last stage). If they hit the maximum messages, chat waits until they continue. |
| Continue when goals are met | After the minimum messages, AI checks the stage goals after each student message and moves them on when the goals are met (or when they reach the maximum). |

When the learning journey ends
| Choice | What happens after the last stage |
|---|---|
| Show a completion summary | The simulation ends and the student sees a completion summary. |
| Keep the conversation open | Students can keep chatting after the last stage. |

Settings for each stage
For every stage you can set:
- A Stage title
- What should learners achieve? — up to 3 goals students see as a checklist
- Minimum messages before they can move on
- Maximum messages (required) so they never get stuck
- If you chose Continue when goals are met: optional notes for How AI can tell these objectives are met

You can edit stages in:
- Generate with AI / Revise with AI — Stages tab, or the Map view in the Builder tab (click a stage block)
- Module settings — Simulation stages and Simulation map

Which actions appear in which stages: in the map or action editor, choose
when each / action is available.
Different character guidance per stage: in a character profile, you can use
headings like ## [all] (always) and ## [stage 1] / ## [stage 2] (only in
that stage).
If you add stages but do not set message limits, students mainly follow the character guidance by stage; the editor warns you when a stage still needs an end rule.
Simulation map
The Simulation map (settings page and AI designer Builder → Map) is a visual picture of your simulation:
- Start block — drag a line to a character to choose who speaks first
- Stage blocks — shown in a chain when you have 2 or more stages; click to edit
- Character and Action blocks — click or drag the chips onto the canvas to create; select a block to edit or delete
Use Auto layout to tidy the layout. The structure (stages, characters, actions, who speaks first) is saved. Where you drag blocks on the canvas is only for this session.

Design documents and Scenario Overview
Authoring documents live under the AI designer Documents tab and the module settings Design documents and Starter guide cards:
| Document | Who reads it | Purpose |
|---|---|---|
| Design notes | You (instructor) | Why the simulation is structured this way |
| Scenario Overview | Students | Pages they can read before or during the simulation |
| Instructor Guide | You (instructor) | Notes for facilitating or debriefing |
In multi-stage simulations, Scenario Overview pages unlock stage by stage (page 1 for stage 1, etc.). Learners see a lock icon on pages they have not reached yet.
The AI designer can generate all three documents automatically after you approve the plan. You can also edit them yourself with the View / Edit toggle.
Generate simulation with AI
Instead of building every character and action by hand, use the AI designer. Describe the scenario on a start screen, confirm a plan, then review the draft it builds. Students never see anything until you click Create simulation (new) or Apply & continue (revise).
You can open it in two ways:
- New simulation — on the create page, click the purple Generate with AI button (bottom-right).
- Existing simulation — on the module page, click Revise with AI. Your current characters and actions load so you can ask for focused changes.


Step 1 — Describe the simulation
The AI designer opens as a full page titled Build your simulation. Type the scenario, optionally add references and settings, then send.

Numbered outline borders in the screenshot match the labels below:
- Scenario — who the student plays, who they talk to, what they should practise, and what makes it challenging. You can list several goals in the same box. Enter sends; Shift+Enter starts a new line.
- Add reference (
+) — optional documents, course assets, or an existing simulation for the designer to use in this session. - Simulation settings (sliders icon) — type, language, stages, model, and reasoning effort. Defaults work for most cases; a small dot appears on the icon if you change them.
- Start designing (up-arrow button) — enabled after you enter a scenario.
Simulation settings
Click the sliders icon to open settings. Numbered borders match the labels below.

-
Simulation type
Type Best for Learner /toolsRole-play (default) Coaching, sales, HR, other talk practice Only if you ask for them in the scenario Medical Clinical practice (history taking, patient talk) Drafted by default (for example lab results) -
Language — the language for the simulation text (for example English).
-
Stages
- One stage — one continuous conversation.
- Multi-stage — several steps in order (for example history → exam → plan). Choose how many stages (2–10).
- Let AI decide (default) — the designer chooses based on your brief.
-
Designer model — which model plans and drafts first. Auto model is the default.
-
Reasoning effort — how much thinking the designer uses. Low reasoning is the default. You can change model and effort later in chat.
Optional references
Click + to attach material. Numbered borders match the labels below.

- Upload documents — a case note, brief, or script (PDF, Word, Markdown, text, HTML, CSV, JSON, XML, or YAML). The designer reads it for this session only; it is not saved as a course file. You can also drop a file on the page or paste a long block of text.
- Choose course assets — pick materials from this course.
- Reference a simulation — attach an existing simulation from this course. By default it is Reference only: the designer reads a summary for patterns and your draft is unchanged. Switch to Copy as working draft to remint its characters, stages, tools, and rubric into this session and edit the copy. Create simulation still saves a new simulation either way.
Attached items appear as chips under the scenario. Click a chip to preview; click × to remove it. A long paste (4,000+ characters) becomes an attached text file so the scenario box stays a short brief; you still need a short scenario before you can send.
When ready, click Start designing (or press Enter). Click Back or the close icon to return to the create form without starting.
Step 2 — Confirm the plan, then implement
After you start, the designer opens a full workspace:
- Left — chat with the designer
- Right — tabs where you review and edit the draft
New simulations always begin with a plan, unless you attached an existing simulation as a working draft. In that case the right-hand panes already show the copy and chat edits it instead of generating from empty.
Otherwise the designer does not create characters yet. Read the plan in chat, then choose Implement (or Start Implementing) — or select that option and click Submit.

What the plan is about
Plans can be about:
| Plan says | Meaning | Approve with |
|---|---|---|
| Full simulation | The whole first draft (usual after Start designing) | Implement / Start Implementing |
| Character | One person in the scenario (patient, coach, etc.) | Start Creating |
| Action | One learner / tool (lab panel, checklist, etc.) | Start Creating |
Nothing is written into the draft until you approve.
After you implement a full plan, the designer creates design notes, the main
character, stages (if needed), learner / tools when the type is Medical
(or when the plan asked for them), and a grading rubric outline. You can keep
chatting to refine anything.
If you want changes before building, choose No, and tell the designer what to do differently, type your feedback, and submit.
Leave planning — unlocks the right tabs so you can browse the workspace. The plan stays in chat with Implement. Messages you type after leaving are normal chat (not “change this plan”).
Step 3 — Learn the workspace tabs
Use the tabs across the top of the right panel:
| Tab | What you do here |
|---|---|
| Info | Name, description, icon, voice playback, opening message, and related settings |
| Stages | How students move between stages, goals for each stage, and message limits |
| Builder | Characters and actions — List or Map view |
| Documents | Design notes, Scenario Overview (for students), Instructor Guide |
| Rubric | Create grading criteria, pick the grader model / thinking level, then test in Preview with Complete & Grade |
| Preview | Try the simulation as a student, including grading |

Tips for the tab bar:
- Undo / Redo — reverse or restore your edits to the draft.
- Pop out — open the current tab in a floating window so you can see chat and the panel side by side. Dock it again when finished.
- Closing the designer asks what to do with unsaved work: Stay, Discard changes, or Apply & close (when there is something to apply).
Step 4 — Chat with the designer (bottom bar)
The chat box at the bottom left is how you talk to the designer.
Plan vs Build (toggle on the chat box)
Think of this as “think first” vs “build now”:
| Setting | What it does |
|---|---|
| Plan (On) | The designer asks questions and shows a plan first. Nothing in the draft changes until you approve with Implement, Start Creating, or Start Editing. |
| Build (Off) | When you ask for a change, the designer can update the simulation straight away (when it has enough detail). |
Use Plan when you are still deciding. Use Build when you are ready to create or edit.
Note: After Start designing, the first plan still appears even if Build is on. That first blueprint always needs your approval.
Character vs Action — how the designer knows
Say what you want in plain words, or focus one item (below):
| You want… | Example you might type |
|---|---|
| A person (Character) | “Add a worried relative.” / “Make her more anxious.” |
| A learner tool (Action) | “Add lab results.” / “Add a vital signs panel.” |
What is an “action”? A shortcut students type in chat (/) to open
something useful (results, notes, a chart). In Builder they appear under
Actions.
Focus one character or action (edit only that item)
When you want changes to apply to one person or tool only:
Way 1 — click in Builder
- Open the Builder tab.
- Click a character or action card.
- The chat box shows Editing: [name] — your next message only changes that item.
- Click × on the chip to clear the focus.

Way 2 — type @ or / in chat
- In the chat box, type
@to pick a character, or/to pick an action. - Choose from the list that appears.
- Type what you want changed.

While the designer is working
- You can still type. Your message is queued and sends when the current reply finishes. Use Edit or Cancel on the queue if you change your mind.
- Use Stop if a reply is taking too long, then Retry if needed.
- Suggestion chips under messages let you answer without typing.
Checkpoint cards
When the designer changes the draft, chat shows a plain-language summary (for example “Added character” or “Updated stage”). Open Show what changed for details. Use Return to this version if you want to go back to that snapshot.
Step 5 — Review each tab
Info
Check the simulation name, description, icon, voice playback, opening message, and related settings. Edit anything directly, or ask in chat.

Stages
Set how students continue and when the journey ends, then fill each stage’s title, goals, and message limits. You can also click Generate stages or Generate objectives for a first draft.

Builder
- List — cards for characters and actions. Use + Character or + Action, or ask in chat.
- Map — visual blocks: Start, stages, characters, and tools. Click a block to edit; use Auto layout to tidy the picture.


Actions can show plain text or an interactive panel (for example a chart or results table). See Interactive action widgets later on this page.
Documents (three written guides)
Open the Documents tab. You will see three sub-tabs — each is for a different audience:

| Sub-tab | Who reads it | What to put there |
|---|---|---|
| Design notes | You (instructor) | Why the simulation is structured this way — your private design notes. |
| Scenario Overview | Students | What students read before or during the run: background, goals, tips. |
| Instructor Guide | You (instructor) | How to run the session: debrief questions, common mistakes, answer keys. |
For each sub-tab you can:
- Switch View (read) or Edit (type yourself).
- Click Generate or Regenerate for an AI first draft.
- Use Add guide page on Scenario Overview to add another page.
If you change characters or stages later, you may see Update affected sections so documents stay in sync.
Rubric (grading criteria)

- Click Generate rubric (or Regenerate rubric to replace).
- Edit each criterion — Name, What it evaluates, Weight (%), Scope, and Scoring instructions. Weights must total 100%.
- Click Add criterion or Remove criterion as needed.
How to test grading (step by step)
Follow the numbered outline borders in the screenshots:
- Preview tab — open Preview, click Get Started, and chat as a student would (outline 1 = chat area, outline 2 = message box).

- Complete & Grade — when you have enough messages, click Complete & Grade now in the chat bar (same button students use).

- View results — a scorecard opens with the total score and per- criterion feedback. Click Done to close. Use View results later to open it again until you reset Preview.

You can also start from the Rubric tab: click Test in Preview, then follow steps 2–3 above.
Nothing from this test is saved for students — it only checks your draft rubric.
On the same Rubric tab, you can also pick which model grades the rubric and how much thinking it uses. Defaults are fine for most tests.
Preview (try before you publish)
Use Preview any time to see what students will experience:
- Start with Get Started — Preview does not chat until you begin.
- Use
/for actions and@to pick a character when there is more than one. - Multi-stage simulations show the same Now bar and Continue controls students see.
- Magic reply (sparkle on the message box) — optional. Fills in a short reply as if you were the student, so you can test faster. Edit it before sending if you want.
- Switching tabs keeps your test chat unless characters change in a big way.
Step 6 — Create or apply
When you are happy with the draft:
- New simulation — click Create simulation (bottom-right). The module is created and you go to the module page.
- Revise — click Apply & continue (or the apply control shown) to update the existing module. Only what you asked to change is updated.

Nothing is published to students until that final create or apply step succeeds.
If you leave mid-way: progress is kept for this create session. The next time you open Generate with AI on the same create page, you can resume or start fresh. Each existing simulation has its own revise session.
Quick reference — every control you will see
| Control | Simple meaning |
|---|---|
| Generate with AI | Open the designer for a new simulation |
| Revise with AI | Open the designer with an existing simulation loaded |
| Start designing | Leave the start screen and open the workspace |
| Implement / Start Implementing | Approve a full-simulation plan and build the first draft |
| Start Creating | Approve a plan about one character or one action |
| Start Editing | Approve a plan that edits something already in the draft |
| Leave planning | Unlock the right tabs; plan stays in chat with Implement |
| Plan / Build | Think first (Plan) vs edit now (Build) |
| Full simulation plan | Blueprint for the whole first draft |
| Character plan | Plan about a person in the scenario |
| Action plan | Plan about a learner / tool |
| Editing: [name] | Your next chat message only changes that item |
| @ / / | Pick a character or action to focus in chat |
| Queued | Your next message waits until the current reply finishes |
| Stop | Cancel a long reply |
| Checkpoint → Return to this version | Undo AI changes back to an earlier snapshot |
| List / Map | List of cards, or a visual map of the simulation |
| Pop out | Float a tab in its own window |
| Undo / Redo | Step back or forward through your edits |
| Design notes | Your private design document (Documents tab) |
| Scenario Overview | Student briefing pages (Documents tab) |
| Instructor Guide | Your facilitation notes (Documents tab) |
| Generate rubric | Create grading criteria from your objectives |
| Grader model / thinking | On the Rubric tab — which model grades, and how hard it thinks |
| Test in Preview | Jump to Preview to try grading |
| Complete & Grade | Grade your test chat with the draft rubric |
| View results | Reopen the last test scorecard |
| Magic reply | Optional AI-filled student message in Preview |
| Create simulation / Apply & continue | Save the draft into the real module |
| Stay / Discard / Apply & close | Choices when you close with unfinished work |
Interactive action widgets
Simulation actions (commands students trigger with / during a simulation, such as “check blood pressure” or “view lab results”) normally return a plain text or formatted markdown response. With the interactive widget format, you can replace that text with a fully interactive HTML panel — charts, tables, diagrams, animations, or any custom layout — rendered live inside the simulation.
Accessing the widget editor
The widget format is available in the action editor. Open an action to edit it (either in the simulation creation form or via Settings → Actions on an existing simulation):
- Set the action’s Answer mode to Predefined (fixed output rather than AI-generated).
- A Format control appears in the top-left of the output area with two options:
- Text — rich text output (formatted text, tables, lists).
- Widget — an interactive HTML panel.
Converting existing text to a widget
When you already have text content in the output field and want to turn it into a widget automatically:
- While in Text format, click Convert to interactive widget (violet button with sparkle icon at the bottom-right of the text editor).
- The AI reads the existing text and the action name/description, then generates an equivalent HTML widget.
- The editor switches to Widget format and opens the Preview tab so you can see the result immediately.
You can then refine the widget further using the AI refine input or edit the HTML directly.
Working in Widget mode
Once in Widget format, the editor has three areas:
Code / Preview toggle
A segmented control at the top-right lets you switch between:
- Code — a full Monaco HTML editor. Edit the raw HTML, CSS, and JavaScript directly. Changes are reflected immediately when you switch to Preview.
- Preview — a sandboxed live preview of the widget rendered exactly as students will see it.
AI refine input
Below the widget area there is a text field where you can describe changes in plain language, for example:
- “Add a row for CRP and highlight values above normal range in red”
- “Use a dark header and add a trend arrow for each vital sign”
- “Generate a vital signs grid with colour-coded tiles”
Press Enter (or click the send button) to apply the change. The AI updates only the widget HTML and shows the updated preview automatically. You can iterate as many times as you like.
Switching between Text and Widget
Text and Widget are stored separately for the same action. Switch the Format control any time — the other version is kept. A small badge can show when a saved Text or Widget version is waiting.
Click Convert to interactive widget when you want the AI to build a Widget from your current Text. That saves the Text version first, then opens Widget.
Rich content support
Widgets support a wide range of interactive content. The renderer automatically loads the required libraries based on what the HTML uses:
| Capability | How to use it |
|---|---|
| Charts and graphs | Use the Chart.js API (new Chart(...)) or add data-rich-lib="chartjs" to any element |
| Diagrams | Add data-rich-lib="mermaid" or use a <div class="mermaid"> block |
| 3D model viewer | Add data-rich-lib="model-viewer" or use the <model-viewer> tag |
| Animations | Add data-rich-lib="animate" or apply animate__animated CSS classes (Animate.css) |
| Tailwind CSS | Always available — all HTML widgets load Tailwind automatically |
| Icon system | Iconify icon web component (<iconify-icon>) is always available in HTML widgets |
All widgets run in a sandboxed iframe so they cannot access the rest of the application.
Example use cases
- Vital signs panel: a colour-coded grid of heart rate, blood pressure, SpO₂, and temperature — highlighting abnormal values in amber or red.
- Lab results table: a formatted table of blood test results with reference ranges and flags.
- ECG strip or diagram: an SVG or canvas-based waveform embedded directly in the action result.
- Step-by-step procedure viewer: an animated walkthrough of a clinical procedure with progress indicators.
- Sales objection card: a role-play action that reveals a formatted objection card with talking points when triggered.
Start Simulation
This section shows what the simulation experience looks like for students.
-
Students open the simulation module and click Get Started.

-
After the simulation starts, the character will describe their problem. Students can ask questions through the input box.

-
In multi-stage simulations, a quiet Now bar above the chat shows the current stage (for example Stage 2 of 4 · Assess the patient). If they still need to send more messages before moving on, the bar shows a hint such as Send 2 more messages before you can continue.

Students can click the stage name to open Stage progress — completed stages, goals for the current stage, and locked later stages.

If you chose Learner chooses when to continue, a Continue button appears after the minimum messages (Complete simulation on the last stage).

If you chose Continue when goals are met, students may see View assessment under a character reply. Opening it shows which goals are done and what to try next.

If you turned on grading with a rubric, students may also see Complete & Grade now near the chat box.
-
Type
/to open the action menu (e.g., check the angle depth). After selecting an action, the system will return a predefined result.

-
If there is more than one character, type
@to specify the conversation target. The selected character will respond to the input.

-
Use the speaker button to turn text-to-speech audio on/off (if voice is enabled in the simulation). This only affects playback on the student’s side.

-
Click the history button to view previous conversations in this simulation. Select a record from the panel to review past attempts.

-
Use restart to start a new simulation attempt with a fresh transcript.

-
(Optional) Toggle the 2D view button to show/hide the 2D scene panel. If 2D mode is disabled, students can continue with a chat-focused view only.


-
(Optional) Some simulations include an Assistant (in a separate chat dialog). Students can use it for general guidance (e.g., “what should I do next?”) while keeping the main chat focused on the patient.