/iblai-vibe-agent-lti
Mirrored from
iblai/vibe·skills/agents/iblai-vibe-agent-lti/SKILL.md. This page is generated — edit it in the repository, not here.
Add the agent LTI tab -- let an LMS (Canvas, Brightspace, Blackboard,
Moodle) launch the agent inside a course with LTI 1.3. Scope: mixed. The
switch and the Links sub-tab belong to this agent; Keys and Tools
are shared by the whole organization; Tool Endpoints are fixed for the
organization. This is one tab in the agent-settings family indexed by
/iblai-vibe-agent; it shares the AgentSettingsProvider wrapper with every
other tab.
Links -- the switch (the agent's is_lti_accessible setting; while off,
the sub-tabs stay visible but grayed out) and the agent's LTI link: Name,
Target Link URI (with copy), Status and an edit action. An agent has one
link: Create LTI Link shows only while there is none. A new link builds
in the background -- Pending or Building with a spinner and a Refresh
button, then Ready or Failed (with Retry).

Edit LTI Link -- one field, the name shown when a teacher picks this agent during deep linking. Only Ready links can be edited.

Keys -- the organization's RSA signing keys (name and public key), with Create LTI Key (name only; the key pair is generated) and an Edit / Delete menu per row.

LTI Key -- rename the key and copy its Public Key (PEM) or Public JWK. A key still used by a tool cannot be deleted.

Tools -- the organization's LMS registrations (Name, Issuer, Client ID) with Create LTI Tool and an edit action.

Create LTI Tool -- the values the LMS gives you: Name, Issuer, Client ID, Auth Login URL, Auth Token URL, Auth Audience (optional), the LMS public keys (a JWKS URL, recommended, or Raw JWKS JSON), a Signing Key from the Keys sub-tab, and Deployment IDs (one per line or comma-separated).

Tool Endpoints -- the four URLs to paste into the LMS, each with copy:
Redirect URI, Login Initiations Endpoint, Deep Linking Endpoint and JWKS
Endpoint. They are built from lmsDomain (Step 2).

Common setup (brand, conventions, env files, verification): see docs/skill-setup.md.
Prerequisites
- Auth set up (
/iblai-vibe-auth, or vibe-starter). AgentSettingsProviderwraps the route (/iblai-vibe-agent§1).@iblai/iblai-js@^2.62.1(resolves@iblai/web-containers1.62.1). Check withpnpm why @iblai/web-containers.- A real agent UUID. Ask the user; never invent one.
- An organization admin signed in: Links, Keys and Tools are admin-only, so an agent's owners and editors get 403 here.
- The organization's edX LMS host for
lmsDomain. vibe-starter has it asconfig.legacyLmsUrl(); elsewhere ask the user, never invent one.
Step 1: Check Environment
Look for iblai.env in the project root with PLATFORM, DOMAIN, and
TOKEN. If it is missing, tell the user:
"You need an iblai.env with your platform configuration. Download the
template and fill in your values:
curl -o iblai.env https://raw.githubusercontent.com/iblai/vibe/refs/heads/main/iblai.env"
Step 2: Mount AgentLtiTab
// app/(app)/agents/[mentorId]/lti/page.tsx
"use client";
import { AgentLtiTab } from "@iblai/iblai-js/web-containers/next";
import config from "@/lib/iblai/config";
export default function AgentLtiPage() {
return (
<div className="flex h-full flex-col bg-white">
<AgentLtiTab lmsDomain={config.legacyLmsUrl()} />
</div>
);
}
The tab reads tenantKey, mentorId and username from
AgentSettingsProvider (each can be passed as a prop instead) and does its
own fetching and saving. Pass lmsDomain -- the edX LMS host (learn.*),
not the API base: without it the Tool Endpoints are bare paths. The JWKS
endpoint uses the organization's code from the platform info; pass
orgShortName to override it.
Step 3: Customize Labels (Optional)
The tab renders with the default agent-facing copy (AGENT_LTI_TAB_LABELS,
localized through the SDK's i18n). Pass a partial labels object to change
any string:
import { AgentLtiTab } from "@iblai/iblai-js/web-containers/next";
import config from "@/lib/iblai/config";
<AgentLtiTab
lmsDomain={config.legacyLmsUrl()}
labels={{
header: { title: "LMS integration" },
subTabs: { agentLinks: "Launch link" },
}}
/>;
Label groups (LtiTabLabels): header (title, description),
capability (the switch and its toasts), subTabs (agentLinks, keys,
tools, toolEndpoints), common (shared buttons, column headings and form copy),
links (the links table, status badges, refresh and retry, the link
dialog), keys (the keys table, create, detail and delete dialogs),
tools (the tools table and the tool dialog fields), endpoints (the four
endpoint names and descriptions), and toasts.
Step 4: Use MCP Tools for Customization
get_component_info("AgentLtiTab")
get_component_info("AgentSettingsProvider")
<AgentLtiTab> Props
Import from @iblai/iblai-js/web-containers/next.
| Prop | Type | Required | Description |
|---|---|---|---|
lmsDomain | string | Recommended | The edX LMS host the Tool Endpoints are built on, e.g. config.legacyLmsUrl() |
orgShortName | string | No | Organization code in the JWKS URL. Defaults to the platform info's org, then the organization key |
labels | DeepPartial<LtiTabLabels> | No | Override user-visible strings |
tenantKey | string | No | Organization key; defaults to AgentSettingsProvider |
mentorId | string | No | Agent UUID; defaults to AgentSettingsProvider |
username | string | No | Signed-in username; defaults to AgentSettingsProvider |
enableRBAC | boolean | No | Accepted for parity; SDK 2.36.2 gates no LTI control on it |
Related Exports
From @iblai/iblai-js/web-containers/next:
AGENT_LTI_TAB_LABELS-- the default label bundle.AgentLtiTabProps,LtiTabLabels-- types.
How it saves
| Action | Request |
|---|---|
| The switch | PUT /api/ai-mentor/orgs/{org}/users/{username}/mentors/{uuid}/settings/ with is_lti_accessible |
| Create a link | POST /api/core/lti/1p3/provider/lti-mentors/ with the name, the agent and platform_key, plus async_create: true -- answers 202 with { id, status: "pending" } |
| Edit / Retry a link | PUT …/lti-mentors/{id}/; Retry deletes the failed link and creates it again |
| Keys | GET / POST (name) on /api/core/lti/1p3/provider/lti-keys/; PUT / DELETE on …/lti-keys/{id}/ |
| Tools | GET / POST on /api/core/lti/1p3/provider/lti-tools/; PUT on …/lti-tools/{id}/, with launch_gate (the tab sends { "allow_all_within_org": true }) |
| Tool Endpoints | Read-only: {lmsDomain}/lti/1p3/launch/, …/login/, …/deep-linking/launch/, …/pub/orgs/{org code}/jwks/ |
Single-item GET, PUT and DELETE exist only on the {id}/ routes.
Every call needs platform_key: in the query on GET and DELETE, in the
body on POST and PUT. Tools also require launch_gate. The tab asks for
page_size=10, but the API forwards only the organization and the agent to
the LMS, so pages follow the LMS's own defaults.
Platform data
| Hook | Purpose |
|---|---|
useGetMentorSettingsQuery / useEditMentorMutation | The switch |
useGetLtiMentorsQuery, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useDeleteLtiMentorMutation, useGetLtiMentorDetailQuery | The agent's link (poll the detail until ready or failed) |
useGetLtiKeysQuery, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation | Keys |
useGetLtiToolsQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation | Tools |
useGetPlatformInfoQuery | The organization code for the JWKS URL |
All from @iblai/iblai-js/data-layer, with the LtiAgentLink and
LtiAgentLinkStatus types. There is no iblai-api-* REST twin for LTI
yet; the endpoints above are in the live schema.
Step 5: Verify
Run /iblai-vibe-ops-test before telling the user the work is ready, and give
every page, control and state this skill added its own checkpoint — one Playwright
test titled <ID> · … in e2e/journeys/, listed in e2e/coverage.json;
pnpm e2e:coverage must pass:
pnpm build-- must pass with zero errors.pnpm test-- vitest must pass.- Touch test
/agents/<uuid>/ltiin the browser as/iblai-vibe-ops-testsays, signed in as an org admin: the switch and four sub-tabs render, and Tool Endpoints shows fullhttps://URLs on your LMS host; read the console; check the phone width.
Important Notes
- Keys and Tools are organization-wide: changing them here changes them for every agent. Only the link is per agent.
- Link creation is slow: it builds an LMS course in the background; wait for Ready before sharing the Target Link URI.
- Delete order: remove or re-key a tool before deleting its key.
- Shared provider: mount
AgentSettingsProvideronce at the layout level (/iblai-vibe-agent§1); do not wrap each tab. - Peer deps:
sonnerand@iblai/iblai-web-mentor(pnpm add sonner @iblai/iblai-web-mentor). - Brand guidelines: BRAND.md