Embedded Mode Configuration
Embedded mode allows you to mount the agent directly into a specific DOM element within your application layout. This is ideal for creating integrated chat experiences, custom sidebars, or dedicated support pages where the agent is a native part of the UI rather than a floating widget.
embeddedConfiguration
Section titled “embeddedConfiguration”Defines the layout and behavior of the agent when mode is set to EMBEDDED. This object controls how the agent mounts into your application’s DOM and its initial UI state.
Structure:
- Container: The HTML element into which the agent will mount.
- Type:
HTMLElement
Example
Section titled “Example”const containerElement = document.getElementById('agent-container');
window.foldspace.agent({ apiName: 'AGENT_API_NAME', mode: 'EMBEDDED', configuration: { embeddedConfiguration: { container: containerElement, } }});