Skip to main content
The fastest way to add MedAssist. Drop a custom element and a script onto any page — no build step, no framework required. The widget appears as a floating button that loads and opens the chat when clicked.
1

Create your agent

Sign up at console.eka.care, create an agent, and customize it — theme, title, initial message, and allowed inputs are all stored with the agent.
New to the console? Follow the detailed setup guide to create your account and get set up step by step.
2

Copy your agent ID

Grab the agentId from the agent you just created.
3

Add the embed snippet

Paste the custom element where you want it and the script tag just before </body>:
<eka-medassist-widget agent-id="YOUR_AGENT_ID"></eka-medassist-widget>

<script
  src="https://cdn.jsdelivr.net/npm/@eka-care/medassist-widget-embed@latest/dist/index.js"
  async
></script>
4

Open your page

A floating launcher button appears. Clicking it lazy-loads the widget assets and opens the chat.
Only agent-id is required. Everything else — theme, title, initial message — comes from the agent config you set in the console, so you usually don’t need any other attributes.

Full page example

<!DOCTYPE html>
<html>
  <head>
    <title>My Website</title>
  </head>
  <body>
    <h1>Welcome</h1>

    <eka-medassist-widget agent-id="YOUR_AGENT_ID"></eka-medassist-widget>

    <script
      src="https://cdn.jsdelivr.net/npm/@eka-care/medassist-widget-embed@latest/dist/index.js"
      async
    ></script>
  </body>
</html>

Install from npm

If you bundle your own assets, install the package instead of using the CDN:
npm install @eka-care/medassist-widget-embed

Use it in a framework

The custom element works anywhere HTML does. Inject the loader script and render the tag:
import { useEffect } from "react";

function App() {
  useEffect(() => {
    const script = document.createElement("script");
    script.src =
      "https://cdn.jsdelivr.net/npm/@eka-care/medassist-widget-embed@latest/dist/index.js";
    script.async = true;
    document.body.appendChild(script);
  }, []);

  return <eka-medassist-widget agent-id="YOUR_AGENT_ID" />;
}
Already in a React app and want the chat rendered inline rather than as a Web Component? Use the React SDK instead.

How it works

1

Register

The script registers the <eka-medassist-widget> custom element.
2

Launcher

The element renders a floating button (or a full view if display-mode="full").
3

Lazy load

On first open, the widget’s JS and CSS are fetched — keeping your initial page light.
4

Isolation

The widget runs inside a Shadow DOM, so its styles never clash with your site.

Next steps

Customization & overrides

Every attribute you can set — theme, display mode, launcher styling, and more.

JavaScript API

Configure the widget programmatically with EkaMedAssist.init().

Troubleshooting

Confirm agent-id is set, check the Network tab to verify the loader script loaded, and look in the console for errors.
If you self-host assets via data-widget-assets, ensure medassist-widget.js and medassist-widget.css are served at that path — or omit it to use the default CDN.