How to create a checkbox in 2.8 (booleans)

Hi, I’m trying to add a checkbox to my panel but I keep getting

AttributeError: ‘Scene’ object has no attribute “my_tool”

Can someone please help me figure out what I’m doing wrong? I can’t seem to find documentation on how to add checkboxes in 2.8

class MSWRIG_PT_SegmentationPanel(bpy.types.Panel):
"""Panel Creation"""
bl_label = "Segmentation Panel"
bl_idname = "object.mswrig_pt_segmentationpanel"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = "MSW Tools"

my_prop = BoolProperty(
name="Autokey changes",
description="Set keyframe for any parameter change in this panel",
default = True

def draw(self, context):
    layout = self.layout
    view = context.space_data
    scene = context.scene
    mytool = scene.my_tool

    row = layout.row()
    layout.prop(mytool, "my_bool", text="Bool Property")

You need to extend the Scene Type. Move the property definition outside of the Panel class and extend the scene type with something like this:

bpy.types.Scene.my_tool = BoolProperty(name=“My Tool”)

I hope this helps.