**Exhibit 10.5****AMENDED AND RESTATED EXECUTIVE AGREEMENT**     **THIS AMENDED AND RESTATED EXECUTIVE AGREEMENT**(this “Agreement”) is made effective as of the21st day of December, 2006, by and between webMethods, Inc., a Delaware corporation (the“Company”), and David L. Mitchell (the “Executive”).     **WHEREAS**, the Executive is presently employed by the Company;     **WHEREAS**, the Board of Directors of the Company (the “Board”), acting through its CompensationCommittee, recognizes that the Executive’s contribution to the growth and success of the Companyhas been and continues to be substantial;     **WHEREAS**, the Board desires to provide for certain arrangements in the event that theExecutive’s employment with the Company is terminated under certain circumstances; and     **WHEREAS**, the Company and the Executive desire to enter into this Agreement on the terms andconditions set forth below.     **NOW, THEREFORE**, in consideration of the promises and the respective covenants and agreementsof the parties herein contained, and of the continued employment of the Executive by the Company,the parties hereto, intending to be legally bound, do hereby agree as follows:     1. Definitions. For purposes of this Agreement:          (a) “Cause” shall mean the Executive’s (i) theft, fraud, material dishonesty or grossnegligence in the conduct of the Company’s business, (ii) continuing neglect of the Executive’sduties and responsibilities that has a material adverse effect on the Company (which neglect is notcured within fifteen (15) days after receipt of written notice by the Executive specifying theparticulars of such neglect), or (iii) conviction of a felony (not involving an automobile). Forpurposes of this Agreement, any purported termination of the Executive’s employment shall bepresumed to be other than for Cause, unless the Notice of Termination includes a copy of aresolution duly adopted by the Board which finds Cause to exist and specifies the particularsthereof in detail.          (b) “Good Reason” shall mean (i) a decrease in the Executive’s base salary, (ii) a materialreduction or material adverse change in the Executive’s authorities, duties or job responsibilities(which material reduction or material adverse change is not cured within fifteen (15) days afterwritten notice by the Executive specifying the particulars of such reduction or change in suchauthorities, duties or job responsibilities, the notice of which is given to the Company withinfifteen (15) days of such reduction or change), or (iii) a geographic relocation of the Executivewithout the Executive’s consent more than thirty (30) miles from the current location of theExecutive’s office as of the date hereof.
 

 
          (c) A “Change in Control” shall be deemed to have occurred if (A) any person (as such term isused in Sections 13(d) and 14(d) of the Securities Exchange Act of 1934, as amended (the “ExchangeAct”), is or becomes the “beneficial owner” (as defined in Rule 13d-3 under the Exchange Act),directly or indirectly, of securities of the Company representing fifty percent (50%) or more ofthe combined voting power of the Company’s then outstanding securities, (B) during any period oftwo (2) consecutive years during the term of this Agreement, individuals who at the beginning ofsuch period constitute the Board cease for any reason to constitute at least a majority thereof,unless the election of each director who was not a director at the beginning of such period hasbeen approved in advance by directors representing at least two-thirds of the directors then inoffice who were directors at the beginning of the period, (C) the shareholders of the Companyapprove a merger or consolidation involving the Company that would result in a change of ownershipof a majority of the outstanding shares of capital stock of the Company, or (D) the shareholders ofthe Company approve a plan of liquidation or dissolution of the Company or the sale or dispositionby the Company of all or substantially all the Company’s assets.          (d) The “Date of Termination” with respect to any purported termination of the Executive’semployment means the date specified as such in the Notice of Termination. In the case oftermination of the Executive’s employment (i) by the Company for Cause or (ii) by the Executive forany reason, the Date of Termination shall be a date not less than seven (7) days from the date theNotice of Termination is given. In the case of termination of the Executive’s employment by theCompany without Cause, the Date of Termination shall be a date not less than thirty (30) days fromthe date the Notice of Termination is given.          (e) “Notice of Termination” means a written notice of termination of employment by theterminating party, which notice shall specify a Date of Termination and the particular facts andcircumstances of such termination, including the existence of Cause or Good Reason.     2. Termination of Employment.          (a) The Executive’s employment may be terminated at any time by the Company, with or withoutCause, by delivery of a Notice of Termination to the Executive. The Executive’s employment may beterminated at any time by the Executive, without Good Reason, by delivery of a Notice ofTermination to the Company. The Executive’s employment may be terminated by the Executive for GoodReason, by delivery of a Notice of Termination to the Company within thirty (30) days of the lateroccurrence of the event constituting Good Reason or the termination of the Corporation’s cureperiod, if any, with respect to the event constituting Good Reason.          (b) In the event the Company terminates the Executive’s employment without Cause, or in theevent the Executive terminates the Executive’s employment for Good Reason, then the Company shall,subject to Section 7 hereof, pay the Executive’s base salary through the date of such terminationand shall continue to pay to the Executive the Executive’s monthly base salary, and shalladminister and pay for the Executive’s life, disability, accident and health insurance benefitssubstantially similar to those which Executive is receiving immediately prior to the Notice ofTermination, until the first anniversary of the Date of Termination; provided,
- 2 -

 
however, that the Company’s obligations under this Section 2(b) shall cease upon theExecutive’s commencement of full-time employment with another employer. Notwithstanding theforegoing, (i) the Company’s obligations under this Section 2(b), if any, shall be contingent uponthe Executive executing a general release of claims in favor of the Company, and its officers,directors and affiliates, in a form provided by the Company, and (ii) in the event Executive’stermination of employment falls within one (1) year after the consummation of a Change in Control,the Company shall have no obligation under this Section 2(b).          (c) If there is a Change in Control of the Company or there has been a public announcement ofa Change in Control of the Company (provided, however, that consummation of theChange in Control of the Company shall be a condition precedent to the effectiveness of thisprovision) and at any time within one (1) year after the consummation of a Change in Control (i)the Company terminates the Executive’s employment without Cause, or (ii) the Executive terminatesthe Executive’s employment for Good Reason, then the Company (x) shall pay the Executive’s basesalary through the Date of Termination, (y) shall pay to the Executive, in a lump sum in cashwithin ten (10) business days after the Date of Termination, an amount equal to one and one half (11/2) times the sum of (A) the Executive’s base salary in effect immediately prior to theoccurrence of the circumstance giving rise to the Notice of Termination given in respect thereofand (B) the maximum bonus or incentive compensation amount for which the Executive is eligible tobe awarded pursuant to any bonus or incentive compensation plan, calculated based upon the bonusperiod in which the Date of Termination occurs and annualized to the extent that such bonus perioddoes not reflect a twelve (12) month period and (C) for an eighteen (18) month period after theDate of Termination, the Company shall administer and pay for the Executive’s life, disability,accident and health insurance benefits substantially similar to those which Executive is receivingimmediately prior to the Notice of Termination. The Company’s obligations under this Section 2(c),if any, shall be contingent upon the Executive executing a general release of all claims in favorof the Company, and its officers, directors and affiliates, in a form provided by the Company.          (d) In the event of the death of the Executive, this Agreement shall terminate, and shall beof no further force or effect; provided, however, that notwithstanding theforegoing, the death of the Executive shall not in any way affect any payment obligations of theCompany pursuant to Section 2(b) or Section 2(c) hereof which exist at the time of such death.     3. Successors; Binding Agreement. This Agreement and all rights of the Executivehereunder shall inure to the benefit of and be enforceable by the Executive’s personal or legalrepresentatives, executors, administrators, successors, heirs, distributees, devisees and legatees.If the Executive should die while any amounts would still be payable to the Executive hereunder ifthe Executive had continued to live, all such amounts, unless otherwise provided herein, shall bepaid in accordance with the terms of this Agreement to the Executive’s devisee, legatee, or otherdesignee or, if there be no such designee, to the Executive’s estate.     4. Notice. For the purposes of this Agreement, notices, demands and all othercommunications provided for in this Agreement shall be in writing and shall be deemed to have beenduly given when delivered by hand delivery or via reputable overnight delivery service, or (unlessotherwise specified) mailed by United States registered mail, return receipt requested, postageprepaid, addressed, if to the Executive, to the Executive’s home address as it appears on
- 3 -

 
the records of the Company, and if to the Company, to the Company’s executive headquarters, orto such other address as either party may have furnished to the other in writing in accordanceherewith, except that notices of change of address shall be effective only upon receipt.     5. Prior Agreement. All prior agreements between the Company and the Executive withrespect to the subject matter hereof (except for stock option agreements), including withoutlimitation the Executive Agreement, dated as of March 9, 2004, by and between the Company and theExecutive, are hereby superseded and terminated effective as of the date hereof and shall bewithout further force or effect. This Agreement is intended to be, and shall be, a completeintegration of all prior agreements and discussions between the Company and the Executive withrespect to the subject matter hereof (except as set forth in stock option agreements between theCompany and the Executive).     6. Employment of Executive. Nothing in this Agreement shall be construed asconstituting a commitment, guarantee, agreement or understanding of any kind or nature that theCompany shall continue to employ the Executive, nor shall this Agreement affect in any way theright of the Company to terminate the employment of the Executive at any time and for any reason.By the Executive’s execution of this Agreement, the Executive acknowledges and agrees that theExecutive’s employment is “at will.” No change of the Executive’s duties as an employee of theCompany shall result in, or be deemed to be, a modification of any of the terms of this Agreement.     7. Gross-Up for Excess Parachute Payments. In the event of a Change in Control, orother event constituting a change in the ownership or effective control of the Company or ownershipof a substantial portion of the assets of the Company described in Section 280G(b)(2)(A)(i) of theUnited States Internal Revenue Code of 1986, as amended (the “Code”), the Company, at its soleexpense, shall cause its independent auditors promptly to review all payments, accelerations,distributions and benefits that have been made to or provided to, and are to be made, or may bemade, to or provided to, the Executive under this Agreement, and any other agreement or planbenefiting the Executive (collectively the “Original Payments”), to determine the applicability ofSection 4999 of the Code to the Executive in connection with such event (other than under thisSection 7). If the Company’s independent auditors determine that the Original Payments are subjectto excise taxes under Section 4999 of the Code (the “Excise Tax”), then an additional amount shallbe paid to the Executive (the “Gross-Up Amount”) such that the net proceeds of the Gross-Up Amountto the Executive, after deduction of the Excise Tax (including interest and penalties) and anyfederal, state and local income taxes and employment taxes (including interest and penalties) butbefore deduction of any interest or additional tax under Sections 409A(a)(1)(B) or 409A(b)(5) ofthe Code (and any penalties related to such interest or additional taxes) (the “409A Taxes”) uponthe Gross-Up Amount, shall be equal to the Excise Tax on the Original Payments. The Company’sindependent auditors will perform the calculations in conformity with the foregoing provisions andwill provide the Executive with a copy of their calculations. The intent of the parties is thatthe Company shall be solely responsible for, and shall pay, any Excise Tax on the OriginalPayment(s) and Gross-Up Amount and any income and employment taxes other than the 409A Taxes (butincluding, without limitation, other penalties and interest on such income and employment taxes)imposed on any Gross-Up Amount payable hereunder. If no determination by the Company’s independentauditors is made prior to the time the Executive is required to file a tax return
- 4 -

 
reflecting Excise Taxes on any portion of the Original Payment(s), the Executive will beentitled to receive a Gross-Up Amount calculated on the basis of the Excise Tax that the Executivereports in such tax return, within thirty (30) days after the filing of such tax return. TheExecutive agrees that, for the purposes of the foregoing sentence, the Executive is not required tofile a tax return until the Executive has obtained the maximum number and length of filingextensions available, and Executive shall have provided a copy of the relevant portions of such taxreturn to the Company not less than ten (10) days prior to filing such tax return. If any taxauthority finally determines that a greater Excise Tax should be imposed upon the Original Paymentsor the Gross-Up Amount than is determined by the Company’s independent auditors or reflected in theExecutive’s tax returns, the Executive shall be entitled to receive an additional Gross-Up Amountcalculated on the basis of the additional amount of Excise Tax determined to be payable by such taxauthority (including related penalties and interest) from the Company within thirty (30) days aftersuch determination. The Executive shall cooperate with the Company as it may reasonably request topermit the Company (at its sole expense) to contest the determination of such taxing authority tominimize the amount payable under this Section 7. If any tax authority finally determines theExcise Tax payable by the Executive to be less than the amount taken into account hereunder incalculating the Gross-Up Amount, the Executive shall repay the Company, within thirty (30) daysafter the Executive’s receipt of a tax refund resulting from that determination, to the extent ofsuch refund, the portion of the Gross-Up Amount attributable to such reduction (including therefunded portion of Gross-Up Amount attributable to the Excise Tax and federal, state and localincome and employment taxes imposed on the Gross-Up Amount being repaid, less any additional incometax resulting from receipt of such refund).     8. No Mitigation. The Company agrees that, if the Executive’s employment isterminated during the term of this Agreement, the Executive is not required to seek otheremployment or to attempt in any way to reduce any amounts payable to the Executive by the Company.Further, the amount of any payment provided hereunder shall not be reduced by any compensationearned by the Executive.     9. Miscellaneous. No provisions of this Agreement may be modified, waived ordischarged unless such waiver, modification or discharge is agreed to in writing signed by theExecutive and a duly authorized officer of the Company. No waiver by either party hereto at anytime of any breach by the other hereto of, or compliance with, any condition or provision of thisAgreement to be performed by such other party shall be deemed a waiver of similar or dissimilarprovisions or conditions at the same or at any prior or subsequent time. No agreements orrepresentations, oral or otherwise, express or implied, with respect to the subject matter hereofhave been made by either party which are not set forth expressly in this Agreement. The validity,interpretation, construction and performance of this Agreement shall be governed by the laws of theCommonwealth of Virginia, without regard to provisions thereof relating to choice of law orconflicts of law. This Agreement may be executed in two or more counterparts, each of which shallbe deemed an original, but all of which together shall constitute one and the same instrument.This Agreement may be executed by facsimile signatures.     10. Validity. The invalidity or unenforceability of any provision or provisions ofthis Agreement shall not affect the validity or enforceability of any other provision of thisAgreement, which shall remain in full force and effect.
- 5 -

 
     11. Section 409A Compliance. Notwithstanding anything in this Agreement or any otheragreements between the Company and the Executive (“Other Agreements”) to the contrary, if, based onInternal Revenue Service guidance available as of the date the payment or provision of any amountor other benefit is required to be made under this Agreement (including, but not limited to, anypayment, accelerated vesting or benefit continuation right, Gross-Up Amount under Section 7 hereofor Counsel Fees under Section 8 hereof) or under any Other Agreements, (a) the Company reasonablydetermines that the payment or provision of such amount or other benefit at the time specified insuch agreements may subject the Executive to 409A Taxes “additional tax” and “interest” underSection 409A(a)(1)(B) of the Code (together with any interest or penalties imposed with respect to,or in connection with, such tax, the “409A Taxes”), because the Executive is a “specified employee”within the meaning of Section 409A(a)(2)(B)(i) of the Code or otherwise, and (b) payment of suchamount (or portion of such amount) or provision of such benefit (or portion of such benefit) at alater date would likely avoid any such 409A Taxes, then the payment or provision thereof shall bepostponed to the earliest business day on which the Company reasonably determines such amount orbenefit can be paid or provided without incurring any such 409A Taxes, but in no event later thanthe first business day after the six-month anniversary of the Executive’s severance from servicewithin the meaning of Section 409A(a)(2) of the Code (the “Delayed Payment Date”). In the event abenefit is to be provided during the period commencing on the Executive’s separation from serviceand ending on the Delayed Payment Date and the provision of such benefit during that period wouldbe treated as a payment of nonqualified deferred compensation in violation of Section409A(a)(2)(B)(i) of the Code, then continuation of such benefit during that period shall beconditioned on payment by the Executive of the full premium or other cost of coverage and as of theDelayed Payment Date the Company shall reimburse the Executive for the premiums or other cost ofcoverage paid by the Executive, which but for this paragraph would have been paid by the Company.On the Delayed Payment Date the Executive shall receive in a lump sum all payments which weredelayed and all remaining payments shall commence to be paid in accordance with the terms of thisAgreement or the Other Agreement. The Company and the Executive may agree to take other actions toavoid the imposition of 409A Taxes at such time and in such manner as permitted under Section 409Aof the Code. In addition, in the event that any amount or other benefit which is required to bemade under this Agreement is treated as a payment under a nonqualified deferred compensation planwithin the meaning of Section 409A of the Code, no acceleration of payment shall be made if suchacceleration of payment would result in imposition of 409A Taxes. The Company shall have noliability to the Executive for 409A Taxes (or any loss incident to the imposition of such taxes) inthe event that Executive is determined to be liable for 409A Taxes in connection with any paymentor provision of any amount or other benefit under this Agreement or Other Agreements.**[Signatures appear on following page.]**
- 6 -

 
     **IN WITNESS WHEREOF**, the parties have executed this Executive Agreement on the date and yearfirst above written.       WEBMETHODS, INC., a Delaware corporation       By: /s/ Douglas McNitt       Name: Douglas McNitt       Title:  Executive Vice President            EXECUTIVE:        /s/ David Mitchell         David L. Mitchell