if (!isAgentStartedHere) {
return;
}
// Determine whether the agent is at home.
final AgentopiaAgentState agentState = agent.getAgentState();
final boolean isAgentReturned = AgentopiaAgentState.AGENT_STATE_HOME == agentState;
if (!isAgentReturned) {
return;
}