You add one script to your site. It loads the ProseCaptain assistant, and then you can use it in several ways, anywhere on the page.

<script
  src="https://widget-api.prosecaptain.com/embed.js"
  data-widget-token="YOUR_TOKEN"
  data-widget-id="WIDGET_ID"
></script>

Ways to use it

WayWhat to addWhat it looks like
Chatnothing, works as soon as the script is addedA button in the bottom-right corner and a full chat window
Question linksthe pc-ask-question attribute on any link or buttonYour own link that opens the chat with a ready question
FAQ blocka container and the FAQ module where the block goesA title and suggested questions as buttons
Ask AI buttona container and the Ask AI module where the button goesOne “Ask AI” button in your brand colour
JavaScript APIyour own codeOpen the chat and send questions from anywhere on the page

All of them talk in the same chat window and use the same assistant knowledge. The FAQ and Ask AI modules reuse the script that is already loaded, so nothing loads twice.

Example: chat plus questions in your content

<!-- once per page, e.g. before </body> -->
<script src="https://widget-api.prosecaptain.com/embed.js" data-widget-token="YOUR_TOKEN" data-widget-id="WIDGET_ID"></script>

<!-- anywhere in your content -->
<p>Not sure which plan to pick? <a href="#" pc-ask-question="Which plan is right for me?">Ask the assistant</a>.</p>

Where to get the code

  1. Sign in at app.prosecaptain.com.
  2. Open AI Agent, choose your widget and go to the Installation tab.
  3. In the Embed Code card pick the chat widget and copy the code.

The code has two values:

  • data-widget-token: the workspace token, shared by every widget in the workspace.
  • data-widget-id: the widget id. Without it, the first published widget in the workspace is used.

Title, questions, colour, language and AI instructions are set in the app, in the widget settings. Changes show up without replacing the code. Some can be overridden with script parameters.

On WordPress you do not need to paste any code. See Widgets on WordPress.