There is a pull request on how a new extern was added to behavioral-model before here: Demonstration of adding a new extern to BMv2 / behavioral-model
Note: I make no claim that this is a hold-your-hands step-by-step tutorial. It is a working example of a feature added to behavioral-model, though.