Skip to main content
Use this page when you want practical examples for the current Embedded API configuration options. If you need to combine branding, UI, and interaction defaults in one setup flow, jump to I need to configure several settings together.

Intended usage pattern

  • Call configureApp() for app-level settings.
  • Call setInteractionOptions() before the user starts or opens an interaction.
If you are moving from configure() or configureSession(), use the Config Migration Guide. For timelines and compatibility, see Scheduled Deprecations.

App UI and navigation

Use this when the interaction title is already shown elsewhere in your product and you do not want to repeat it inside the embedded assistant.
Use this when you do not want clinicians to submit document feedback from inside the embedded assistant.
Use this when your workflow does not allow in-product AI chat or when you want to keep the embedded experience focused on recording and documentation only.
Use this to add domain-specific capabilities while keeping Corti Assistant’s interaction context and document editing tools. AI Chat must be available to the authenticated user.
1

Prepare an agent definition

In the Corti Console, create an agent with a name, description, instructions, and any connectors it needs. Copy the JSON request body from its code example. Use the fields sent to Create an agent, rather than the returned agent ID or response object.A connector such as { "type": "agent", "agentId": "<your-agent-id>" } delegates to an existing agent by ID. The Embedded API rejects this connector type, including references copied from the Corti Console. Use registry, mcp, a2a, or schema connectors instead. Models and connectors must be accessible to the user authenticated in embedded Corti Assistant.
2

Configure the Expert

After the Embedded API is ready and the user is authenticated, call configureApp(). This example adds an Expert connected to a hospital policy source through MCP. Replace the definition with your own JSON request body and a reachable MCP server URL. The example uses auth: { type: "none" } for a server that does not require authentication.For an MCP server that accepts the authenticated user’s Corti token, use auth: { type: "inherit" }. Other authentication modes, secret references, and custom header declarations are not supported. See MCP connector authentication for the accepted settings.
JavaScript
Only name is required by the agent API. model is optional and uses the tenant default when omitted. An agent without connectors can follow its prompt, but connectors are needed to access external tools or policy sources.The example uses an initialized Web Component API instance named api. For the Window API, use window.CortiEmbedded.v1.configureApp() with the same payload. For PostMessage, send it as the payload of the configureApp action.
3

Verify the configuration

Open AI Chat and its Sources popover. Confirm that the Expert’s name and description appear. Send a question relevant to the Expert’s description to exercise agent creation and delegation.A successful configureApp() call validates and stores the definition. If custom Expert creation fails when the first message creates the agents, AI Chat displays an Expert-unavailable notice, removes the custom Expert from Sources, and continues with its default agent. Confirm that you can still ask questions about the interaction or propose document edits.This fallback applies to custom Expert creation. A connector or tool failure after creation is not covered. See Validation and access errors for details.
To remove the custom Expert and restore the default configuration:
JavaScript
Changing or clearing the definition starts a new conversation. Omitting aiChat in a later configuration call preserves the existing definition. Setting ui.aiChat to false hides AI Chat and leaves the definition stored for when AI Chat is enabled again.See AI Chat agent configuration for supported fields and update behavior.
Use this when you do not want clinicians to open settings, browse older interactions, or navigate away from the flow controlled by your host application.
Use this when you need the embedded Assistant debug panel while developing or troubleshooting an integration locally.
debug is only intended for development. Do not enable it in staging or production.
Use this when your product already provides the surrounding navigation and context, and you want the embedded assistant to stay limited to the current interaction.

Appearance, language, and network

Use this when you want the embedded experience to match your product branding.
Always ensure WCAG 2.2 AA conformance when customizing appearance
Use this when you want to control the language of the embedded UI.
Use this when you want the embedded experience to start with a specific dictation language.
Use this when you need to replace specific interface strings with product-specific wording.
Use this only for proxy setups that need a custom WebSocket endpoint. See the Proxy guide.
Use this when you want to tell your integrations apart in usage analytics. Corti Assistant adds the fields to the x-corti-analytics attribution on its requests to the Corti API.Set the values on the component before it initializes. Unlike the other scenarios on this page, you don’t pass them through configureApp(). For validation rules and limits, see the analytics component property.
Don’t put credentials, personal information, or patient data in attribution values. WebSocket requests include them in the request URL.

Interaction mode and spoken language

Use this when you want to set the initial interaction mode while keeping both modes available.
Use this when users should still be able to switch modes, but one mode should be the default.
Use this when your workflow only supports one interaction type.
Use this when an interaction should default to a specific spoken language.
Use this when an embedded deployment supports only a specific set of spoken languages. If you provide one option, users cannot change the spoken language. If you provide a fallback, make sure it is included in options.

Template defaults and personal templates

Use this when you want to provide a fallback standard template for new interactions using its UUID. It is used only when the user does not already have their own default template set.
Use this when your host application controls the default template and clinicians should not be able to choose or persist their own default from inside the embedded Assistant.
Use this when the first document in an interaction must use a configured template. After the first document has been generated, normal template selection applies within the available templates.
If your effective template list contains only one template, the embedded Assistant treats that template as the forced first-document template.
Use this when you want clinicians to create, edit, copy, view, or delete personal templates through the Guided Document Generation template editor.
Requires Guided Document Generation. Only applies to new templates.
Use this when you want to hide or lock specific section-level fields in the guided template creation flow. For example, to let users edit headings but hide the misc prompt:
heading and description are always visible; only editable applies. For miscPrompt and outputSchema, omitting visible or setting visible: false hides the field and prevents editing. When a prompt field is visible, it is editable by default unless you set editable: false.
Use this when the host application needs to provide a runtime template without first persisting it as a standard or project template. Inline template IDs are local to the current setInteractionOptions() payload. Add an id only when another option needs to reference the inline template.
Use this when you provide a runtime template and want the first generated document to use it automatically.

Standard and project template sources

Use this when standard templates should remain available without filtering.
Use this when the embedded assistant should not show any standard templates in the picker.
Use this when the embedded experience should only present standard templates from specific regions using ISO 3166-1 alpha-3 codes such as BEL, DNK, or CAN. When limited to a single region, the region headline is automatically hidden.
Use this when you want to narrow standard templates by family, such as soap.
Use this when standard templates should stay available, but specific regions should be removed from the picker.
Use this when you want to remove a family such as letter while keeping other standard templates available.
Use this when you need both narrowing and removal in the same configuration. The embedded assistant applies include first and exclude second.
Region values use ISO 3166-1 alpha-3 codes such as BEL, DNK, or CAN. Family values are standard template family identifiers such as soap, depending on the available standard template metadata.
Use this when you want to expose project templates selectively. Project templates are referenced by UUID in include.ids and exclude.ids.
Use this when project templates should remain available, but a specific UUID or set of UUIDs must be hidden.
Use this when the embedded assistant should not show any project templates in the picker.

Template editor section sources

Use templates.sectionSources to control the sections clinicians can add in the personal template editor. These options require Guided Document Generation. See the setInteractionOptions() section source reference for defaults, filtering rules, and warnings.
This example enables personal templates, limits standard sections to the history of present illness and plan families, and hides project sections. It prefers Danish section variants and offers Danish as the editor language.
JavaScript
After applying the options, open New template, then Add section. Check that only the configured standard section families appear and that project sections are hidden. Regional selection uses fallback variants when a family has no matching regional section.
This example hides standard sections and limits the picker to selected project section UUIDs. If a UUID appears in both lists, exclusion takes precedence. To offer all project sections except those excluded, omit include.ids.
JavaScript
After applying the options, open New template, then Add section. Check that the selected project sections appear for the chosen language and that excluded sections are absent. The IDs must identify project sections available to the authenticated user.

Documents and companion workflows

Use this when you want to show or hide the document sync action inside the embedded experience.
Use this when an embedded workflow should allow only one or two generated documents for the current interaction. When the limit is reached, document generation controls are hidden.
Use this when you want to restrict the output language options shown to users. For Guided Document Generation, the output language dropdown displays only the allowed languages; if restricted to a single language, the dropdown is disabled. For older document generation, this limits which template language groups appear in the left sidebar.
Use this when your embedded deployment supports phone-based audio capture via the Corti Companion app. Enable the companion app surface at app level, then call showDeviceLinkQR() with the current user’s OAuth token response when the user initiates pairing.
Once paired, the phone appears as a selectable microphone source in the Embedded Assistant. The companion app must be open and running for the phone to appear in the microphone list.
See showDeviceLinkQR() for the full parameter reference, return statuses, error handling, and companion app installation.

Combined setup flows

Use this when you need to apply several settings together.If the settings all belong to configureApp(), you can group them into one call or chain multiple configureApp() calls. Because configureApp() is patchable, both patterns are valid.
If you need both app-level settings and interaction-level settings, group app-level settings inside configureApp() as needed, then call setInteractionOptions() before the user starts or opens an interaction.
A practical rule is: optional app-level settings can be grouped or split across configureApp() calls, but interaction options should be finalized in setInteractionOptions() before the interaction is opened.

Scheduled Deprecations

Review timing, compatibility expectations, and rollout guidance.

API Reference

Review method-level details for configureApp() and setInteractionOptions().