List<Agent> searchAgents(String query) { return _agents.where((agent) => agent.name?.toLowerCase().contains(query.toLowerCase())??false).toList(); }