AN AGENT-ORIENTED APPROACH FOR AMBIENT INTELLIGENCE