) before the closing tag on any HTML, WordPress, Shopify, or React website."}},{"@type":"Question","name":"Is ToolsWallet RAG free to use?","acceptedAnswer":{"@type":"Answer","text":"Yes! Every developer account gets 2 permanently free Knowledge Bases (RAGs) with up to 25 records each, real-time streaming SSE API, and 1-line embeddable widgets with zero credit card required."}}]}]}
ToolsWallet RAG documentation v1.0. Learn how to build custom knowledge assistants with zero cost. ToolsWallet Platform
DocumentationWidget JS API
3 min readAugust 2026
Client JS API

Widget JavaScript API & Controls

Try in Console

When the widget script loads on your page, it automatically registers a global `window.ToolsWalletWidget` controller object, enabling full programmatic control from your custom buttons, menus, or checkout workflows.

1. Global window.ToolsWalletWidget API

Once widget.js is loaded on your page, you can interact with the widget directly from any script tag or UI component.

2. Available JavaScript Methods

The following methods are available on the global controller object:

MethodParametersDescription
window.ToolsWalletWidget.open()NoneOpens the chat window and focuses the message input.
window.ToolsWalletWidget.close()NoneMinimizes and closes the active chat window.
window.ToolsWalletWidget.toggle()NoneToggles between open and minimized chat states.
window.ToolsWalletWidget.send(text)stringPre-fills and automatically submits a question to the assistant.

3. Triggering from Custom Buttons & Links

You can easily bind these methods to any button on your website:

HTML
<!-- Custom 'Ask Assistant' Button -->
<button onclick="window.ToolsWalletWidget.open()">
  💬 Need Help? Chat with AI
</button>

<!-- Quick FAQ Action Button -->
<button onclick="window.ToolsWalletWidget.send('How do I track my order?')">
  📦 Track My Order
</button>
Ready to build your Custom RAG?
Deploy in under 3 minutes with 2 free RAG knowledge bases.
Create Free RAG