An Open edX plugin to add Open Learning AI chat aside to xBlocks
pip install ol-openedx-chat==0.7.0 Copy PIP instructions
An xBlock aside to add MIT Open Learning chat into xBlocks.
For this plugin’s compatibility with Open edX, see the Open edX Release Compatibility table.
For detailed installation instructions, please refer to the plugin installation guide.
Add the following configuration values to the config file in Open edX. For any release after Juniper, that config file is /edx/etc/lms.yml. If you’re using private.py, add these values to lms/envs/private.py. These should be added to the top level. Ask a fellow developer for these values.
MIT_LEARN_AI_API_URL: MIT_LEARN_API_BASE_URL: MIT_LEARN_SUMMARY_FLASHCARD_URL: For Tutor installations, these values can also be managed through a custom Tutor plugin.
Create a record for the XBlockAsidesConfig model (LMS admin URL: /admin/lms_xblock/xblockasidesconfig/).
Create a record in the StudioConfig model (CMS admin URL: /admin/xblock_config/studioconfig/).
This will download the smoot-design package and copy the pre-bundled JS file to a location loadable by OpenEdx.
npm pack @mitodl/smoot-design@^6.17.0 tar -xvzf mitodl-smoot-design*.tgz mkdir -p public/static/smoot-design cp package/dist/bundles/* public/static/smoot-design Create env.config.jsx in the frontend-app-learning and add the below code:
This will enable the ol_openedx_chat plugin for all courses. You can disable it and add a Waffle Flag Course Override at /admin/waffle_utils/waffleflagcourseoverridemodel/ to enable it for a single course.
{"OL_OPENEDX_CHAT_VIDEO_BLOCK_ENABLED": true, "OL_OPENEDX_CHAT_PROBLEM_BLOCK_ENABLED": true} OL_OPENEDX_CHAT_VIDEO_BLOCK_ENABLED is used to enable/disable the VideoGPT for all videos.
OL_OPENEDX_CHAT_PROBLEM_BLOCK_ENABLED is used to enable/disable the AI Chat for all problems.
Once these settings are enabled, you will see a checkbox Enable AI Chat Assistant below problem and video blocks in the CMS course unit.
You will also see a Chat Button titled “AskTIM about this video/problem” in the LMS. Now AI Chat/VideoGPT is enabled for all videos and problems.
If you want to disable it for a few videos/problems then you disable the Enable AI Chat Assistant checkbox against the block in CMS.
The Contact us launcher rendered by the MFE footer is gated on the ol_openedx_chat.contact_us_enabled course waffle flag, read over /ol-openedx-chat/api/contact-us-enabled/ (optionally with a course key appended). The endpoint is unauthenticated and returns {"enabled": }.
Site-wide: the flag’s everyone value. The endpoint declares no authentication classes, so DRF resolves the caller to AnonymousUser and writes that back onto the Django request that crum hands to CourseWaffleFlag. superusers, staff and authenticated therefore never match, even for a signed-in superuser. The caller-independent fields waffle falls through to — testing, languages and percent — are still evaluated, so a stray percent or languages value turns the launcher on for everyone. waffle_flag --create leaves every field unset, which reads as off; set everyone explicitly rather than relying on that.
Per course: add a WaffleFlagCourseOverrideModel row in Django admin. Course overrides beat org overrides, which beat the site-wide value.
To remove an override, add a new row with enabled unchecked. These are ConfigurationModel records, so Django admin offers no delete action.
On deployments managed by ol-infrastructure, everyone is owned by Pulumi: set_waffle_flags.py runs as a pre-deploy job on every edxapp rollout and re-applies edxapp:waffle_flags, resetting everyone and the other flag fields it parses. Flipping the flag in Django admin takes effect immediately but is reverted by the next deploy, including an unrelated one. For an immediate kill, flip it in admin and then open a Pulumi PR to make it stick. Course override rows are not touched by that job, so they are the durable per-course lever.
Clients treat anything other than an explicit true as off, so an unreachable LMS hides the launcher rather than showing it.
Only Ask TIM is not translated (brand). All other user-facing strings are translatable.
Translations live in the translations repo (e.g. https://github.com/mitodl/mitxonline-translations) at translations/open-edx-plugins/ol_openedx_chat/conf/locale/. For any language, run sync_and_translate_language to create or update the .po files there; then run make pull_translations in edx-platform to pull and compile them into conf/plugins-locale/plugins/ol_openedx_chat/. Until make pull_translations is run, the UI shows English (msgid fallback).
Plugins like edx-bulk-grades use conf/locale/config.yaml and a Makefile (extract_translations, compile_translations, pull_translations) because that plugin repo is the source for Transifex/Atlas. For ol_openedx_chat we use a different flow: the translations repo holds the .po files; sync_and_translate_language syncs and translates there, and edx-platform’s make pull_translations pulls into conf/plugins-locale/plugins/ol_openedx_chat/. This plugin repo never runs Atlas or Transifex, so config.yaml and a Makefile here would be unused.
The code in this repository is licensed under the AGPL 3.0 unless otherwise noted.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




