Introduction
This documentation details the installation steps to set up a Praxis AI Instance into Canvas using the Canvas Theme Editor. When installed in the Theme, the Instance becomes embedded into Canvas’s pages.
Prerequisites
Before you begin, ensure you have:- Canvas admin access with permissions to edit themes
- Theme Editor permissions for your target account or sub-account
- A Praxis AI Digital Twin instance created at pria.praxislxp.com
- Your Digital Twin’s public instance ID (found in Configuration & Integrations)
- Whitelisted domains:
pria.praxislxp.comandprialti.praxislxp.com
Add a Praxis AI Instance to your Theme
To add a Praxis AI Instance globally to a Canvas account, you will upload a segment of JavaScript in the Theme used by the account or sub-account of your choice.Customize the SDK
Refer to the SDK customization section of this guide to ensure you configure the appropriate digital twins for your specific use case.
Edit Canvas Theme and Upload SDK
Navigate to Admin Settings and Select the Subaccount
Begin your integration by organizing your Canvas environment:
- Create a Praxis subaccount in your Canvas instance
- Move courses that will use digital twins into this subaccount
-
Access admin settings and select the Praxis subaccount to continue configuration

Select Themes
Click on the current Theme to open the Theme Editor.

Open Theme Editor
Click on the “Edit” button to open the Theme Editor.

Upload Tab
Click to the Upload tab on the left.

Instructure: How to Upload Custom JavaScript and CSS Files
We follow instructions similar to those posted Instructure’s documentation on how to upload custom JavaScript and CSS files to an account.
Customizing the SDK
In this step, you will customize the Javascript SDK you downloaded to specify what instance of Praxis AI to use. Edit the filepria-sdk-canvas.js from your download
Disabled by Default
If you prefer to disable Praxis AI by default set theINSTITUTION_ID to undefined
Require Teacher Onboarding
If you prefer to use the “Teacher Onboarding” process, leave theINSTITUTION_ID field blank (e.g. “”) like this:
Assign all to Praxis AI Instance
If prefer to assign everyone to the same Praxis AI instance (for the sub-account), then set the value of theINSTITUTION_ID to the instance public ID given to you by Praxis , ex: 5fd6d7a4-4cc7-4e04-8473-e89aef4e…
The value of the
INSTITUTION_ID field is unique to your instance of Pria. Keep this ID confidential.INSTITUTION_ID Reference
| Value | Behavior |
|---|---|
undefined | Pria is disabled — the button does not appear and nothing loads. Use this as the default when you want to selectively enable Pria only for specific courses or accounts. |
'' (empty string) | Teacher Onboarding — the teacher (or admin) is prompted to select an existing Digital Twin or create a new one and associate it to the current course. |
'5fd6d7a4-...' (specific ID) | Fixed Digital Twin — all users in this context are connected to the specified Praxis AI instance. No onboarding wizard is shown. |
Customize the Instance icon
You can change the icon of the button that will appear on the screen with the following variable: If you like to keep using Pria’s icon, leave theINSTITUTION_ICON_URL as undefined

Display Options
You can customize the position, size and container of the Instance’s button as well as the main window with the following JavascriptDISPLAY_OPTIONS variable:
| Option | Default / Allowed Values | Description | Notes |
|---|---|---|---|
| fullScreen | true | false (default) | Display Pria in fullscreen. | |
| openOnLoad | true | false (default) | Open Pria immediately on load or keep closed until user clicks the Pria button. | |
| buttonWidth | CSS width value | '80px' (default) | Size of the Pria button. | See CSS width examples. |
| buttonPosition | CSS position value | 'fixed' (default) | Position type of the button. Default is fixed, but can be relative or absolute. | |
| buttonPositionBottom | CSS bottom value | '20px' | Distance from the bottom edge of the screen (only applies to fixed or absolute position). | See CSS bottom examples. Example: calc(100% - 80px) to place icon at top. |
| buttonPositionRight | CSS right value | '20px' | Distance from the right edge of the screen (only applies to fixed or absolute position). | See CSS right examples. Example: calc(100% - 40px) to place icon at center. |
| buttonNoBounce | true (default) | false | Whether the button bounces when displayed. | Default: no bounce. |
| priaContainerId | Element ID | '' (BODY by default) | Parent element for Pria UI iFrame. | Empty value appends to <body>. |
| buttonContainerId | Element ID | '' (BODY by default) | Parent element for the Pria button. | Empty value appends to <body>. |
| allowPop | true | false (default) | Option to open Pria in a new tab. | Deprecated due to third-party cookie restrictions. |
loadPria() function.
the loadPria() function will not load Pria twice if it happens to be called more than once.
loadPria() function is placed when the student or teacher is on a course page. This determination is done using a regular expression with the function onPage() like below:
In Canvas, course pages have URLS that match this structure https://my-univertivt.canvas.edu/courses/106/… and this is what we rely on to determine to loadPria() so it loads only for courses.
Load for certain courses
It is common that administrator want to load a Instance only for certain courses, while it stays disabled for all the others. In this case, set the defaultINSTITUTION_PUBLIC_ID to undefined.
Insitution Specific Courses
79875, 72856, or 55621, then we set the INSTITUTION_ID to a specific instance, and customize the icon to our own URL
Teacher Specific Courses
Similarly, you may choose to enable the Instance (let teacher crete their own twins) for a specific set of courses. To do so, simply set theINSTITUION_ID to empty string like this:
Instance per Teacher
You can write Javascript code that selects a specific Praxis AI instance for each teacher courses for example:Nesting Conditions
You can nest conditions to create complex logical rules. For example, place anisInAccounts() check inside an onPage() conditional to control loading by both page type and Canvas account:
onPage, isInAccounts, isInCourses, hasAnyRole, isStudent, etc.) to build the exact logic you need. Remember the three INSTITUTION_ID values you can set inside these conditionals:
| Set to | Effect |
|---|---|
undefined | Pria will not load |
'' | Teacher chooses or creates a Digital Twin |
'your-instance-id' | Loads a specific Digital Twin |
Useful Functions
The Javascript SDK has a lot of additional useful functions you can. Let’s take a look at those.hasAnyRole()
hasAnyRole()
The function hasAnyRole() determines if the current user has the specified role (ex:user, teacher, admin,root_admin)
isUser()
isUser()
The function isUser() determines if the current user is the one specified by id (ex: 1)
isInUsers()
isInUsers()
The isInUsers() function determines if the current user is in the array of specific user ids
isStudent()
isStudent()
The function isStudent() determines if the current user is a student
isCourse()
isCourse()
The function isCourse() determines if the current page is in a specific course (ex: id 123)
isInCourses()
isInCourses()
The function isInCourses() determines if the current course is in an array of specific courses
onElementRendered()
onElementRendered()
The onElementRendered() function is triggered when an element is fully displayed in the page Example below is an anchor referenced by ID create_ticket.
isInAccounts()
isInAccounts()
The isInAccounts() function determines if the current Canvas account (or sub-account) is in an array of specific account IDs. This is useful when you want to load a specific Digital Twin only for courses within certain Canvas sub-accounts.It reads You can also use it to disable Pria for all accounts except the ones listed:
ENV.ACCOUNT_ID from the Canvas environment and checks whether it matches any of the provided IDs.The ENV variable
In Canvas, a Javascript object calledENV is available to any pages rendered in the Application. When injected as a Theme, the Instance has access to the variable and uses it to determine who is the current user, or what course is he/she launching.
To review the properties made available by the ENV variable, open a course page in Canvas, and launch the Developer Mode (F12 on Windows - developer tools on Mac) then in the Console window, type ENV then press the ENTER key.
Here is an example of such variable:
-
current_userproperty -
current_user_rolesproperty: -
current_contextproperty:
Install the Instance SDK into Theme
Once you have customized your SDK Javascript file and added the logic to load the Instance when the proper conditions are met, you are ready to add it to your current ThemeUpload JavaScript SDK
- In the Theme Editor, Upload Tab, under the JavaScript File section, click on the Select button
- Select the pria-sdk-canvas.js that you just customized from your download folder, then click OK
- The theme Editor will download the Javascript onto Canvas content delivery network so it becomes available to the theme.
Preview Changes
- Click on the Preview Your Changes button
- Verify that the Instance is running properly in Preview mode
- The Instance Icon should appear at the bottom of the screen in preview mode
- The Instance UI should open and connect upon click on the icon
- If the Instance appears properly in Preview mode, click the Save to apply the changes in the Theme and return to the Theme selector.
Subaccounts
Canvas allows administrators to set up themes for sub accounts. Use this technique to enable Praxis AI in a Theme for specific user population/courses.
It is best practice to add Praxis AI only to sub accounts, because scripts are added from Parent to Child domains.
Teacher Onboarding
When inserted as a theme, Pria is injected in the bottom right corner of a course page.Create your Digital Twin
- The onboarding wizard starts when the Teacher clicks on Pria’s icon to expand for the first time
- This wizard allows for the creation of an instance of Pria, dedicated to the teacher.


- a name for your twin, ex: Bob,
- a picture URL that is accessible on the internet (without CORS issues), and
- a picture to use for the ui background
- An A.I. prompt that personalizes your character (more information is available in the Faculty Guide )

Anytime you or your students will click on Pria in this page, you will access this instance directly.

More Personalization Options
Personalization
More information on Admin functions is available in this documentation.

- Follow the instructions in the Admin Guide to setup integration to your Canvas instance and allow Pria to search your course content.
- If you are using Kaltura, this is a good time to configure the integration as well. Contact your IT Administrator
- Anytime you make a change to the instance, don’t forget to click the Update button to save your changes.
Whitelisting
In order for Pria and associated services to run without connectivity issues, the following domains must be Whitelisted by your institution:Troubleshooting
| Issue | Solution |
|---|---|
| Pria button doesn’t appear | Verify the JavaScript file was uploaded to the correct sub-account theme. Check browser console for JS errors. Ensure the theme is published and applied. |
| Button appears but nothing happens on click | Check that INSTITUTION_ID is set correctly in the SDK. Verify the Digital Twin instance exists and is active. |
| ”Access Denied” or CORS errors | Ensure pria.praxislxp.com and prialti.praxislxp.com are whitelisted. Check that your domain is added to the Digital Twin’s Authorized Public URLs. |
| Theme changes not reflecting | Canvas caches theme assets aggressively. Re-upload the modified JS file and publish the theme again. Clear browser cache. |
| Users see wrong Digital Twin | Verify the INSTITUTION_ID in your SDK matches the intended instance. For multi-course setups, ensure each sub-account has the correct configuration. |
| Onboarding wizard not appearing for faculty | The wizard only appears for users with Teacher or Admin roles in Canvas. Verify the user’s enrollment role. |