Override Configuration

Customize your agent’s appearance, behavior, and functionality in the code by setting the properties below. These options allow you to control everything from logos and themes to layout and audio features.

You can also configure all of these settings in our Studio. Note that any SDK-side configuration will override the Studio values—allowing you to vary settings on a per-page or contextual basis.



Look & Feel


PropertyTypeDefaultRequiredDescription
displayNamestringCopilotNoShort agent name shown in header and meta areas.
titleTextstringHow can I help you today?NoHero/title line at the top of the widget/panel.

Conversation Starters

PropertyTypeDefaultRequiredDescription
quickStartHintstringNoConversation starters title

PropertyTypeDefaultRequiredDescription
displayNamestringCopilotNoShort agent name shown in header and meta areas.
logoUrlstringURL to the Foldspace iconNoURL for the agent’s primary logo.
modalLogoUrlstringURL to the Foldspace iconNoURL for the logo used within modals or dialogs.
titleTextstringHow can I help you today?NoThe main heading displayed in the agent panel.
quickStartHintstringNeed help? Here are some topics we can start withNoInstructional text guiding users on quick-start actions.
theme<see Theme Properties below>NoColor, font and bubble styling options
isLogoVisiblebooleantrueNoToggle to show or hide the agent’s logo.
isLTRbooleantrueNoText direction: left-to-right (true) or right-to-left (false).
isAudioEnabledbooleanfalseNoAllow users to send voice input instead of typing.
resumePreviousSessionbooleanfalseNoAutomatically reload the last session if the previous interaction was within 24 hours

Theme Properties

PropertyTypeDefaultRequiredDescription
primaryColorstring#3248F2NoBrand or primary color
secondaryColorstring#3248F2NoSecondary color
primaryFontColorstring#121926NoPrimary text color
secondaryFontColorstring#697586NoSecondary text color
backgroundColorstring#ffffffNoWidget background color
speechBubblestring#f4f4f4NoSpeech-bubble color
speechBubbleTextstring#121926NoText color inside speech-bubbles
widgetBubbleBackgroundColorstring#3248F2NoBubble handle background color (applies only in mode "OVERLAY" & layoutMode "WIDGET")
fontFamilystringRobotoNoUI font family

Example

foldspace("when", "ready", () => {
  foldspace.agent({
    apiName: AGENT_API_NAME, 
    mode: "EMBEDDED", 
    configuration: {
      // UI text & icons
      displayName:       "Support Bot",
      logoUrl:           "https://example.com/logo.png",
      modalLogoUrl:      "https://example.com/modal-logo.png",
      titleText:         "How can I help you today?",
      quickStartHint:    "Try one of these quick commands:",
      quickReplies: [
        { title: "Show me features",    subtitle: "What this bot can do" },
        { title: "Contact support",     subtitle: "Talk to a human" }
      ],

      // Theme & styling
      theme: {
        primaryColor:                "#0055FF",
        secondaryColor:              "#FF5500",
        primaryFontColor:            "#FFFFFF",
        secondaryFontColor:          "#333333",
        backgroundColor:             "#F4F4F4",
        speechBubble:                "#E0E0E0",
        speechBubbleText:            "#000000",
        widgetBubbleBackgroundColor: "#FF0000",
        fontFamily:                  "Arial, sans-serif"
      },

      // Feature toggles
      isLogoVisible:         true,
      isLTR:                 true,
      isAudioEnabled:        false,
      resumePreviousSession: true,
    }
  });
});

Configuration at Runtime

Update any part of the AgentConfiguration after initialization—logos, theme, quick replies, etc.


foldspace("when", "ready", () => {
  const agent = foldspace.agent({ /* …common setup… */ });
  agent.setConfiguration({
    displayName: "Support Bot",
    logoUrl: "https://cdn.example.com/logo.png",
    theme: { /* … */ }
  });
});

Configuration Override (Optional)

The agent supports both common and mode-specific settings. All attributes go under configuration.overlayConfiguration:

PropertyTypeDefaultRequiredDescription
isHandleLogoVisiblebooleantrueNoToggle visibility of the handle/logo that users click to open the overlay. Applies only in "WIDGET" mode.
layoutModeENUM"SIDE_PANEL"No"FLOATING_SIDE_PANEL"
horizontalAlignmentENUM"RIGHT"NoChoose between a compact widget icon ("WIDGET"), a full side-panel docked to the side ("SIDE_PANEL"), or a floating overlay side-panel ("FLOATING_SIDE_PANEL")
verticalAlignmentENUM"CENTER"noAlign the overlay trigger at the top, middle, or bottom of the viewport (only relevant in "WIDGET" mode)."CENTER", TOP, BOTTOM`
isDraggablebooleantrueNoAllow end users to drag & reposition the widget overlay trigger. Ignored in "SIDE_PANEL" and "FLOATING_SIDE_PANEL" modes.
hostWidthnumberwindow.innerWidthNoWidth (in pixels) of the overlay container. Defaults to the full browser window width. You may provide a custom fixed value.

Example: Side Panel Overlay

foldspace("when", "ready", () => {
  foldspace.agent({
    apiName: AGENT_API_NAME,
    configuration: {
      overlayConfiguration: {
        layoutMode: "SIDE_PANEL",
        horizontalAlignment: "RIGHT", // slides in from the right
        hostWidth: window.innerWidth,
        isDraggable: false // ignored in SIDE_PANEL mode
      }
    }
  });
});

Example: Widget Overlay

foldspace("when", "ready", () => {
  foldspace.agent({
    apiName: AGENT_API_NAME,
    configuration: {
      overlayConfiguration: {
        layoutMode: "WIDGET",
        isHandleLogoVisible: true,
        horizontalAlignment: "LEFT",
        verticalAlignment: "BOTTOM",
        isDraggable: true
      }
    }
  });
});