Autonomous AI Agents: Architecture and Implementation