Update Agent.cpp