Skip to content

Embedded Mode Configuration

Open in ChatGPT Open in Claude

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.

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
const containerElement = document.getElementById('agent-container');
window.foldspace.agent({
apiName: 'AGENT_API_NAME',
mode: 'EMBEDDED',
configuration: {
embeddedConfiguration: {
container: containerElement,
}
}
});