Update agent.py

Updated record_log_activity()