Skip to content

Placement and rendering

Open in ChatGPT Open in Claude

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.

Agent position grid showing all six initialAgentPosition values A browser viewport mockup with six small agent widgets placed at TOP_LEFT, TOP_RIGHT, CENTER_LEFT, CENTER_RIGHT, BOTTOM_LEFT, and BOTTOM_RIGHT. CENTER_RIGHT is highlighted as the default. yourapp.com/dashboard TOP_LEFT TOP_RIGHT CENTER_LEFT CENTER_RIGHT (default) BOTTOM_LEFT BOTTOM_RIGHT
KeyTypeDefaultAccepted valuesDescription
allowAgentDragbooleantrueWhether users can click and drag the agent widget to reposition it anywhere on the screen.
renderModestring"IFRAME""IFRAME" | "INLINE"How the SDK is embedded within the host page: as an iframe or an inline component.
sessionTimeoutnumber305 to 1440The maximum idle time (in minutes) before a new conversation is automatically started. Minimum 5 minutes, maximum 1440 minutes (24 hours).
initialAgentPositionstring"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.
foldspace.agent('API-KEY').setConfiguration({
renderMode: "IFRAME",
allowAgentDrag: true,
// Position property (format: "VERTICAL_HORIZONTAL")
initialAgentPosition: "BOTTOM_RIGHT",
// Session timeout in minutes
sessionTimeout: 30,
});