Placement and rendering
These settings control how the agent is embedded into the host page, where it appears, and how it behaves on screen. Pass them through setConfiguration as described in the SDK configuration reference.
Options
Section titled “Options”| Key | Type | Default | Accepted values | Description |
|---|---|---|---|---|
allowAgentDrag | boolean | true | Whether users can click and drag the agent widget to reposition it anywhere on the screen. | |
renderMode | string | "IFRAME" | "IFRAME" | "INLINE" | How the SDK is embedded within the host page: as an iframe or an inline component. |
sessionTimeout | number | 30 | 5 to 1440 | The maximum idle time (in minutes) before a new conversation is automatically started. Minimum 5 minutes, maximum 1440 minutes (24 hours). |
initialAgentPosition | string | "CENTER_RIGHT" | "TOP_RIGHT" | "TOP_LEFT" | "BOTTOM_RIGHT" | "BOTTOM_LEFT" | "CENTER_RIGHT" | "CENTER_LEFT" | The default on-screen location where the agent widget appears when first loaded. |
Example
Section titled “Example”foldspace.agent('API-KEY').setConfiguration({ renderMode: "IFRAME", allowAgentDrag: true,
// Position property (format: "VERTICAL_HORIZONTAL") initialAgentPosition: "BOTTOM_RIGHT",
// Session timeout in minutes sessionTimeout: 30,});