Agent Function In Artificial Intelligence