> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devic.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Other Options

> Discover the available ways to offer your Devic assistants to end users: web widgets, external integrations, and advanced configuration controls.

In addition to running inside the **internal conversation console**, **Devic assistants** can be made available to end users through several delivery methods.\
These options let you integrate the assistant into web applications, customer portals, or corporate systems while maintaining full control over its behavior and style.

***

## Deployment Options

The main alternatives for exposing an assistant are:

| Option                            | Description                                                                                    | Ideal for...                               |
| --------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------ |
| **Embedded Widget (Chat Widget)** | Integrates the assistant directly into a webpage through a JavaScript snippet.                 | Websites, customer portals, private areas. |
| **API Execution**                 | Invokes the assistant via HTTP requests to the Devic API, ideal for programmatic integrations. | Internal apps or backend systems.          |
| **Conversation Console**          | Internal environment for testing and debugging assistant behavior.                             | Technical teams and developers.            |

***

## Chat Widget Configuration

The **Chat Widget** is the fastest way to offer your assistant to end users.\
It is configured from the assistant’s options menu, under **Advanced Settings → Chat Widget**.

<img src="https://mintcdn.com/devic/rV-MxmK3RcOtTwNn/access-advance-settings-widget-assistant.png?fit=max&auto=format&n=rV-MxmK3RcOtTwNn&q=85&s=c5db2032d2ba539f398012d549fc9cf4" alt="Accessing widget configuration" width="1912" height="940" data-path="access-advance-settings-widget-assistant.png" />

##

<img src="https://mintcdn.com/devic/rV-MxmK3RcOtTwNn/chat-widget-front.png?fit=max&auto=format&n=rV-MxmK3RcOtTwNn&q=85&s=5410b5d75f78ce4491ec067939ac7f2b" alt="Widget configuration panel" width="1912" height="940" data-path="chat-widget-front.png" />

There you can enable it and define the allowed domains from which it can be used

### Main Fields

| Field                   | Description                                                                    |
| ----------------------- | ------------------------------------------------------------------------------ |
| **Enabled**             | Activates the assistant for use through the widget.                            |
| **Allowed Sources**     | List of domains (using `http` or `https`) from which the widget can be loaded. |
| **Welcome Message**     | Initial message displayed when the chat is opened.                             |
| **Style Configuration** | Customize widget size, color, and visual appearance.                           |

***

## Embedding the Widget on Your Website

Once enabled, Devic automatically generates the **JavaScript snippet** you can copy and paste into your website.\
This snippet initializes the assistant and defines its behavior on the page.

Due to Markdown compatibility, actual `<script>` tags are not shown here, as they could break rendering.\
Below is a simplified and safe version of the code:

```js theme={null}
// Example snippet to initialize the Devic chat widget
const config = {
  containerId: "suntropyai-chat-widget",
  assistantId: "68d8e28195e45739d8ca41",
  context: {}, // Optional: information you want to pass to the assistant
  options: { defaultSize: "small" } // Initial widget size
};

const container = document.createElement("div");
container.id = config.containerId;
document.body.appendChild(container);
window.initChatWidget(config);

// (The real code ends with </script>, omitted here for Markdown compatibility)
```

***

## Customization and Access Control

Devic allows restricting the use of the widget to **specific domains** through the **Allowed Sources** field.\
This ensures that the assistant can only be loaded from authorized addresses (for example, `https://yourcompany.com` or `*.intranet.local`).

You can also adjust the assistant’s **response format** using the **Response Format** section, defining JSON structures when needed.

<img src="https://mintcdn.com/devic/rV-MxmK3RcOtTwNn/advance-settings-assistant.png?fit=max&auto=format&n=rV-MxmK3RcOtTwNn&q=85&s=ec44b566c0464b444a2d7594003bea5c" alt="Advanced assistant settings with response format" width="1912" height="940" data-path="advance-settings-assistant.png" />

***

## Usage and Cost Monitoring

All executions performed through the widget, API, or console are recorded in the **Cost Management** panel, available from the assistant’s options menu.

There you can view:

* Total and average daily cost
* Number of conversations executed
* Input and output tokens per day

<img src="https://mintcdn.com/devic/UhQytwpargfuScyh/cost-management-assistant.png?fit=max&auto=format&n=UhQytwpargfuScyh&q=85&s=e48103741b2f49097c1f15f85bce1639" alt="Assistant Cost Management panel" width="1912" height="940" data-path="cost-management-assistant.png" />

***

## Best Practices

* **Restrict allowed domains** to prevent unauthorized widget usage.
* **Set a clear welcome message** to guide the initial interaction.
* **Validate the assistant’s behavior** in the **conversation console** before publishing.
* **Monitor cost** and optimize prompts or models as usage grows.
* **Use API Execution** when you need full control of the flow or backend integration.

***

## Summary

| Element             | Purpose                                                    |
| ------------------- | ---------------------------------------------------------- |
| **Chat Widget**     | Visual, direct integration into websites or portals.       |
| **Allowed Sources** | Restricts the domains from which the widget can be loaded. |
| **Response Format** | Defines custom JSON output structures.                     |
| **Cost Management** | Monitors cost, tokens, and conversation volume.            |

***

## Next Steps

<Card title="Next Step" icon="shield" href="/devic/assistants/guardrails">
  Explore all available guardrails and learn how to strengthen safety and control in your assistants.
</Card>
