Skip to main content
MedAssistConfig is the optional third argument to renderMedAssist. Every field is optional — anything you omit falls back to the agent config you set in console.eka.care.

MedAssistConfig

title
string
default:"Medi Clinic"
Header text shown to the user.
iconUrl
string
default:"https://cdn.eka.care/bot-icon.svg"
Icon URL for the widget launcher.
environment
"development" | "staging" | "production"
default:"production"
Which backend environment to connect to.
baseUrl
string
Custom API base URL. Only used in development mode.
auth
string
Auth token sent when the session is created.
authToken
string
Sent as the x-auth-token header on the create-session API call.
context
TContext
Key-value context object sent with the session to the backend. Used by the agent and its tools.
connectionType
"socket" | "sse"
Real-time transport. Usually inherited from agent config.
displayMode
"full" | "widget"
default:"widget"
full is fullscreen; widget is a floating window. Mobile always uses the widget layout.
resize
boolean
Show a resize toggle in the header.
allowed
Array<"text" | "file" | "audio" | "voice">
Input types to show. Omit to show all.
initialMessage
TInitialMessage
A pre-loaded greeting and suggestion pills shown before the user types.
hideWatermark
boolean
default:"false"
Hide the “Powered by Eka Care” footer branding.
onClose
() => void
Callback fired when the user closes the widget.
showCloseButton
boolean
default:"true"
Show the close (✕) button in the header.
theme
object
Brand colors and styling. See Theming & design system.

How config maps to the console

Many fields can be set either here or on the agent in the console. When both exist, the agent config seeds the defaults and your config overrides them.
FieldConsole relationship
agentIdResolves the agent’s config — name, theme, allowed inputs, nudges, initial message.
environmentSelects which backend (dev/staging/prod) hosts the agent.
contextPassed to the backend session; used by the agent and tool chain.
themeSeeded from the agent config’s theme, overridable here.
initialMessageCan come from the agent’s configured greeting and suggestion pills.
allowedInput-type restrictions can also be sourced from the agent config.

Example

const config: MedAssistConfig = {
  title: "Moolchand Assist",
  environment: "production",
  displayMode: "widget",
  allowed: ["text", "file", "audio"],
  hideWatermark: true,
  theme: {
    primary: "#6B5CE0",
    mode: "light",
    headerTinted: true,
  },
  context: { intent: "general_query" },
  onClose: () => console.log("closed"),
};

renderMedAssist(container, "YOUR_AGENT_ID", config);