AI Course Creator Scale and above
The AI Course Creator embeds Coassemble's create-course agent directly in your product — without the builder chrome. Your users describe a course (or upload documents), answer a few intake questions, and the agent builds a full course. It's the same intake experience as the Coassemble app, headless.
By default, once the brief is confirmed the embed emits a course-created event carrying the new course id and a signed builder embed URL — swap your iframe to that URL to let the build animate in the Builder (this is how the app behaves). If the iframe still shows this embed after 15 seconds, it emits handoff-timeout and shows a waiting message; it never loads the builder itself. Set build: 'inline' to build the course headlessly inside this embed instead and receive only the finished course id.
API Endpoint
/v1/headless/embed/agentBody parameters
| Field | Type | Example | Description | Demo Value |
|---|---|---|---|---|
mode | string | create | — | — |
build | handoffinline | handoff | handoff (default) emits a signed builder-embed URL to continue the build in a Builder surface; inline builds the course headlessly inside this embed. | |
identifier | string | your-user-id | — | — |
clientIdentifier | string | your-tenant-id | — | — |
name | string | Jane Doe | Display name for presence avatars and comment authors. Optional. An empty or blank name is treated as not given. When not given, a colour-and-animal name such as Green Turtle is generated from identifier and stays the same for that identifier. Max 512 characters; longer values return HTTP 400 (`name max=512, asked for N`). | |
avatar | string | https://example.com/avatar.jpg | Image URL for presence avatars and comment authors. Optional. An empty or blank avatar is treated as not given: no avatar is shown, and it does not generate a name. Otherwise it must be an http(s) URL. Max 2048 characters; longer values return HTTP 400 (`avatar max=2048, asked for N`). Other schemes also return 400. | |
themeId | number | | Custom theme ID to apply to the created course. | |
options.ai | boolean | true | Forwarded to the course builder on handoff. When false, AI features in the builder (generate, agent panel, refine) are hidden. Does not disable this create-agent embed itself. | |
options.language | string | en | Default language for the created course. | |
options.brandVoice | boolean | false | Apply the workspace brand voice during authoring. | |
options.googleDrive | boolean | true | Enable Google Drive document import. | |
options.oneDrive | boolean | true | Enable OneDrive document import. | |
options.modal | boolean | true | Default true. False strips modal framing and the close control. | |
options.expiresIn | string | 3h | Link opening lifetime, "30s" to "3h" (e.g. "5m"). Invalid values return 400. The builder link handed over after creation gets the same lifetime. |
Emitted Events
How to listen to events| Type | Event | Description | Notes |
|---|---|---|---|
agent | course-created | Fires when the course is created. Payload includes { mode, courseId, sessionId, builderEmbedUrl? }. For handoff, load builderEmbedUrl next to continue the build in the Builder. | |
agent | handoff-timeout | Fires once in handoff mode if the iframe is still showing this embed 15 seconds after course-created. Payload matches the handoff course-created event: { mode: "handoff", courseId, sessionId, builderEmbedUrl }. The embed then shows "Course created. Waiting for the host page to open the builder." and never loads the builder itself. Use this event to log or diagnose a missing course-created handler. | |
agent | build-started | Fires (inline build only) when the headless build begins. | |
agent | close | Fires when the user closes the agent. | |
session | error | Fires when an error occurs. | |
session | expired | Fires when the session expires. |