This project demonstrates how to implement a web agent using React and the Trillet SDK. It serves as a sample implementation that you can use as a reference for integrating a web agent into your own website.
Before running this project, make sure you have:
- Node.js installed (version 14 or higher recommended)
- A Trillet account and API credentials
- Basic knowledge of React
- Clone this repository
- Copy
.env.sampleto.env - Fill in your Trillet credentials in the
.envfile - Install dependencies:
npm installIn the project directory, you can run:
Runs the app in development mode.
Open http://localhost:3000 to view it in the browser.
Builds the app for production to the build folder.
The build is optimized and ready for deployment.
Create a .env file in the root directory with the following variables:
REACT_APP_TRILLET_API_KEY=your_api_key
REACT_APP_TRILLET_AGENT_ID=your_agent_id
REACT_APP_TRILLET_WORKSPACE_ID=your_workspaceIdThis sample implementation includes:
- Basic web agent setup
- Real-time communication
- Chat interface
- Agent status handling
For questions about:
- This sample implementation: Open an issue in this repository
- Trillet SDK: Contact Trillet support
- React: Check the React documentation
This project is licensed under the MIT License - see the LICENSE file for details.