This is a simple React + TypeScript demo app that lets you connect to an Atoms agent for either voice (webcall) or text chat. It uses the atoms-client-sdk for all client-side communication.
- Toggle between voice and text chat modes
- Real-time agent connection status
- Message history and auto-scrolling
- Mute/unmute for voice calls
- Error handling and status display
-
Install dependencies:
cd front-end-demo npm install -
Configure your agent ID:
Edit
src/App.tsxand set youragentId(or pass as a prop). -
Start the backend (for local API proxy):
cd ../example_backend npm install npm run devThe backend is a simple Express server that proxies requests to the Atoms API.
You must set your API key inexample_backend/index.js! -
Start the frontend:
cd ../front-end-demo npm run dev -
Open http://localhost:5173 in your browser.
-
For SDK usage and API details, refer to:
https://www.npmjs.com/package/atoms-client-sdk -
This demo uses Vite and Tailwind CSS.
MIT