Building Autonomous Intelligence: A Modular Framework for Grounded and Stateful AI Systems | Synapse