A credit agreement is a legally binding contract between a lender and a borrower that outlines the terms under which credit will be extended. It includes details such as interest rates, repayment schedules, and covenants, ensuring both parties understand their rights and obligations.