Embed Agent

After creating an Agent and uploading data into it, you can start chatting with it.
By embedding the code snippet in your website, you can easily access it directly from your browser.

You can find the relevant snippet by clicking on the "share" sign under the Agent name. A tab will be displayed at the lower part of the Agent - click on the "EMBED CODE" tab in order to see the code snippet.


<script id="oneai-snippet" src="https://oneai.com/~widget?id=<YOUR-AGENT-NAME-HERE>" defer>
  • The code snippet should be inserted into the part of your webpage.
  • The widget is only available for PUBLIC Agents. Any PRIVATE Agent will not be accessible through the snippet.


NameTypeDescriptionDefault Value
position stringThe location of the widget on your webpage -
bottom left (left) or bottom right (right).
initial-statestringDefines whether the widget will be automatically open (open)
or minimalized (closed).

Here's an example of a snippet that dictates the Agent will be open and located on the bottom left corner of the page:

<script id="oneai-snippet" src="https://oneai.com/~widget?
&initial-state=open" defer>