A Component-Oriented Framework for Autonomous Agents