<PAGE>

                                                                    EXHIBIT 10.2

                       AGREEMENT FOR TERMINATION OF LEASE


      THIS AGREEMENT FOR TERMINATION OF LEASE (the "Agreement") is made as of
August 12, 1999, by and between THE PRUDENTIAL INSURANCE COMPANY OF AMERICA, a
New Jersey corporation ("Landlord"), and PERITUS SOFTWARE SERVICES, INC., a
Massachusetts corporation ("Tenant").

                              WITNESSETH:

      WHEREAS, Landlord and Tenant entered into that certain Office Space Lease
dated January 20, 1998 (the "Lease") pertaining to certain premises in the
building commonly known as 750 Warrenville Road, Lisle, Illinois; and

      WHEREAS, Landlord and Tenant have decided that it is in their mutual best
interest to cancel and terminate the Lease and it is the intention of Landlord
and Tenant to effect the cancellation of the Lease by this instrument.

      NOW, THEREFORE, in consideration of the covenants and agreements
hereinafter contained, and of the mutual release by the parties and surrender by
Tenant of the Lease and all of its rights therein and thereunder and all of its
rights in and to the Premises (as defined in the Lease) and of the payment to
Landlord by Tenant of the sum of One Hundred Thousand and No/100 Dollars
($100,000.00) concurrently herewith, and for other good and valuable
consideration, the receipt and sufficiency of which are hereby acknowledged, the
parties hereto agree and warrant as follows:

      1. From and after August 15, 1999 (the "Termination Date"), Tenant hereby
remises, releases, quitclaims and surrenders to Landlord, its successors and
assigns, forever, the Lease and all rights of Tenant in and to the Premises,
however acquired, together with all of its right and interest (and title, if
any) in and to any and all improvements, equipment and fixtures therein
contained, and all of the estate and rights of Tenant in and to the Lease, to
have and to hold the same unto Landlord, its successors and assigns, forever,
from and after the Termination Date.

      2. Landlord and Tenant agree that the Lease is to be canceled and
terminated and the term thereby demised brought to an end as of the Termination
Date with the same force and effect as if the term of the Lease were in and by
the provisions thereof fixed to expire on the Termination Date. Without limiting
the generality of the foregoing, Tenant agrees to quit and surrender to Landlord
the Premises in accordance with the requirements of Section 15 of the Lease and
that Landlord shall have the right to re-enter upon the Premises as of the
Termination Date, as fully as it would or could have done if that were the date
provided for as the expiration date of the term of the Lease. Landlord and
Tenant agree that the payment to Landlord by Tenant of the sum of
<PAGE>

$100,000.00 described above is in full settlement of all Base Rent and
Adjustment Rent due under the Lease.

      3. Tenant, for itself and its successors and assigns, hereby forever
releases and discharges Landlord from any and all claims, demands or causes of
action whatsoever against Landlord, its successors and assigns, arising out of
the Lease after the Termination Date. Landlord, for itself and its successors
and assigns, hereby forever releases and discharges Tenant from any and all
claims, demands or causes of action whatsoever against Tenant, its successors
and assigns, arising out of the Lease after the Termination Date. The foregoing,
however, shall not be deemed a release or waiver by either Landlord or Tenant of
any of the other party's obligations under this Agreement.

      4. Tenant hereby warrants to Landlord that:

            (a) It is the legal and equitable owner of the lessee's interest in
      the Lease with full power and authority to terminate same.

            (b) The Lease is not and has not been subleased, assigned or
      transferred and is not and has not been hypothecated, pledged, mortgaged
      or in any other way encumbered.

            (c) Neither it nor any of its predecessors in interest under the
      Lease has done or suffered to be done anything whereby the Premises and/or
      Landlord's title thereto are in any manner encumbered or charged.

            (d) All charges for utility service (gas, water, electricity, etc.)
      which Tenant is responsible for have been paid in full through the
      Termination Date, except, however, for telephone charges, which Tenant
      shall timely and fully pay if and when due.

            (e) There are no outstanding contracts for the supply of labor or
      material as of the date hereof, and no work has been done or is being done
      nor have materials been delivered in, about or to the Premises which has
      or have not been fully paid for, for which a mechanics' lien could be
      asserted and/or foreclosed under the lien laws of the state in which the
      Premises are located.

      5. This Agreement shall be binding upon and inure to the benefit of the
parties hereto and their respective heirs, successors and assigns.

      6. Notwithstanding anything contained herein or in the Lease to the
contrary, Tenant agrees that Landlord shall have the right to retain the
security deposit being held by Landlord under the Lease and that same shall be
deemed fully earned and non-refundable.
<PAGE>

      IN WITNESS WHEREOF, the parties hereto have caused this Agreement to be
executed the day and year first above written.

                                    THE PRUDENTIAL INSURANCE COMPANY
                                    OF AMERICA, a New Jersey corporation

                                    By: GRUBB & ELLIS MANAGEMENT
                                        SERVICES, INC., a Delaware corporation,
                                        its duly authorized agent


                                        By: /s/ [Illegible]
                                            --------------------------
                                           Name: [Illegible]
                                                 ---------------------
                                           Its: Vice President
                                                ----------------------


                                    TENANT:

                                    PERITUS SOFTWARE SERVICES, INC.,
                                    a Massachusetts corporation


                                    By: /s/ John Giordano
                                        ---------------------------------
                                        Name: John Giordano
                                              ---------------------------
                                        Its: President & CEO
                                             ----------------------------