Develop an agent framework specifically optimized for safety-first and multi-modal RAG flows. The framework should act as a middle layer that handles complex reasoning paths for edge deployment.