yarn add agastya
// Import or require Agastya
import Agastya from "agastya";
// Initialize Agastya with your API key
const agastya = new Agastya("API_KEY");
Optionally, you can use a specific channel:
const agastya = new Agastya("API_KEY", "production"); // Production (default)
const agastya = new Agastya("API_KEY", "beta"); // Beta (stable)
const agastya = new Agastya("API_KEY", "dev"); // Nighly/development (breaking changes)
You can also use the official CDN instead:
<script async src="https://platform.oswaldlabs.com/_/API_KEY.js"></script>
Once you've created the Agastya object, you can start using the API:
agastya.open(); // Open the Agastya widget
agastya.api("enableMode", "read-aloud"); // Start read aloud mode
agastya.secureTrack({ hello: "world" }); // Track a custom event