
Cognex Corporation One Vision Drive Natick, MA 01760-2059 (508) 650-3000 fax (508) 650-3333 www.cognex.com Exhibit 10.1 March 27, 2024 Dennis Fehr [Address] PERSONAL & CONFIDENTIAL Dear Dennis: Congratulations on your new position! All of us on the Cognex management team are excited about the prospect of you joining Cognex Corporation in Natick, Massachusetts. This letter details the terms and conditions applicable to your move from Bethesda, Maryland to Massachusetts. This letter does not create a contract of employment, but simply seeks to confirm the conditions which pertain to your relocation. Your targeted start date is subject to our receipt from you of a signed copy of this letter, and the other contingencies set out in your offer letter. Once finalized, you will be considered an “at will” employee of Cognex Corporation. Position: Senior Vice President of Finance Effective Date: April 22, 2024 You will report to: Rob Willett Location: Natick, Massachusetts Relocation Support Aires: We have contracted with Aires: Corporation Relocation Services to provide you with a seamless integration into your new position in Natick, Massachusetts. You will be connected with a dedicated individual from Aires who will be your contact throughout your relocation. Specifically, you will be provided with a relocation allowance of up to USD $60,000 (net) to be put towards the following relocation benefits: • Home Finding Trip: This will be for you and your spouse and will include an orientation and home search guidance through a destination provider. • Temporary Lodging: Cognex will reimburse temporary accommodations for a period of up to 90 days for you and your family. • Shipment of Household Goods: Cognex will assist with the movement of the contents of your current home to the new location. All shipping arrangements are made with and through Aires. • Final Move Expenses: Cognex will reimburse reasonable expenses incurred in moving your family to the new location using the most direct route according to the company travel policy. Home Sale: Cognex will assist with the selling of your home in your old location up to $75,000 (net of all applicable taxes) inclusive of all realtor and transaction costs. All invoices submitted for your relocation budget must be submitted directly to Aires. Please ensure that anything business related is processed through Concur, and anything relocation related is processed through Aires. Please touch base with Thassia Gunn if you have any questions as to where an expense should fall.

Cognex Corporation One Vision Drive Natick, MA 01760-2059 (508) 650-3000 fax (508) 650-3333 www.cognex.com Reimbursement In the event you voluntarily terminate your employment with Cognex prior to October 31, 2028, you will be responsible for the reimbursement of all or a portion of the relocation expenses paid by Cognex in accordance with the Repayment Agreement attached as Exhibit A. Further, in the event you voluntarily terminate your employment with Cognex prior to April 22, 2026, you will be responsible for the reimbursement of all or a portion of your $170,000 guaranteed bonus payment in accordance with the Repayment Agreement attached as Exhibit A. Congratulations Dennis! We look forward to you joining the team as we carry on in our quest for greatness in the world of machine vision. Sincerely, /s/ Rob Willett Rob Willett CEO & President Cognex Corporation Please indicate your agreement to this letter, including your agreement to the attached Repayment Agreement, by signing below and returning this letter as soon as possible. /s/ Dennis Fehr __________________________ Dennis Fehr

Cognex Corporation One Vision Drive Natick, MA 01760-2059 (508) 650-3000 fax (508) 650-3333 www.cognex.com Exhibit A REPAYMENT AGREEMENT Dennis Fehr [Address] As consideration for the relocation benefits of up to $60,000 which Cognex Corporation (“Cognex”) has agreed to pay me, Dennis Fehr, pursuant to this relocation letter, as well as the 2024 $170,000 guaranteed bonus payment which Cognex has agreed to pay me within 30 days of my start date (the “Guaranteed Bonus”), I agree that if I voluntarily terminate my employment prior to October 31, 2027, I will reimburse Cognex for 100% of relocation expenses incurred by Cognex. Additionally, I agree that if I voluntarily terminate my employment after October 31, 2027, but prior to October 31, 2028, I will reimburse Cognex for 50% of the relocation expenses incurred by Cognex. Examples of expenses which must be repaid to Cognex include, but are not limited to, temporary housing, house hunting trips, lump sum payments and actual moving expenses. Further, I agree that if I voluntarily terminate my employment within twelve (12) months of April 22, 2024, I will reimburse Cognex for 100% of the Guaranteed Bonus. I also agree that if I voluntarily terminate my employment anytime within twelve to twenty-four (12-24) months from April 22, 2024, I will reimburse Cognex for 50% of the Guaranteed Bonus. Any reimbursement I owe to Cognex pursuant to this paragraph is to be paid as follows: one-half of the amount(s) owed must be paid on my last day of employment; the balance(s) must be paid no later than 60 days after my last day of employment. If Cognex incurs any costs or expenses, including but not limited to attorneys’ fees, in the collection of this debt, I agree to pay the attorneys’ fees and expenses associated with the collection of this debt. In addition, if I am late in making payments or fail to make any payments under this Agreement, Cognex may, in its sole discretion, make all monies owed immediately due and payable. This Repayment Agreement in no way modifies my status as an at-will employee. I understand that this Repayment Agreement is not to be construed and is not a guarantee that I will continue to be employed for any period of time. I further understand that I can be terminated at any time, with or without cause, at the sole discretion of Cognex.