My terminology may be wrong here- but how can I create and use a class-type variable in KM, with dynamic updating of the instances' objects, and ability for KM to use values from those objects?
So for example if a project in a program has a tag, can that tag be fed into KM and associated aspects of that project (encoded as KM variables) be populated and updated as necessary while working through the project?
Others may differ, but my first reaction would be that
All KM variable are, in the last analysis, strings, and
the best place to achieve the type-level complexities you describe would probably be in KM Execute Script actions (written in JS, AppleScript, or perhaps something else like Python, if you are more familiar with it)
As @ComplexPoint says, KM Variables have only one type: string
They are simple scalar string variables.
However, KM Dictionaries may provide what you need -- I'm not sure as I don't understand enough about your use case.
KM Dictionaries work much like JavaScript objects, but, IMO, they are much harder to use. Depending on what you want to do with the data you have entered, you may be better off using JavaScript for Automation (JXA).