Skip to content
mango·agentby Mangosteen Studio
Walkthrough · Start here

Create a project and embed the widget

Add a project for your site, allowlist its domain, and paste one script tag.

about 10 min (estimate) 4 steps
Before you start

1Create the project#

In the panel, open Projects → New project. Start from a blank project or clone an existing one. Cloning copies settings, CTAs and members with new keys, and can copy knowledge entries as unverified drafts.

2Allowlist your domains#

Under Domains, add every host the widget may run on, such as example.com. Subdomains of an allowlisted domain are allowed. The public key only works on these domains, and localhost is always allowed outside production.

3Write the persona#

In Settings, describe how the agent should sound and what it must never say. The grounding rules always come first, so the persona shapes tone, not truthfulness. Add Calls to action, Qualifying questions and always-human topics here too.

4Paste the embed tag#

The project's Embed card shows its tag. Paste it before </body> on every page:

html
<script src="https://<your-mango-host>/static/mango.js" data-project="pk_…" async></script>

mango.js and its lazy mango-capture.js come from widget/dist/ after pnpm --filter @mango-agent/widget build. Serve both from the same folder on any static host. If that host isn't your backend, add data-api="https://your-backend" to the tag.

Result

The widget runs on your site with its own persona and knowledge base.