You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@instructure/platform-learning-agent-launcher

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instructure/platform-learning-agent-launcher

Initial React package scaffold for launching the Learning Agent user experience.

latest
npmnpm
Version
1.1.1
Version published
Maintainers
3
Created
Source

@instructure/platform-learning-agent-launcher

Initial React package scaffold for launching the Learning Agent user experience.

Features

  • Host-agnostic React component package
  • InstUI-based launcher button component
  • Storybook story for local development
  • Vitest + Testing Library test setup
  • TypeScript declaration output via Vite build

Installation

pnpm add @instructure/platform-learning-agent-launcher

Peer Dependencies

{
  "@instructure/platform-provider": "^0.1.1",
  "react": "^18.0.0",
  "react-dom": "^18.0.0",
  "@instructure/ui-buttons": "^10.0.0",
  "@instructure/ui-svg-images": "^10.0.0"
}

Usage

import { PlatformUiProvider } from '@instructure/platform-provider'
import { LearningAgentLauncher } from '@instructure/platform-learning-agent-launcher'
import '@instructure/platform-learning-agent-launcher/styles'

export function Example() {
  return (
    <PlatformUiProvider executeQuery={async () => ({})} currentUserId="12345">
      <LearningAgentLauncher
        learningAgentPath="/lms-launcher"
        lmsPathname="/courses/42/modules/items/9"
        lmsDomain="canvas.example.edu"
        lmsHasAthenaUser={false}
      />
    </PlatformUiProvider>
  )
}

Minimal Usage (All Launcher Defaults)

import { PlatformUiProvider } from '@instructure/platform-provider'
import { QueryClient } from '@tanstack/react-query'
import { LearningAgentLauncher } from '@instructure/platform-learning-agent-launcher'
import '@instructure/platform-learning-agent-launcher/styles'

const queryClient = new QueryClient()

export function ExampleWithDefaults() {
  return (
    <PlatformUiProvider
      executeQuery={async () => ({})}
      currentUserId="12345"
      locale="en"
      timezone="America/Denver"
      appContext="canvas-academic"
      queryClient={queryClient}
    >
      <LearningAgentLauncher />
    </PlatformUiProvider>
  )
}

API

All LearningAgentLauncher props are optional.

Temporary behavior note: when lmsHasAthenaUser is false, the launcher renders nothing (null). This is a temporary rollout behavior until Canvas supports multiple feature flags.

  • label?: string
    • Optional launcher button label.
    • Defaults to Launch Athena.
  • enabled?: boolean
    • Controls button enabled/disabled state.
    • Defaults to true.
  • learningAgentDomain?: string
    • Base Learning Agent domain.
    • Defaults to https://studywithathena.com.
  • learningAgentPath?: string
    • Destination path used when building the launcher URL.
    • Defaults to /lms-launcher.
  • lmsPathname?: string
    • Optional LMS pathname context passed in query params as lmsPathname.
    • will be used to derive the course context for the Learning Agent experience.
    • Defaults to window.location.pathname when omitted.
  • lmsDomain?: string
    • Optional LMS domain context passed in query params as lmsDomain.
    • i.e. myuniversity.instructure.com.
    • Defaults to window.location.host when omitted.
  • lmsUserId?: string
    • Optional LMS user identifier passed in query params as lmsUserId.
    • Defaults to currentUserId from PlatformUiProvider when omitted.
  • lmsHasAthenaUser?: boolean
    • Whether the LMS user has an Athena user account
    • When false, the component returns null and does not render a launcher button (temporary until Canvas has multiple feature flags).
    • Passed in query params as lmsHasAthenaUser.
    • Defaults to false.
  • lmsSource?: string
    • Source value passed in query params as lmsSource.
    • Defaults to appContext from PlatformUiProvider when omitted.
  • locale?: string
    • Locale value passed in query params as locale.
    • Defaults to locale from PlatformUiProvider when omitted.
  • timezone?: string
    • Timezone value passed in query params as timezone.
    • Defaults to timezone from PlatformUiProvider when omitted.

Development

# Run tests
pnpm test

# Run tests with coverage
pnpm test --coverage

# Build
pnpm build

# Type check
pnpm type-check

FAQs

Package last updated on 06 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts