Overview

A website assistant is one of the fastest Studio integration wins. Instead of building a brand new conversational backend, you can expose an existing peer inside your marketing site or customer portal and let it qualify traffic, answer product questions, and route visitors into existing flows.

This is especially useful when the assistant needs access to your own forms, calculators, or scheduling UI.

When to reach for this recipe

If your team needs the capabilities described above and you'd rather build on proven primitives than wire one from scratch — this is the shape to start from.

Architecture

Client SDK connects the website widget to a Studio peer. The site keeps ownership of the embedded UI and product actions such as opening a demo form, switching pricing tabs, or starting a checkout helper.

Use client tools for actions that belong in the browser, and keep the peer focused on reasoning and conversation design.

1. Register Website-Side Actions

Expose only actions that make sense in the browser shell of the site.

1const websiteTools = [
2 {
3 type: 'function',
4 function: {
5 name: 'openDemoForm',
6 description: 'Open the demo request form modal on the website',
7 parameters: {
8 type: 'object',
9 properties: {
10 teamSize: { type: 'string' },
11 },
12 },
13 },
14 implementation: async ({ teamSize }) => {
15 openDemoModal({ teamSize });
16 return 'Demo form opened';
17 },
18 },
19 {
20 type: 'function',
21 function: {
22 name: 'showPricingSection',
23 description: 'Scroll to the pricing section and highlight a plan',
24 parameters: {
25 type: 'object',
26 properties: {
27 plan: { type: 'string' },
28 },
29 required: ['plan'],
30 },
31 },
32 implementation: async ({ plan }) => {
33 scrollToPricing(plan);
34 return 'Pricing section highlighted';
35 },
36 },
37];

2. Let The Peer Run Qualification

The peer qualifies the visitor, then decides whether to answer, route, or trigger a site-side action.

1const response = await client.conversations.create({
2 messages: [
3 {
4 role: 'user',
5 content: 'We are a 120-person support team. Which plan should we look at and can you open the demo form?',
6 },
7 ],
8 clientTools: websiteTools,
9});
10 
11console.log(response.content);

Result

You get a public-facing widget that:

- Qualifies visitors with a Studio peer - Answers pricing and product questions in context - Triggers website actions such as forms and section navigation - Avoids maintaining a second custom bot stack just for the website

All recipesSuggest a change