Skip to main content
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:
OptionDescriptionIdeal for…
Embedded Widget (Chat Widget)Integrates the assistant directly into a webpage through a JavaScript snippet.Websites, customer portals, private areas.
API ExecutionInvokes the assistant via HTTP requests to the Devic API, ideal for programmatic integrations.Internal apps or backend systems.
Conversation ConsoleInternal 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.
Accessing widget configuration

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

Main Fields

FieldDescription
EnabledActivates the assistant for use through the widget.
Allowed SourcesList of domains (using http or https) from which the widget can be loaded.
Welcome MessageInitial message displayed when the chat is opened.
Style ConfigurationCustomize 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:
// 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. Advanced assistant settings with response format

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
Assistant Cost Management panel

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

ElementPurpose
Chat WidgetVisual, direct integration into websites or portals.
Allowed SourcesRestricts the domains from which the widget can be loaded.
Response FormatDefines custom JSON output structures.
Cost ManagementMonitors cost, tokens, and conversation volume.

Next Steps

Next Step

Explore all available guardrails and learn how to strengthen safety and control in your assistants.