<PAGE>


                                                                  EXHIBIT 10.4


                       FIRST AMENDMENT TO CREDIT AGREEMENT


        This First Amendment to Credit Agreement (the "Amendment"), dated as of
March 31, 2000, is between PRI AUTOMATION, INC. (the "Borrower"), and THE CHASE
MANHATTAN BANK (the "Bank").

        WHEREAS, the Borrower and the Bank are parties to a Revolving Credit
Agreement dated as of June 16, 1998 (the "Credit Agreement"); and

        WHEREAS, the Borrower and the Bank desire to amend the Credit Agreement
to provide for, among other items, an extension of the Expiration Date.

        NOW, THEREFORE, in consideration of the premises herein contained, and
for other good and valuable consideration, receipt of which is acknowledged, it
is hereby agreed as follows:

        SECTION 1. DEFINITIONS. Terms used but not otherwise defined herein
shall have the respective meanings ascribed to such terms in the Credit
Agreement.

        SECTION 2. AMENDMENT. The Credit Agreement is amended as follows:

                (a) The definition of "Expiration Date", contained in Part 1 of
the Credit Agreement, Definitions, is superseded and replaced in its entirety,
and amended to read:

                  "Expiration Date" means December 31, 2000.

                (b) Section 8.18 of the Credit Agreement, FINANCIAL COVENANTS,
subsection (b), is superseded and replaced in its entirety, and amended to read:

                8.18 FINANCIAL COVENANTS. Measured as of the end of each fiscal
quarter, Borrower will not

                (b) Permit Consolidated Net Worth to be at any time less than
the sum of (i) Consolidated Net Worth as of March 31, 2000, plus (ii) fifty
percent (50%) of positive Consolidated Net Income for the fiscal quarter then
ended, plus (iii) one hundred percent (100%) of the increase in Consolidated Net
Worth for the current fiscal year resulting from the issuance of equity
securities in such fiscal year.

        SECTION 3. REPRESENTATIONS. The Borrower hereby represents and warrants
to the Bank that: (i) the covenants, representations and warranties set forth in
the Credit Agreement are true and correct on and as of the date hereof as if
made on and as of said date and as if each reference therein to the Credit
Agreement were a reference to the Credit Agreement as amended by this Amendment;
(ii) no Event of Default specified in the Credit Agreement and no event, which,
with the giving of notice or lapse of time or both, would become such an Event
of Default has occurred and is continuing; (iii) since the date of the Credit
Agreement, there has been no material adverse change in the financial condition
or business operations of the Borrower which has not been disclosed to Bank; and
(iv) the making and


<PAGE>


performance by the Borrower of this Amendment have been duly authorized by all
necessary corporate action.

     SECTION 4. CONDITIONS. The amendment to the Credit Agreement set forth in
Section 2 above shall become effective on the date first above written provided
that the Bank shall have received, in form and substance satisfactory to the
Bank, (i) a counterpart of this Amendment duly executed and delivered by the
Borrower, and (ii) the payment of an amendment fee in the amount of $5,000.

        SECTION 5. MISCELLANEOUS. Except as expressly provided in this
Amendment, the Credit Agreement shall remain unchanged and in full force and
effect except that each reference therein and in the Note to "this Agreement",
"hereof", "herein" and similar terms referring to the Credit Agreement shall be
deemed to refer to the Credit Agreement as amended hereby. This Amendment (i)
shall be deemed to be effective on and as of the date first above written, (ii)
shall be governed by and construed in accordance with the laws of the State of
New York, and (iii) may be executed in counterparts, which taken together shall
constitute one and the same instrument and either of the parties hereto may
execute this Amendment by signing any such counterpart. Should any terms or
provisions of the Agreement conflict with the terms and provisions contained in
this Amendment, the terms and provisions of this Amendment shall prevail.


IN WITNESS WHEREOF, the parties hereto, by their officers thereunto duly
authorized, have executed this Amendment as of the day and year first above
written.


THE CHASE MANHATTAN BANK                PRI AUTOMATION, INC.

By:  /s/ Joan Considine                By: /s/ Cosmo S. Trapani
     -------------------------------       -----------------------------------
Its: Vice President                    Title: Vice President, Chief
     -------------------------------          Financial Officer
                                              --------------------------------