
Links
Try the demo
Launch the live view experience.
View source on GitHub
Browse the full example code.
Skybridge APIs used
registerTool— a singlestart_gametool that opens the boarduseRegisterViewTool— registerchess_get_board_state,chess_get_legal_moves,chess_make_move, andchess_reset_gamefrom the viewcreateStore— synced match state (position, move log, last move) pushed into the model’s context and surviving remountsuseDisplayMode— pop the board into picture-in-picture when a side is pickeduseCallTool— call server tools from the viewuseSendFollowUpMessage— prompt the assistant to play its moveuseToolInfo— read thestart_gametool output