Learner Memory
How It Works
Section titled “How It Works”Learner memory lets you persist data across slides, modules, and courses. When a learner interacts with a slide, variables can be saved and reused later — for example, recording their profession in one course and using it to personalize prompts in another.
Variables are stored per learner in a dedicated database table (wp_sm_learner_memory). Each variable has a name, a value, and a scope that determines where it’s accessible.
Learner identity is resolved in two ways:
- Authenticated learners — Identified by their WordPress user ID (via SCORM, xAPI, or
sm_userURL parameter). Memory is linked permanently to the user account. - Anonymous sessions — When no learner ID is available (no LMS login), SlideMind generates a UUID v4 session ID stored in the browser’s
localStorage. Memory persists across page reloads within the same browser but is purged after a configurable TTL (default: 24 hours). This lets memory work for short trainings without requiring user accounts.
Scopes
Section titled “Scopes”| Scope | Accessible from | Use case |
|---|---|---|
| Global | All courses and modules | Learner name, profession, preferences — data shared everywhere |
| Course | All modules within a specific course | Course-specific context (e.g., chosen scenario path) |
| Module | Only within a specific module | Module-specific progress or state |
Using memory variables in prompts
Section titled “Using memory variables in prompts”Insert memory variables in your system prompt with the {{memory.key}} syntax:
The learner's name is {{memory.first_name}}.They work as a {{memory.profession}}.Scope resolution cascade: When you use {{memory.key}} without specifying a scope, SlideMind looks for the value in this order:
- Module scope (if the slide has a parent module)
- Course scope (if the slide has a parent course)
- Global scope
The first match wins. This lets you override global values at the course or module level.
Forced scope: Use {{memory.global.key}}, {{memory.course.key}}, or {{memory.module.key}} to target a specific scope directly.
Saving variables to memory
Section titled “Saving variables to memory”There are three ways to save data to learner memory. They can be combined on the same slide.
1. Capture mode (dedicated slides)
Section titled “1. Capture mode (dedicated slides)”Create a slide in Capture mode to save e-learning editor variables to memory without any AI interaction. This is the simplest approach when you just need to collect data.
In the Wizard (step 3) or slide edit page, define each variable to capture:
| Field | Description | Example |
|---|---|---|
| Memory key | The name SlideMind uses to store the value. Lowercase, digits, underscores. | profession |
| Scope | Where the variable is accessible: Global, Course, or Module. | Global |
| Editor variable | The variable name in your e-learning editor. | Learner_Profession |
Capture mode still requires setup on the e-learning side: paste the generated JavaScript code into a trigger in your authoring tool (e.g. a Storyline “Execute JavaScript” trigger). The code reads the editor variables and sends them to SlideMind — the capture itself is automatic once the code runs, but it won’t happen without the trigger. See the Authoring Tool Guides for setup steps.
Other slides can then use {{memory.profession}} in their prompts.
Why can’t the HTML Widget capture variables? Capture mode reads values from the e-learning editor’s variable system (e.g. Storyline’s
player.GetVar()). The HTML Widget runs inside an iframe, which is sandboxed from the host page — it has no access to the editor’s JavaScript API. This is why the Widget option is disabled for Capture mode, and why the “Capture variables” advanced option (below) also requires editor-based integration, not the widget.
2. Auto-save exchange (Q&A and Chat modes)
Section titled “2. Auto-save exchange (Q&A and Chat modes)”Save the learner’s message and/or the AI response to memory — automatically, after each interaction. This is configured in the Advanced options section of the Wizard (step 3) or slide edit page.
Check Save exchange to memory to reveal the options:
| Option | Description |
|---|---|
| Learner input | Check to save what the learner typed. Specify a memory key (e.g. input_slide12). |
| AI response | Check to save the AI’s answer. Specify a memory key (e.g. response_slide12). |
| Scope | Where to store the values: Global, Course, or Module. |
At least one of the two (input or response) must be checked.
Memory keys are auto-generated from the slide title and number (e.g. a slide titled “Quiz 3” generates input_quiz3 and response_quiz3). You can customize them manually.
Use case: Save the AI’s evaluation from slide 5 so that slide 10 can reference it with {{memory.response_quiz3}} — building a progressive learning experience.
3. Capture variables alongside AI (Q&A and Chat modes)
Section titled “3. Capture variables alongside AI (Q&A and Chat modes)”You can capture e-learning editor variables to memory even in Q&A or Chat mode — the capture happens alongside the AI interaction, not instead of it. This option is in the Advanced options section.
The configuration is the same as in Capture mode (memory key, scope, editor variable). The difference is that the AI interaction still happens normally — the capture is an additional side effect.
Use case: A Q&A slide asks the AI to evaluate a learner’s answer, while simultaneously saving the learner’s profession (from a Storyline variable) to memory for use in future slides.
Memory Hub
Section titled “Memory Hub”Go to SlideMind > Memory to manage memory definitions and learner data.
Definitions tab
Section titled “Definitions tab”Manage the central list of memory variables:
- Global variables — Create, edit, and delete variable definitions (name + description). These definitions are a shared vocabulary across your slides.
- Learner count — Each variable shows how many learners have a stored value.
- Bulk actions — Select multiple variables, then save to memory, load into editor, or delete them.
Slide-defined variables
Section titled “Slide-defined variables”A read-only table that aggregates all memory variables configured across your slides. For each variable, the table shows:
| Column | Description |
|---|---|
| Variable | The memory key name |
| Scope | Global, Course, or Module |
| Source slide | Link to the slide where the variable is defined (with editor variable name in parentheses) |
| Module | Parent module, if any |
| Course | Parent course, if any |
| Learner count | How many learners have a stored value for this variable |
This gives you an overview of all memory variables in use, without opening each slide individually.
Profile variables
Section titled “Profile variables”Configure which WordPress user fields are available as {{profile.field}} variables in prompts — directly from the Memory Hub.
Each detected plugin source (WordPress, BuddyBoss, LearnDash, etc.) appears as a collapsible section. Check the fields you want to allow, then click Save profile settings. Only whitelisted fields are resolved in prompts when a learnerId is provided.
You can also generate code to inject profile values into the e-learning editor: check at least one field, then click Load into editor to get the integration code for your authoring tool.
Note: This is the same profile configuration available in SlideMind > Settings > Profile. Changes made here are reflected there and vice versa.
Save to memory (capture code)
Section titled “Save to memory (capture code)”Generate standalone code that sends e-learning variables into learner memory — without any AI interaction:
- Select variables in the definitions table (checkboxes).
- Click Save to memory in the bulk action bar.
- In the modal, map each variable to its editor variable name.
- Select your authoring tool (Storyline, Captivate, Lectora, DominKnow, iSpring).
- Copy the generated code.
The code calls POST /wp-json/slidemind/v2/memory/set directly. It uses an internal memory_bridge configuration that’s auto-created and invisible in the admin.
Load into editor (retrieve code)
Section titled “Load into editor (retrieve code)”Generate code that loads saved memory values back into the e-learning module:
- Select variables in the definitions table (checkboxes).
- Click Load into editor in the bulk action bar.
- In the modal, map each memory variable to the editor variable that will receive its value.
- Select your authoring tool (Storyline, Captivate, Lectora, DominKnow, iSpring).
- Copy the generated code.
The code calls POST /wp-json/slidemind/v2/memory/get and sets each editor variable with the retrieved value.
Learner Data tab
Section titled “Learner Data tab”View and manage individual learner data:
- Learner list — Paginated list of all learners with stored data. Anonymous sessions appear with a truncated session ID (e.g. “Anonymous (abc12de8…)”).
- Learner detail — View all variables for a learner or anonymous session, edit values manually, or delete specific entries.
- Purge — Delete all data for a specific learner or anonymous session.
- Export — Download a learner’s data as CSV.
Value Serialization
Section titled “Value Serialization”Memory values are serialized for storage:
| Input type | Stored as |
|---|---|
| Null / empty | Empty string '' |
| Boolean | '1' or '0' |
| Number | String representation |
| String | As-is (max 64 KB) |
| Array / Object | JSON string (max 64 KB, 1000 elements, depth 10) |
Next steps
Section titled “Next steps”- Variables — Variable system, profile variables, return variables, response example
- Core Features — Learner Integration, Sandbox, Templates, Code Generator, Wizard
- Authoring Tool Guides — Integration code for each e-learning authoring tool
- Administration — Dashboard, analytics, settings, CORS