You need a published agent and its Embed code from Agent โ Deploy โ Website widget. Code injection on Squarespace needs a plan that includes it.
<script src="https://evasay.com/voice-widget.js" data-agent="AGENT_SLUG" async></script>
Under Agent โ Deploy โ Allowed websites, add each address your site opens at, for example https://your-site.squarespace.com and https://www.example.com. Then your page can pass values and functions to the agent.