Need help in designing a modular game AI system

Godot Version

4.7.2 Stable

Question

Soo I am making a game AI system and wanted to make it pretty modular. I wanted to use an approach where the world is the “smart” part and the NPC is generally dumb.

For example: a shop in the level will hold the logic about how to interact with it and NPC, in theory, should only follow the shop’s logic, like queuing up at the cashier and when to interact with the cashier etc..

Because I plan to have a lot of these points of interest (POIs) which will have different logic it doesn’t make sense to me to make a Behavior Tree that will encompass all the possible cases, it makes more sense the logic is on the object it’s trying to interact with.

Now the actual question, how does one achieve this? I am using LimboAI for behavior trees, should I have a generic behavior tree for the NPC and then when the NPC decides to interact with some POI, have the POI replace the NPC’s behavior tree with its own custom one and upon leaving the interaction replace it back to a normal one? Is that a smart way to go about it and are there any other, better, solutions out there?