Exhibit 23.1 CONSENT OF ERNST & YOUNG LLP, INDEPENDENT AUDITORS We consent to the incorporation by reference in the Registration Statements (Form S-8 No.'s 333-32854 and 333-41394) pertaining to the eGain Communications Corporation Amended and Restated 1998 Stock Plan, the Social Science, Inc. 1997 Stock Option Plan, the Big Science Corporation 1999 Stock Incentive Plan, the eGain Communications Corporation 1999 Employee Stock Purchase Plan, the Amended and Restated Inference Corporation 1993 Stock Option Plan, the Inference Corporation 1998 Non-Management Stock Option Plan, the Inference Corporation 1998 New Hire Stock Option Plan, the Inference Corporation Charles W. Jepson Stock Option Plan, the Inference Corporation Private Placement Stock Option Plan, and the Inference Corporation Fourth Amended and Restated Incentive Stock Option Plan and Nonqualified Stock Option Plan and (Form S-3 No. 333-48314) pertaining to 22,373,370 Shares of Common Stock and the related Prospectus of our report dated July 24, 2001, with respect to the consolidated financial statements of eGain Communications Corporation included in the Annual Report (Form 10-K) for the year ended June 30, 2001. /s/ Ernst & Young LLP Palo Alto, California September 27, 2001