How the GUI runs

The GUI is Search2o’s official interface: a single-page application bundled with the agent server. The GUI uses the server’s REST API and nothing else, and you are free to build interfaces of your own with the same API.

Only the REST API

Every action in the GUI is a call to the agent server’s REST API. The GUI has no private endpoints and no other channel, so everything the GUI does is available to your own code.

Where the GUI lives

The GUI’s files sit in the agent server’s ui directory, and the server serves them at its /ui path. Nothing has to be deployed or configured for this; installing the agent server is enough.

Serving the GUI from somewhere else

The files are static, so any web server or CDN can serve them. index.html carries a small block of configuration in a <meta name="search2o-ui-config"> tag:

SettingMeaning
apiBaseBase URL of the agent server's REST API. Empty means the same origin as the GUI. When the GUI and the agent server are on different origins, add the GUI's origin to the server's allowed CORS origins.
apiTimeoutSecondsTimeout, in seconds, for REST calls from the GUI. A timeout above 60 is worth keeping: publishing a description is checked by the cloud and can take up to a minute.
notificationDurationSecondsHow long a notification stays visible in the GUI.

Your own interface

The GUI is one client of the REST API, not a privileged one. A search box in your intranet, a chat bot, or a full application of your own can offer the same experience; see Creating your own client and Chat integrations.