This example embeds the Soliplex chat widget on a Plone page and wires up the
Plone client-side tools from plone_soliplex_tool.js. With these
tools the agent can identify the logged-in user, search the site, and answer
questions like “What are the most recent changes in my folder?”
<!-- 1. Load the widget bundle and the Plone tools -->
<script src="soliplex-chat.js"></script>
<script src="plone_soliplex_tool.js"></script>
<script>
// 2. (Optional) point the Plone client at your site root and tune behaviour.
// When omitted, the site root is auto-detected and same-origin cookies /
// a Volto "auth_token" JWT are used for authentication.
PloneSoliplex.configure({
// baseUrl: "https://plone.example.com",
// memberFolderBase: "/Members", // where per-user folders live
// userId: "bob", // force a user id if auto-detect fails
});
// 3. Initialize the widget with the Plone tool definitions.
SoliplexChat.init({
baseUrl: "https://soliplex.example.com",
roomId: "assistant",
title: "Plone Assistant",
tools: PloneSoliplex.getToolDefinitions(),
});
</script>
plone_get_current_user — id, full name, email and roles of the logged-in user.plone_recent_changes_in_my_folder — most recently modified items in the user's folder (falls back to authored content).plone_search — catalog search (@search) with type/path/creator/state filters.plone_list_folder_contents — list the immediate children of a folder.plone_get_content — fetch a single content item by path.SoliplexChat.init({
baseUrl: "https://soliplex.example.com",
roomId: "assistant",
tools: [
...PloneSoliplex.getToolDefinitions(),
{
name: "get_page_info",
description: "Get information about the current page",
parameters: { type: "object", properties: {} },
handler: async () => ({ title: document.title, url: location.href }),
},
],
});