updated AgentClient