{"_id":"@aisense/react-voice-ai-widget","_rev":"8-9f894b536004b9c120cf2f4ce6cd1286","name":"@aisense/react-voice-ai-widget","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"@aisense/react-voice-ai-widget","version":"0.1.0","keywords":[],"author":{"name":"Chandrakant Singh"},"license":"ISC","_id":"@aisense/react-voice-ai-widget@0.1.0","maintainers":[{"name":"aisense","email":"cks3383@gmail.com"}],"dist":{"shasum":"cddb169c1e0064574839ca17a66c034bdd0fc8a6","tarball":"https://registry.npmjs.org/@aisense/react-voice-ai-widget/-/react-voice-ai-widget-0.1.0.tgz","fileCount":8,"integrity":"sha512-IkasD1rtCtYYNbXABbgPwPb4armjUQ+6FPv4NIo//y6L8m51iTCZ3U0euhKCqACXFLqjbrF6v/1m7mLpb3B5NQ==","signatures":[{"sig":"MEUCIQC6qjHq3tFRl4mqqhZbjnJKHwkLfj3OMWNvpybN/LL42QIgKGSCfpNPHBXPusSJ5c7X9BN0Ejoqnxb6mqIC8BShkA4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17135},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"private":false,"scripts":{"build":"vite build","prepublishOnly":"npm run build"},"_npmUser":{"name":"aisense","email":"cks3383@gmail.com"},"_npmVersion":"10.8.2","description":"React component to easily build a livekit voice ai widget","directories":{},"_nodeVersion":"20.19.3","_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","react":"^19.2.4","react-dom":"^19.2.4","typescript":"^5.9.3","@types/node":"^25.0.10","@types/react":"^19.2.9","livekit-client":"^2.17.0","vite-plugin-dts":"^4.5.4","@types/react-dom":"^19.2.3","@livekit/components-react":"^2.9.19"},"peerDependencies":{"react":"^19.2.4","react-dom":"^19.2.4","livekit-client":"^2.17.0","@livekit/components-react":"^2.9.19"},"_npmOperationalInternal":{"tmp":"tmp/react-voice-ai-widget_0.1.0_1769481044208_0.5739664117045447","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aisense/react-voice-ai-widget","version":"0.2.0","keywords":[],"author":{"name":"Chandrakant Singh"},"license":"ISC","_id":"@aisense/react-voice-ai-widget@0.2.0","maintainers":[{"name":"aisense","email":"cks3383@gmail.com"}],"dist":{"shasum":"a96824c93066f8d7da0ae15e023deabb2ccbd7ac","tarball":"https://registry.npmjs.org/@aisense/react-voice-ai-widget/-/react-voice-ai-widget-0.2.0.tgz","fileCount":8,"integrity":"sha512-B3G0fmsme7dtFA2dpkTRWvlRsx+2EfMueJzRgd6/Sc0iAnSpOYe2it/ZWmchLsdf+MP48ziZTFZgW+qFJYwsdg==","signatures":[{"sig":"MEQCIC4I+rEqdWFarOV0I/qdtYbSJfVMKscL4uxXVLaYbYGsAiBbiyz2aKEq4eeJi48a+d+TlJaYPFZHjyEYz/V0gT8DkA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":106754},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"private":false,"scripts":{"build":"vite build","prepublishOnly":"npm run build"},"_npmUser":{"name":"aisense","email":"cks3383@gmail.com"},"_npmVersion":"10.8.2","description":"React component to easily build a livekit voice ai widget","directories":{},"_nodeVersion":"20.19.3","_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","axios":"^1.13.3","react":"^19.2.4","react-dom":"^19.2.4","typescript":"^5.9.3","@types/node":"^25.0.10","@types/react":"^19.2.9","livekit-client":"^2.17.0","vite-plugin-dts":"^4.5.4","@types/react-dom":"^19.2.3","@livekit/components-react":"^2.9.19"},"peerDependencies":{"axios":"^1.13.3","react":"^19.2.4","react-dom":"^19.2.4","livekit-client":"^2.17.0","@livekit/components-react":"^2.9.19"},"_npmOperationalInternal":{"tmp":"tmp/react-voice-ai-widget_0.2.0_1769539432944_0.4095331315011508","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@aisense/react-voice-ai-widget","version":"0.3.0","keywords":[],"author":{"name":"Chandrakant Singh"},"license":"ISC","_id":"@aisense/react-voice-ai-widget@0.3.0","maintainers":[{"name":"aisense","email":"cks3383@gmail.com"}],"dist":{"shasum":"8dee40e6ec5fc9660a585342c72a3ca6142520f9","tarball":"https://registry.npmjs.org/@aisense/react-voice-ai-widget/-/react-voice-ai-widget-0.3.0.tgz","fileCount":8,"integrity":"sha512-B8K3UC+PBWzEsG4NtwttGutG6gFp4ETq+O30faNaOT9Rk5amAQ6JZalQg+aXmhAUoK/mHX4hEChYSMx63VDJEw==","signatures":[{"sig":"MEQCIGSZmKVm1PHjr9TpH8w6bTmUcrNz9N6hVlvq1Pw2zNykAiBtqYlg+7vDtL4TdcKCO6ODY/QR1T5CLPSPa2/SER1sVQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":106754},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"private":false,"scripts":{"build":"vite build","prepublishOnly":"npm run build"},"_npmUser":{"name":"aisense","email":"cks3383@gmail.com"},"_npmVersion":"10.8.2","description":"React component to easily build a livekit voice ai widget","directories":{},"_nodeVersion":"20.19.3","_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","axios":"^1.13.3","react":"^19.2.4","react-dom":"^19.2.4","typescript":"^5.9.3","@types/node":"^25.0.10","@types/react":"^19.2.9","livekit-client":"^2.17.0","vite-plugin-dts":"^4.5.4","@types/react-dom":"^19.2.3","@livekit/components-react":"^2.9.19"},"peerDependencies":{"axios":"^1.13.3","react":"^19.2.4","react-dom":"^19.2.4","livekit-client":"^2.17.0","@livekit/components-react":"^2.9.19"},"_npmOperationalInternal":{"tmp":"tmp/react-voice-ai-widget_0.3.0_1769539667886_0.4553363044057126","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@aisense/react-voice-ai-widget","version":"0.4.0","keywords":[],"author":{"name":"Chandrakant Singh"},"license":"ISC","_id":"@aisense/react-voice-ai-widget@0.4.0","maintainers":[{"name":"aisense","email":"cks3383@gmail.com"}],"dist":{"shasum":"5375aa79092626ce4ac200741e78aa150f10d3bc","tarball":"https://registry.npmjs.org/@aisense/react-voice-ai-widget/-/react-voice-ai-widget-0.4.0.tgz","fileCount":8,"integrity":"sha512-HW7rIUs6DJSXGZ2e/y2NIPuqyQq1af6NLKqrq+Ra08NPBopxlvMoILMRSa61X11ISZXBgwjPGMLNkysLsMl6hw==","signatures":[{"sig":"MEUCIQDJlrV0sMfnjhtShXNp/lHskOGzuXhUxkCCwpqL9CQsVQIgN17v+mxS3XjeQmpEI+//DXMjSMLEbyvRc1RPCYth244=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":106820},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"private":false,"scripts":{"build":"vite build","prepublishOnly":"npm run build"},"_npmUser":{"name":"aisense","email":"cks3383@gmail.com"},"_npmVersion":"10.8.2","description":"React component to easily build a livekit voice ai widget","directories":{},"_nodeVersion":"20.19.3","_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","axios":"^1.13.3","react":"^19.2.4","react-dom":"^19.2.4","typescript":"^5.9.3","@types/node":"^25.0.10","@types/react":"^19.2.9","livekit-client":"^2.17.0","vite-plugin-dts":"^4.5.4","@types/react-dom":"^19.2.3","@livekit/components-react":"^2.9.19"},"peerDependencies":{"axios":"^1.13.3","react":"^19.2.4","react-dom":"^19.2.4","livekit-client":"^2.17.0","@livekit/components-react":"^2.9.19"},"_npmOperationalInternal":{"tmp":"tmp/react-voice-ai-widget_0.4.0_1769542058777_0.9319358613271185","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@aisense/react-voice-ai-widget","version":"0.4.1","keywords":[],"author":{"name":"Chandrakant Singh"},"license":"ISC","_id":"@aisense/react-voice-ai-widget@0.4.1","maintainers":[{"name":"aisense","email":"cks3383@gmail.com"}],"dist":{"shasum":"062b5e8bfb9e0ab3d41c211eedf48e18f7b456b7","tarball":"https://registry.npmjs.org/@aisense/react-voice-ai-widget/-/react-voice-ai-widget-0.4.1.tgz","fileCount":8,"integrity":"sha512-XKRSTL6T0AWWgDJNxbIrvVPFDD2ne56yMk54WNxZ1rz5dAh2hCOnZO0mPYyOZLvleQxiLYX0Sy8iEkWu1feoMQ==","signatures":[{"sig":"MEUCIAHga0CVMpcTsYIqUUeIal7Kl9iQ+QOhUpiawCGNPbC9AiEAqJMRltl2iZ3OMuPvfU1Z3A5zTXa15B3SNfk7DxFfB5o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":112008},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"01d81e81277667cb55b201ef6ab9b67b7627675b","private":false,"scripts":{"build":"vite build","prepublishOnly":"npm run build"},"_npmUser":{"name":"aisense","email":"cks3383@gmail.com"},"_npmVersion":"10.8.2","description":"React component to easily build a livekit voice ai widget","directories":{},"_nodeVersion":"20.19.3","_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","axios":"^1.13.3","react":"^19.2.4","react-dom":"^19.2.4","typescript":"^5.9.3","@types/node":"^25.0.10","@types/react":"^19.2.9","livekit-client":"^2.17.0","vite-plugin-dts":"^4.5.4","@types/react-dom":"^19.2.3","@livekit/components-react":"^2.9.19"},"peerDependencies":{"axios":"^1.13.3","react":"^19.2.4","react-dom":"^19.2.4","livekit-client":"^2.17.0","@livekit/components-react":"^2.9.19"},"_npmOperationalInternal":{"tmp":"tmp/react-voice-ai-widget_0.4.1_1769543104730_0.4520437395224546","host":"s3://npm-registry-packages-npm-production"}},"0.4.2":{"name":"@aisense/react-voice-ai-widget","version":"0.4.2","keywords":[],"author":{"name":"Chandrakant Singh"},"license":"ISC","_id":"@aisense/react-voice-ai-widget@0.4.2","maintainers":[{"name":"aisense","email":"cks3383@gmail.com"}],"dist":{"shasum":"9e7b1db6310deb0a54a36b3c8e37c4501dcd0c84","tarball":"https://registry.npmjs.org/@aisense/react-voice-ai-widget/-/react-voice-ai-widget-0.4.2.tgz","fileCount":8,"integrity":"sha512-S/1q1rg7ykXOkpXThEtYd7WI/gR1Jq8UwNELdiDu8Vxa3ZFMa1ULn/As2fhGFifXItQ8ARFht3KAzk5FpdYioQ==","signatures":[{"sig":"MEUCICaw21KEDme4PqKSv0p/M46oWcejlq7qiXLcyLc0iG4JAiEA1rqkgzwgSM6yg7780Z7aHWE69gQYL2/yWOKePw9udKY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":112003},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"95cd252092be3aa835d5427cbe15fc653e9754d9","private":false,"scripts":{"build":"vite build","prepublishOnly":"npm run build"},"_npmUser":{"name":"aisense","email":"cks3383@gmail.com"},"_npmVersion":"10.8.2","description":"React component to easily build a livekit voice ai widget","directories":{},"_nodeVersion":"20.19.3","_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","axios":"^1.13.3","react":"^19.2.4","react-dom":"^19.2.4","typescript":"^5.9.3","@types/node":"^25.0.10","@types/react":"^19.2.9","livekit-client":"^2.17.0","vite-plugin-dts":"^4.5.4","@types/react-dom":"^19.2.3","@livekit/components-react":"^2.9.19"},"peerDependencies":{"axios":"^1.13.3","react":"^19.2.4","react-dom":"^19.2.4","livekit-client":"^2.17.0","@livekit/components-react":"^2.9.19"},"_npmOperationalInternal":{"tmp":"tmp/react-voice-ai-widget_0.4.2_1769543256907_0.8539688792555136","host":"s3://npm-registry-packages-npm-production"}},"0.4.3":{"name":"@aisense/react-voice-ai-widget","version":"0.4.3","keywords":[],"author":{"name":"Chandrakant Singh"},"license":"ISC","_id":"@aisense/react-voice-ai-widget@0.4.3","maintainers":[{"name":"aisense","email":"cks3383@gmail.com"}],"dist":{"shasum":"aabf766cd1bff48c020ced3ddb0b95c9a56ddd41","tarball":"https://registry.npmjs.org/@aisense/react-voice-ai-widget/-/react-voice-ai-widget-0.4.3.tgz","fileCount":8,"integrity":"sha512-pUhQc+UnjibNzujqzX1zpyTJHf+uJZDrarSDGg151d8lhxnxEwSK4YIsV6gUpa2NDV/qD5fmpzsE9Q5KscuWog==","signatures":[{"sig":"MEUCIQDIuq7Vgp90W12ah4KbQb3ux0n5N/E2UfmJZFn/UngazgIgJZlAovYeec0VSVfrgISnQDYQ95jG3A/il7dHhybO5cE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":111998},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"0b6ac92b801768d49a748072b93ad4e1548e0b70","private":false,"scripts":{"build":"vite build","prepublishOnly":"npm run build"},"_npmUser":{"name":"aisense","email":"cks3383@gmail.com"},"_npmVersion":"10.8.2","description":"React component to easily build a livekit voice ai widget","directories":{},"_nodeVersion":"20.19.3","_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","axios":"^1.13.3","react":"^19.2.4","react-dom":"^19.2.4","typescript":"^5.9.3","@types/node":"^25.0.10","@types/react":"^19.2.9","livekit-client":"^2.17.0","vite-plugin-dts":"^4.5.4","@types/react-dom":"^19.2.3","@livekit/components-react":"^2.9.19"},"peerDependencies":{"axios":"^1.13.3","react":"^19.2.4","react-dom":"^19.2.4","livekit-client":"^2.17.0","@livekit/components-react":"^2.9.19"},"_npmOperationalInternal":{"tmp":"tmp/react-voice-ai-widget_0.4.3_1769543333561_0.5493709915254574","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@aisense/react-voice-ai-widget","version":"1.0.0","private":false,"type":"module","main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"build":"vite build","prepublishOnly":"npm run build"},"peerDependencies":{"@livekit/components-react":"^2.9.19","livekit-client":"^2.17.0","react":"^19.2.4","react-dom":"^19.2.4","axios":"^1.13.3"},"keywords":[],"author":{"name":"Chandrakant Singh"},"license":"ISC","description":"React component to easily build a livekit voice ai widget","devDependencies":{"@livekit/components-react":"^2.9.19","@types/node":"^25.0.10","@types/react":"^19.2.9","@types/react-dom":"^19.2.3","axios":"^1.13.3","livekit-client":"^2.17.0","react":"^19.2.4","react-dom":"^19.2.4","typescript":"^5.9.3","vite":"^7.3.1","vite-plugin-dts":"^4.5.4"},"_id":"@aisense/react-voice-ai-widget@1.0.0","gitHead":"7bb1b66dfb06f55f86724fb5eb1d0184fceca019","_nodeVersion":"20.19.3","_npmVersion":"10.8.2","dist":{"integrity":"sha512-uX2uzaXxsVLSc9hIJAR71xKK2bJPIHNbWuYpm6wFA+JMtR61xvgiUJ+IH3zepkIw56ITCn2Ypa3Y8HLzd8fhvw==","shasum":"e72f954c5d638f3587398b98e581e7665be9950d","tarball":"https://registry.npmjs.org/@aisense/react-voice-ai-widget/-/react-voice-ai-widget-1.0.0.tgz","fileCount":12,"unpackedSize":122592,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC3Jcc9eAfkn3UWY8EdcaZgbW9SfCjr95POetzp5ItMyAIgLuBLZFNe++I1V5GvQMiMp96q8cFaeGdKpibJmfHVZlQ="}]},"_npmUser":{"name":"aisense","email":"cks3383@gmail.com"},"directories":{},"maintainers":[{"name":"aisense","email":"cks3383@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-voice-ai-widget_1.0.0_1769627508858_0.9853595828310759"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-27T02:30:44.086Z","modified":"2026-01-28T19:11:49.115Z","0.1.0":"2026-01-27T02:30:44.369Z","0.2.0":"2026-01-27T18:43:53.089Z","0.3.0":"2026-01-27T18:47:48.028Z","0.4.0":"2026-01-27T19:27:38.976Z","0.4.1":"2026-01-27T19:45:04.914Z","0.4.2":"2026-01-27T19:47:37.056Z","0.4.3":"2026-01-27T19:48:53.729Z","1.0.0":"2026-01-28T19:11:49.004Z"},"author":{"name":"Chandrakant Singh"},"license":"ISC","keywords":[],"description":"React component to easily build a livekit voice ai widget","maintainers":[{"name":"aisense","email":"cks3383@gmail.com"}],"readme":"# @aisense/react-voice-ai-widget\n\nA lightweight React component to embed a **CasaNeo Voice AI agent** into any React application.\n\nCasaNeo is a reference VoiceAI implementation used by the **CasaNeo Reference Website** project.  \nThis widget makes it easy to start a voice conversation session by connecting your app to a LiveKit-powered agent using CasaNeo’s backend and configuration system.\n\n---\n\n## Features\n\n- Plug-and-play React component\n- Works with LiveKit Agents\n- Session-based voice conversations\n- Secure token fetching via CasaNeo backend\n- Supports dynamic start/stop of voice sessions\n- Framework-agnostic (Vite, CRA, Next.js, etc.)\n- No bundled styles (you control UI & layout)\n\n---\n\n## Installation\n\nInstall the widget:\n\n```bash\nnpm install @aisense/react-voice-ai-widget\n```\n\nThis package has **peer dependencies** that must be installed in your app:\n\n```bash\nnpm install @livekit/components-react livekit-client\n```\n\n> These are peer dependencies to avoid duplicate React/LiveKit instances and ensure compatibility with your app’s versions.\n\n---\n\n## Basic Usage\n\n```tsx\nimport { useState } from \"react\";\nimport { ReactVoiceAIWidget } from \"@aisense/react-voice-ai-widget\";\n\nconst HomePage = () => {\n  const [startConversation, setStartConversation] = useState(false);\n\n  return (\n    <div>\n      <button\n        className=\"px-4 py-2 rounded bg-blue-500 text-white\"\n        onClick={() => setStartConversation(true)}\n      >\n        Start Session\n      </button>\n\n      {startConversation && (\n        <ReactVoiceAIWidget\n          serverUrl={import.meta.env.VITE_SERVER_URL}\n          livekitUrl={import.meta.env.VITE_LIVEKIT_URL}\n          clientToken={import.meta.env.VITE_CLIENT_TOKEN}\n          agentId=\"1\"\n          sessionId=\"1\"\n        />\n      )}\n    </div>\n  );\n};\n\nexport default HomePage;\n```\n\n---\n\n## Agent commands -> React Router navigation\n\nIf your LiveKit agent publishes UI commands to the `agent_commands` topic (JSON: `{ \"command\": \"navigate\", \"data\": \"/some/url\" }`),\nuse the **provider** + **router bridge** so the connection survives route changes and navigation works anywhere in your app.\n\n```tsx\nimport { BrowserRouter, useNavigate } from \"react-router-dom\";\nimport {\n  ReactVoiceAIProvider,\n  ReactVoiceAIRouterBridge,\n  useReactVoiceAI,\n} from \"@aisense/react-voice-ai-widget\";\n\nfunction RouterBridge() {\n  const navigate = useNavigate();\n  return <ReactVoiceAIRouterBridge navigate={navigate} />;\n}\n\nfunction ConnectButton() {\n  const { connect, isConnecting, isConnected } = useReactVoiceAI();\n  return (\n    <button onClick={() => connect()} disabled={isConnecting || isConnected}>\n      Connect Voice AI\n    </button>\n  );\n}\n\nexport function App() {\n  return (\n    <BrowserRouter>\n      <ReactVoiceAIProvider\n        serverUrl={import.meta.env.VITE_SERVER_URL}\n        livekitUrl={import.meta.env.VITE_LIVEKIT_URL}\n        clientToken={import.meta.env.VITE_CLIENT_TOKEN}\n        agentId=\"1\"\n        sessionId=\"1\"\n        connect={false}\n      >\n        {/* Must be inside Router to access useNavigate() */}\n        <RouterBridge />\n\n        {/* Any component anywhere can call connect() */}\n        <ConnectButton />\n\n        {/* ...your routes/layout... */}\n      </ReactVoiceAIProvider>\n    </BrowserRouter>\n  );\n}\n```\n\nNotes:\n- The provider should be mounted once (typically near the app root) so the LiveKit connection doesn't break on navigation.\n- The widget (`ReactVoiceAIWidget`) still works for audio-only embedding, but it does not provide the global command/navigation wiring.\n\n---\n\n## Props\n\n```ts\nexport type ReactVoiceAIWidgetProps = {\n  serverUrl: string;\n  livekitUrl: string;\n  clientToken: string;\n  agentId: string;\n  sessionId: string;\n  connect?: boolean;\n  children?: React.ReactNode;\n  className?: string;\n};\n```\n\n### `serverUrl`\n\nCasaNeo backend server URL.\nUsed to fetch a LiveKit token securely.\n\nExample:\n\n```ts\nhttps://api.casaneo.ai\n```\n\n---\n\n### `livekitUrl`\n\nLiveKit WebSocket URL.\n\nExample:\n\n```ts\nwss://your-livekit-instance.livekit.cloud\n```\n\n---\n\n### `clientToken`\n\nCasaNeo client token generated via the **CasaNeo Admin Console**.\nUsed to authenticate your frontend against the CasaNeo backend.\n\n---\n\n### `agentId`\n\nAgent identifier configured in the **CasaNeo Agent Studio**.\n\nEach agent represents a distinct voice AI behavior (interviewer, real estate agent, tutor, etc.).\n\n---\n\n### `sessionId`\n\nUnique identifier for the voice conversation session.\n\nThis is typically:\n\n* an interview ID\n* a property search session\n* a customer interaction ID\n* any entity your data server uses to initialize the agent\n\nThe agent uses this ID to fetch session-specific data.\n\n---\n\n### `connect` (optional)\n\nWhether the widget should connect to LiveKit immediately.\n\nDefault: `true`\n\nExample:\n\n```tsx\n<ReactVoiceAIWidget connect={false} />\n```\n\nUseful if you want to delay connection until user interaction.\n\n---\n\n### `children` (optional)\n\nCustom React components rendered inside the LiveKit room.\n\nYou can use this to render your own UI, controls, or overlays.\n\n---\n\n### `className` (optional)\n\nCSS class for the widget container.\n\nExample:\n\n```tsx\n<ReactVoiceAIWidget className=\"h-full w-full\" />\n```\n\n---\n\n## Environment Variables\n\nThis widget does **not** read `.env` files directly.\n\nYour app is responsible for loading env vars and passing them as props.\n\n### Vite\n\n```env\nVITE_SERVER_URL=https://api.casaneo.ai\nVITE_LIVEKIT_URL=wss://xyz.livekit.cloud\nVITE_CLIENT_TOKEN=abc123\n```\n\n### CRA\n\n```env\nREACT_APP_SERVER_URL=...\nREACT_APP_LIVEKIT_URL=...\nREACT_APP_CLIENT_TOKEN=...\n```\n\n### Next.js\n\n```env\nNEXT_PUBLIC_SERVER_URL=...\nNEXT_PUBLIC_LIVEKIT_URL=...\nNEXT_PUBLIC_CLIENT_TOKEN=...\n```\n\n---\n\n## How it works (high level)\n\n1. Your app renders `ReactVoiceAIWidget`\n2. The widget calls CasaNeo backend using `serverUrl`\n3. CasaNeo returns a LiveKit token\n4. The widget connects to LiveKit using `livekitUrl`\n5. The agent is initialized using `agentId` + `sessionId`\n6. Voice conversation starts\n\nAll sensitive data fetching happens **server-to-server**.\n\n---\n\n## Peer Dependencies (required)\n\nThis package requires:\n\n```json\n\"@livekit/components-react\": \">=2\",\n\"livekit-client\": \">=2\"\n```\n\nInstall them manually if not already present.\n\n---\n\n## Compatibility\n\n* React 18+\n* Vite / CRA / Next.js\n* LiveKit Agents (Node or Python)\n* Works with any CasaNeo backend\n\n---\n\n## Versioning & Updates\n\nThis package follows **semantic versioning**:\n\n* Patch: bugfixes\n* Minor: new features\n* Major: breaking changes\n\nUpgrade to latest:\n\n```bash\nnpm install @aisense/react-voice-ai-widget@latest\n```\n\n---\n\n## License\n\nMIT\n\n---\n\n## About CasaNeo\n\nCasaNeo is a reference VoiceAI platform demonstrating:\n\n* agent orchestration\n* voice pipelines\n* session-based initialization\n* secure data access\n* LiveKit-powered realtime AI conversations\n\nThis widget is the official way to embed CasaNeo agents in React applications.\n","readmeFilename":"README.md"}