Installation
Install the MentraOS SDK using Bun:Basic Concepts
The MentraOS SDK provides two main classes:AppServer
Base class you extend to create your app server. Handles webhook registration and session lifecycle.
AppSession
Manages the connection to a specific user session. Created automatically when users start your app.
Important: Apps should extend
AppServer and override the onSession method. The sessionId parameter follows the format "userId-packageName" (e.g., "[email protected]").Creating an App Server
Handling Sessions
When a user starts your app, youronSession method is called: