# Placement and rendering

Control how your Foldspace agent is embedded, positioned, and behaves on screen.

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](/customize/configuration/) reference.

<PositionGrid />

## 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. |

:::note
`initialAgentPosition` values follow the format `"VERTICAL_HORIZONTAL"`.
:::

## Example

```javascript
foldspace.agent('YOUR-AGENT-KEY').setConfiguration({
  renderMode: "IFRAME",
  allowAgentDrag: true,

  // Position property (format: "VERTICAL_HORIZONTAL")
  initialAgentPosition: "BOTTOM_RIGHT",
  
  // Session timeout in minutes
  sessionTimeout: 30,
});
```
