harmony-sdk
Harmony SDK
Harmony hosts web games. Players play them in the browser, as a guest or with a Harmony account. The Harmony SDK (@playharmony/sdk) lets a game read who is playing and their friends, control the Harmony overlay, show file dialogs, and create website invitations carrying a lobby code.
Most games don't need the SDK. A game with no SDK and no Game ID uploads and plays on Harmony as it is, and its players still get the overlay, sign-in, friends and chat. Add the SDK only when the game itself uses one of the features below.
The SDK is in preview. Harmony adds calls and options often during the preview, and keeps each update compatible with existing games where it can, but an update may still change or remove a call the game uses. Install the latest version and keep it up to date, and use only the calls sdk.md documents. Check each call against references/api.md before you use it.
Harmony publishes the SDK docs for agents as plain Markdown at https://playharmony.ai/developers/sdk.md. Read it when you can reach it, and where the two differ, follow it. Don't fetch https://playharmony.ai/developers/sdk for this, since that page is drawn by JavaScript and a plain fetch returns an empty shell.
Decide whether the game needs the SDK
Harmony adds its overlay to every game it hosts, with no code. Players already get:
- sign-in with a Harmony account, or play as a guest
- their friends, who is online and what they are playing
- chat with friends while they play
- the overlay, which opens over the game with Shift+Tab