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
| Way | What to add | What it looks like |
|---|---|---|
| Chat | nothing, works as soon as the script is added | A button in the bottom-right corner and a full chat window |
| Question links | the pc-ask-question attribute on any link or button | Your own link that opens the chat with a ready question |
| FAQ block | a container and the FAQ module where the block goes | A title and suggested questions as buttons |
| Ask AI button | a container and the Ask AI module where the button goes | One “Ask AI” button in your brand colour |
| JavaScript API | your own code | Open 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
- Sign in at app.prosecaptain.com.
- Open AI Agent, choose your widget and go to the Installation tab.
- 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.