<PAGE>
 
                                                                    Exhibit 10.4
                                LOAN AGREEMENT


     THIS LOAN AGREEMENT, dated as of the 30 day of June, 1998, is made by and
between TEMPLATE SOFTWARE, INC., a Virginia corporation, successor by merger to
Template Software, Inc., a Maryland corporation (the "Borrower"), and FIRST
UNION NATIONAL BANK, a national banking association, successor by merger to
Signet Bank, a Virginia banking corporation (the "Lender").

                                   RECITALS

A.   The Lender previously extended credit to the Borrower pursuant to  the
terms and conditions set forth in the First Amended and Restated Loan and
Security Agreement executed between them dated as of October 22, 1996, (as
amended through the date hereof, the "Original Agreement", together with the
other documents defined therein as "Loan Documents", the "Original Loan
Documents").

B.   The Borrower has requested that the Lender agree to certain modifications
to the Original Agreement, including releasing the Collateral (as defined in the
Original Agreement) securing the Obligations, modifying the Termination Date,
and placing the credit in the Sweep Plus program, and the Lender has agreed to
these and other modifications as set forth in this Agreement, provided that such
agreement is contingent upon the complete execution of this Agreement and the
satisfaction of all conditions precedent set forth herein.

C.   The Borrower and the Lender now desire to execute this Agreement to set
forth their agreements with respect to the credit facilities being made
available to the Borrower.

Accordingly, for good and valuable consideration, the receipt and sufficiency of
which are hereby acknowledged, the Lender and the Borrower agree as follows:

     SECTION 1.  Definitions.  Certain terms used in this Agreement are defined
                 -----------                                                   
in this Section 1.  These terms, and the additional terms defined above, shall
have the meanings assigned wherever the terms appear in this Agreement.  These
meanings are also applicable to the singular and plural forms of the terms
defined.

     "Account Receivable" means collectively and includes any of the following,
whether now owned or hereafter acquired by the Borrower:  all present and future
rights to payments for goods sold or leased or for services rendered, whether or
not represented by instruments or chattel paper, and whether or not earned by
performance; all present and future rights to payments arising out of the
licensing of computer software and systems; all accounts, contract rights,
chattel paper, instruments and documents; proceeds of any letter of credit of
which the Borrower is a beneficiary; all forms of obligations whatsoever owed to
the Borrower, together with all instruments and documents of title representing
any of the foregoing; all rights in any returned or repossessed goods; all
rights, security and guaranties with respect to any of the foregoing, including,
without limitation, 
<PAGE>
 
any right of stoppage in transit; together with all property included within the
definitions of "accounts", "chattel paper", "documents" and "instruments" set
forth in the UCC.


     "Affiliate" means, with respect to any specified Person, any other Person
which, directly or indirectly, through one or more intermediaries, controls or
is controlled by, or is under common control with, such specified Person.  The
term "control" means the possession, directly or indirectly, of the power to
direct or cause the direction of management and policies of a Person, whether
through ownership of common stock, by contract, or otherwise.

     "Agreement" means this Loan Agreement, as it may be amended, modified or
supplemented from time to time.

     "Business Day" means any day other than a Saturday, Sunday or other day on
which commercial banks are authorized or required to close under the laws of the
State.

     "Capital Lease" means any lease which has been or should be capitalized on
the books of the lessee in accordance with GAAP.

     "CERCLA" shall mean the Comprehensive Environmental Response, Compensation
and Liability Act of 1980, as amended.

     "Closing" means the date on which the initial disbursement of the Loans is
made.

     "Code" means the Internal Revenue Code of 1986, as amended and in effect
from time to time.

     "Commitment Fee" means the quarterly fee to be paid by the Borrower to the
Lender pursuant to Section 2.5 hereof in consideration of the commitment by the
Lender to make Revolving Loans hereunder.  The Commitment Fee due for each
calendar quarter (or portion thereof) shall equal the product of the Commitment
Fee Rate in effect for such quarter (or portion thereof) multiplied by the
difference between $3,000,000.00 and the sum of (i) the average daily Principal
Amount during such quarter (or applicable portion thereof) plus (ii) the average
daily face amount of all Letters of Credit outstanding during such quarter (or
applicable portion thereof).

     "Commitment Fee Rate" means the rate, expressed as a percentage, calculated
by multiplying 0.25% by a fraction the numerator of which is the number of days
in the calendar quarter, or shorter period, for which the Commitment Fee Rate is
being calculated and the denominator of which is 360.

     "Compliance Certificate" means a certificate of the Borrower substantially
in the form attached hereto as Exhibit A (or such subsequent form as the Lender
shall require) executed by the chief financial officer of the Borrower, the
Treasurer of the Borrower or such other financial officer of the Borrower as is
acceptable to the Lender containing a calculation of the financial covenants set

                                       2
<PAGE>
 
forth in Section 5.12 hereof applicable to the financial statements accompanying
such Compliance Certificate and a certification that no Default or Event of
Default has occurred and is continuing.

     "Current Assets" means, as of a specified date, the assets of the Borrower,
determined on a consolidated basis, that in accordance with GAAP are properly
classified as current assets.

     "Current Liabilities" means, as of a specified date, the liabilities of the
Borrower, determined on a consolidated basis, that in accordance with GAAP are
properly classified as current liabilities.

     "Customer" means any Person obligated on an Account Receivable.

     "Debt" means collectively and includes (a) indebtedness or liability for
borrowed money, or for the deferred purchase price of property or services; (b)
obligations as a lessee under a Capital Lease; (c) obligations to reimburse the
issuer of letters of credit or acceptances; (d) all guaranties, endorsements
(other than for collection or deposit in the ordinary course of business), and
other contingent obligations to purchase, to provide funds for payment, to
supply funds to invest in any Person, or otherwise to assure a creditor against
loss; and (e) obligations secured by any Lien on property owned by the Person,
whether or not the obligations have been assumed.

     "Default" means any event which with the giving of notice, the lapse of
time, or both, would constitute an Event of Default.

     "Default Rate" means, with respect to the Loans, a rate of interest equal
to 3% above the rate of interest otherwise applicable to Loans, and in all other
cases, a rate of interest equal to 3% above the rate of interest otherwise
applicable to Revolving Loans.

     "Employee Benefit Plan" means any employee welfare benefit plan or employee
pension benefit plan, as those terms are defined in Sections 3(1) and 3(2) of
ERISA, for the benefit of employees of the Borrower or any ERISA Affiliate.

     "Environmental Laws" means all federal, state or local laws, rules,
regulations or orders relating to air, water or noise pollution, employee health
and safety, or the production, storage, labeling, transportation or disposition
of waste or hazardous or toxic substances, including, but not limited to CERCLA,
the Toxic Substances Control Act of 1976, as amended, the Resource Conservation
Recovery Act of 1976, as amended, the Clean Air Act, as amended, the Federal
Water Pollution Control Act, as amended, or the Occupational Safety and Health
Act of 1970, as amended.

     "Equipment" means collectively and includes all of the following, whether
now owned or hereafter acquired by the Borrower:  equipment and fixtures,
including, without limitation, computer hardware, computer software and systems,
furniture, machinery, vehicles and trade fixtures, together with any and all
accessories, accessions, parts and appurtenances thereto, substitutions therefor
and replacements thereof, together with all other such items which are included
within the definitions of "equipment" and "fixtures" as set forth in the UCC.

                                       3
<PAGE>
 
     "ERISA" means the Employee Retirement Income Security Act of 1974, as
amended from time to time.

     "ERISA Affiliate" shall mean each trade or business (whether or not
incorporated) which together with the Borrower would be treated as a "single
employer" within the meaning of Code (S)(S) 414(b), (c), (m), (n) or (o).

     "Event of Default" means any of the events specified as an "Event of
Default" under this Agreement, provided that any requirement for the giving of
notice, the lapse of time, or both, or any other condition, has been satisfied.

     "Financial Institution" means any commercial banking corporation, savings
bank or other financial institution.

     "Financial Reporting Month" means a calendar month or such other
substantially equivalent financial reporting period adopted by the Borrower and
approved by the Lender.

     "GAAP" means generally accepted accounting principles consistently applied.

     "Government" means the United States of America or any agency or
instrumentality thereof.

     "Indemnitee" shall mean the Lender, its Affiliates, and its and their
respective directors, officers, employees, agents, successors and assigns.

     "Intellectual Property" shall mean all letters patent, licenses, trade
names, trademarks, copyrights, inventions, service marks, trademark
registrations, service mark registrations and copyright registrations, whether
domestic or foreign and applications for any of the foregoing, and all
proprietary technology, know-how, trade secrets or other intellectual property
rights owned or used by the Borrower or any Subsidiary in the operation of their
respective businesses.

     "Interest Determination Date" means each Business Day of each calendar
month.

     "Interest Payment Date" means the last day of each calendar month.

     "Investment" in any Person shall mean, without duplication:

          (a) the acquisition (whether for cash, property, services or
securities or otherwise) of capital stock, bonds, notes, debentures, partnership
or other ownership interests or other securities of such Person; and

          (b) any deposit with, or advance, loan or other extension of credit
to, such Person or guarantee or assumption of, or other contingent obligation

                                       4
<PAGE>
 
with respect to, Debt such Person, other than loans and advance permitted by
Section 6.8 hereof or guarantees permitted by Section 6.9 hereof; provided,
                                                                  -------- 
however, that the term "Investment" shall not include:
-------                                               

          (i) extension of trade credit and advances to customers and suppliers
and other contractual and trade relationships, requiring repayment within
reasonable commercial periods, to the extent made in the ordinary course of
business consistent with past practice and in accordance with normal industry
practice;

          (ii) investments by the Borrower in any Person in the form, or out of
the net proceeds of the sale (other than to a Subsidiary or employee stock
ownership plan of the Borrower) of, capital stock of the Borrower; and

               (iii)  a merger between the Borrower and another Person in which
the Borrower is the surviving corporation.

     "Letter of Credit" means any letter of credit issued for the benefit of the
Borrower by the Lender, but the inclusion of this definition shall not imply, or
be construed as, a commitment by the Lender to issue any letters of credit.

     "Letter of Credit Exposure" means, at any given date, the available face
amount of outstanding Letters of Credit on such date plus the aggregate amount
of drafts drawn under or purporting to be drawn under Letters of Credit that
have been paid by the Lender and for which the Lender has not been reimbursed as
of such date.

     "LIBO-Based Rate" means the rate per annum determined by the Lender to be
equal to the sum of (a) the applicable LIBOR Market Index Rate plus (b) 1.85%.

     "LIBOR Market Index Rate" means that rate per annum (rounded upwards, if
necessary, to the next higher 1/100%) determined by the Lender on each Interest
Determination Date to be equal to the London Interbank Offered Rate for United
States Dollars quoted by the British Banker's Association as set forth on such
Interest Determination Date on Dow Jones Markets Services (formerly known as
Telerate) page 3750 (or appropriate successor or, if the British Banker's
Association, or its successor, ceases to provide such quotes, a comparable
replacement selected by the Lender) representing the offered rate for deposits
in United States Dollars for one (1) month periods that will be in effect on
such Interest Determination Date (and if such rates are quoted based on the
amount of the deposit, in an amount equal to the Principal Amount on such
Interest Determination Date); provided, however, that such London Interbank
Offered Rate shall be determined by the Lender in its sole discretion and the
resulting LIBOR Market Index Rate shall include any adjustment deemed necessary
by the Lender, in its sole discretion, to reflect the cost of the Lender's
reserve requirements as they exist from time to time.  If more than one such
rate appears on such page or its replacement, the Lender will use the arithmetic
mean of such rates to determine the LIBOR Market Index Rate.   The LIBOR Market
Index Rate is not necessarily the lowest or most favorable rate of interest
charged by the Lender on extensions of credit to debtors.

                                       5
<PAGE>
 
     "License" shall mean any certificate, license, franchise, permit or other
authorization.

     "Lien" means any mortgage, deed of trust, pledge, security interest,
hypothecation, assignment, deposit arrangement, encumbrance, lien (statutory or
other), or preference, priority, or other security agreement, or preferential
arrangement, charge or encumbrance of any kind or nature whatsoever (including,
without limitation, any conditional sale or other title retention agreement, any
financing lease having substantially the same economic effect as any of the
foregoing, and the filing of any financing statement under the UCC or comparable
law of any jurisdiction to evidence any of the foregoing).

     "Loans" means the loans to be made to the Borrower by the Lender pursuant
to this Agreement.

     "Loan Documents" means this Agreement, the Notes, and any other document
now or hereafter executed or delivered in connection with the Obligations in
evidence thereof or as security therefor, including, without limitation, any
guaranty, life insurance assignment, pledge agreement, security agreement, deed
of trust, mortgage, promissory note or subordination agreement.

     "Maturity Date" shall mean October 31, 1999.

     "Maximum Amount" means, at any time, the difference between $3,000,000.00
and the Letter of Credit Exposure at such time.

     "Multiemployer Plan" means a multiemployer plan defined as such in Section
4001(a) (3) of ERISA.

     "Note" means either the Revolving Note or the Term Note, depending upon the
context in which the term is used, and "Notes" means the Revolving Note and the
Term Note.

     "Obligations" means the Loans, the Notes, all indebtedness and obligations
of the Borrower under this Agreement and the other Loan Documents, as well as
all other obligations and indebtedness of the Borrower to the Lender, now
existing or hereafter arising, of every kind and description, whether or not
evidenced by notes or other instruments, and whether such obligations are direct
or indirect, fixed or contingent, liquidated or unliquidated, including, without
limitation, any overdrafts in any deposit account maintained by the Borrower
with the Lender and all obligations of the Borrower with respect to letters of
credit issued by the Lender for the account of the Borrower, including the
Letter of Credit Exposure.

     "Operating Account" means the demand deposit account maintained with the
Lender by the Borrower specified in the Sweep Plus Program Loan Rider as the
"Account."

     "Original Agreement Loans" means "Revolving Loans" outstanding on the date
hereof under the Original Agreement.

                                       6
<PAGE>
 
     "PBGC" means the Pension Benefit Guaranty Corporation or any entity
succeeding to any or all of its functions under ERISA.

     "Person" means an individual, partnership, limited liability partnership,
limited liability company, corporation, business trust, joint stock company,
trust, unincorporated association, joint venture, governmental authority or
other entity of whatever nature.

     "Prime Rate" means the rate of interest established from time to time by
the Lender and announced by the Lender as its prime rate.  The Prime Rate is not
necessarily the lowest or most favorable rate of interest charged by the Lender
on extensions of credit to debtors.

     "Principal Amount" means the aggregate outstanding principal balance of the
Revolving Loans.

     "Proceeding" shall mean any action, suit or proceeding before any Tribunal.

     "Reportable Event" means any of the events described in Section 4043(b) of
ERISA.

     "Regulation U" means Regulation U of the Board of Governors of the Federal
Reserve System (12 C.F.R. (S) 221), as the same may from time to time be
amended, supplemented or superseded.

     "Revolving Facility" means the line of credit established by the Lender for
the benefit of the Borrower in an amount not to exceed the Maximum Amount to be
used by the Borrower only for the purposes specified in Section 2.1 (d).

     "Revolving Loans" means Loans made by the Lender to the Borrower under the
Revolving Facility.

     "Revolving Note" means the promissory note in form and substance acceptable
to the Lender in the original principal amount of $3,000,000.00 (as it may be
amended, modified supplemented or replaced from time to time) evidencing the
obligation of the Borrower to pay the Principal Amount together with interest on
the Principal Amount.

     "State" means the Commonwealth of Virginia.

     "Subsidiary" means a corporation now existing or hereafter formed of which
shares of stock having ordinary voting power to elect a majority of the board of
directors or other managers of such corporation are at the time owned, or the
management of which is otherwise controlled, directly or indirectly through one
or more intermediaries, or both, by the Borrower.

                                       7
<PAGE>
 
     "Sweep Plus Program Loan Rider" means the Sweep Plus Program Loan Rider of
even date herewith between the Borrower and the Lender in the form of Exhibit B
attached hereto, as such rider may be amended, modified or supplemented from
time to time.

     "Tangible Net Worth" means, at any date, all amounts which, in accordance
with GAAP, would be included under stockholders' equity on the consolidating
balance sheet of the Borrower on such date (i.e., the Borrower's separate
stockholders' equity); provided that, in any event, such amounts are to be net
of amounts carried on the books of the Borrower for (a) any write-up in the book
value of any assets resulting from a revaluation thereof subsequent to the date
of this Agreement; (b) treasury stock; (c) unamortized debt discount expense;
(d) any cost of investments in excess of net assets acquired at any time of
acquisition; (e) loans or advances to any Affiliate of the Borrower or
Subsidiary, or directors, officers, employees or shareholders of the Borrower,
any Affiliate of the Borrower, or any Subsidiary; (f) patents, patent
applications, copyrights, trademarks, trade names, good will, research and
development costs, organizational expenses, capitalized software development
costs and other like intangibles; (g) deferred assets, other than prepaid
expenses; and (h) any investments in securities which are not actively traded on
a national securities exchange.

     "Tax Return" shall mean any federal, state and local income, excise,
property and other tax return or report.

     "Term Loan" means the Term Loan made by the Lender to the Borrower under
the Original Agreement in the original principal amount of up to $275,000.00.

     "Term Note" means the Term Note dated October 22, 1996 in the original
principal amount of $275,000.00 (as it has been, or in the future may be,
amended, modified supplemented or replaced) evidencing the obligation of the
Borrower to pay the principal amount of the Term Loan together with interest on
the Term Loan.

     "Termination Date" means June 30, 1999, and any extension or extensions
thereof granted by the Lender in its sole discretion.

     "Tribunal" means any federal, state, municipal, foreign, territorial, or
other court, arbitration panel or governmental body, subdivision, agency,
department, commission, board, bureau or instrumentality having jurisdiction
over the matter concerned.

     "UCC" means the Uniform Commercial Code as adopted in the State and all
amendments thereto.

                                       8
<PAGE>
 
     SECTION 2.  Loans.
                 ----- 

     2.1.  Revolving Facility Amount and Borrowing Procedure.
           ------------------------------------------------- 

     (a) Subject to the terms and conditions of this Agreement, the Lender
agrees to make Revolving Loans to the Borrower from time to time until the
Termination Date unless, after giving effect to any such Revolving Loan (i) the
Principal Amount would exceed the Maximum Amount or (ii) the Borrower then has,
or as a result of such Revolving Loan would have, an obligation to prepay any
Loan; provided, however that, for the purposes of all such calculations,
Revolving Loans to be repaid by Revolving Loans to be advanced on such date
shall be excluded from the Principal Amount.  Subject to the foregoing
limitations, the Borrower may borrow, repay without penalty and re-borrow
hereunder from the date hereof until the Termination Date.  The obligation of
the Borrower to repay the Revolving Loans, together with interest thereon, shall
be evidenced by the Revolving Note.  The unpaid principal balance of the
Revolving Note shall be payable on the Termination Date, subject to
acceleration, termination or prepayment under the terms of this Agreement.

     (b)                     [Reserved]

     (c) If the Principal Amount exceeds the Maximum Amount, the Borrower shall
immediately prepay the Revolving Loans to the extent  necessary to reduce such
excess.

     (d) Effective as of the date of this Agreement, all Original Agreement
Loans shall become Revolving Loans under this Agreement.  Except as provided by
the preceding sentence, the proceeds of the Revolving Loans shall be used for
business or commercial purposes and for no other purpose.

     (e) Revolving Loans shall be made automatically in accordance with the
provisions of the Sweep Plus Program Loan Rider; provided, however, that the
Lender shall have no obligation to make such Revolving Loans if, after the
disbursement thereof, (i) the Principal Amount would exceed the Maximum Amount
or (ii) the Borrower has, or as a result of such Revolving Loan would have, an
obligation to prepay any Loan; provided, however that, for the purposes of all
such calculations, Revolving Loans to be repaid by Revolving Loans to be
advanced on such date shall be excluded from the Principal Amount.  In addition,
the Borrower may request that a Revolving Loan be made.  Any request for a
Revolving Loan must be received by the Lender not later than 1:00 p.m.
(Washington, D.C. time) on the date on which the Revolving Loan is to be made.
Each request must specify the amount of the Revolving Loan.  The proceeds of the
Revolving Loans will be credited to the Operating Account.  Revolving Loans may
be requested by those individuals designated by the Borrower from time to time
in written instruments delivered to the Lender; provided, however, that the
Borrower shall remain liable with respect to any Revolving Loan disbursed by the
Lender in good faith hereunder, even if such a Revolving Loan is requested by an
individual who has not been so designated.  The Borrower agrees to confirm in

                                       9
<PAGE>
 
writing from time to time, when and as requested by the Lender, the purpose for
which the proceeds of each Revolving Loan were used.

     (f)                     [Reserved]

     2.2  Term Loan.
          --------- 

     (a) The Borrower acknowledges the following with respect to the Term Loan:

          (i) the Lender has funded the Term Loan, and as of June 1, 1998 the
outstanding principal balance of the Term Loan is $129,861.09;

          (ii) the obligation of the Borrower to repay the Term Loan plus
interest accrued thereon is evidenced by the Term Note;

          (iii)  the Borrower is obligated to repay the principal amount of the
Term Loan in Thirty-Six (36) equal monthly payments of $7,638.89 on the last day
of each month, beginning on November 30, 1996 and ending on the Maturity Date;
provided that the last such installment shall be in the amount sufficient to
repay the Term Loan in full;

          (iv)  the obligation of the Lender to make the Term Loan is not a
revolving obligation and amounts repaid may not be reborrowed.

     (b) The Borrower may prepay the Term Loan in whole or in part at any time
without premium or penalty.  Any such prepayment shall be applied against the
scheduled principal payments in the inverse order of maturity and shall not
otherwise postpone or change the amount of any subsequent installment.

     2.3.  Interest.
           -------- 

     (a)  Revolving Loans.
          --------------- 

          (i) General Provisions.  Except as otherwise provided in this Section
              ------------------                                               
2.3, the Principal Amount shall bear interest for each day such Principal Amount
is outstanding until it becomes due at the LIBO-Based Rate.  Effective as of the
date of this Agreement, all Original Agreement Loans shall bear interest at the
LIBO-Based Rate.  Payments of interest on each Revolving Loan shall be made on
each Interest Payment Date beginning on the Interest Payment Date next
succeeding the date of disbursement of such Revolving Loan.  Accrued and unpaid
interest due in respect of Original Agreement Loans as of the date hereof shall
be paid on the Interest Payment Date next succeeding the date hereof.
Notwithstanding the foregoing, at the option of the Lender, the Revolving Loans
shall bear interest at the Default Rate, payable on demand, for each day during
any period of Default hereunder.  Failure to exercise this option to assess a
Default Rate of interest shall not constitute a waiver of the such right in the

                                       10
<PAGE>
 
event of any subsequent Default or at a later date during the same Default.  The
rate of interest with respect to any portion of the Principal Amount which,
under the terms hereof, is bearing interest at the LIBO-Based Rate shall change
as and when the LIBOR Market Index Rate changes, and the rate of interest with
respect to any portion of the Principal Amount which, under the terms hereof, is
bearing interest at the Prime Rate shall change as and when the Prime Rate
changes.

          (ii) Inability to Determine Rate.  In the event that the Lender shall
               ---------------------------                                     
have determined (which determination shall be conclusive and binding upon the
Borrower) that by reason of circumstances affecting the interbank Eurodollar
market adequate and reasonable means do not exist for ascertaining the LIBOR
Market Index Rate, the Lender shall forthwith give notice (which may be
telephonic and promptly confirmed in writing or by facsimile transmission) of
such determination to the Borrower.  If such notice is given, any portion of the
Principal Amount bearing interest at the LIBO-Based Rate shall immediately begin
bearing interest at the Prime Rate.  Until such notice has been withdrawn by the
Lender, the Principal Amount shall continue to bear interest at the Prime Rate.

          (iii)  Illegality; Impracticality.  Notwithstanding any other
                 --------------------------                            
provisions herein, if any law, regulation, treaty or directive or any change
therein or in the interpretation or application thereof (whether having the
force of law or not)  shall or may in the opinion of the Lender make it unlawful
or impractical for the Lender to make or maintain Revolving Loans bearing
interest at the LIBO-Based Rate:  (1) the commitment of the Lender hereunder to
make Revolving Loans bearing interest at the LIBO-Based Rate shall forthwith be
suspended and (2) the outstanding Revolving Loans bearing interest at the LIBO-
Based Rate, if any, shall be converted automatically to Revolving Loans bearing
interest at the Prime Rate.

     (b) The Term Loan shall bear interest on the unpaid principal balance
thereof from time to time outstanding, for each day until it becomes due, at a
per annum rate equal to the Prime Rate plus  1/4%.  Payments of interest on the
Term Loan shall be made on each Interest Payment Date.  Notwithstanding the
foregoing, at the option of the Lender, the Term Loan shall bear interest at the
Default Rate, payable on demand, for each day during any period of Default
hereunder.  Failure to exercise this option to assess a Default Rate of interest
shall not constitute a waiver of the such right in the event of any subsequent
Default or at a later date during the same Default.  The rate of interest
applicable to the Term Loan shall be changed effective as of the date of any
change in the Prime Rate. Any accrued and unpaid interest on the Term Loan due
under the Original Agreement as of the date hereof shall be paid on the Interest
Payment Date next succeeding the date of this Agreement.

     2.4.                    [Reserved]

     2.5.  Commitment Fee.  The obligation of the Borrower to pay the Commitment
           ---------------                                                      
Fee shall commence on the date hereof and shall continue until the Obligations
have been fully and completely paid and discharged.  Commencing on September 30,
1998 and continuing on the last day of each subsequent calendar quarter
thereafter (i.e. March 31, June 30, September 30 and December 31) until the

                                       11
<PAGE>
 
Obligations have been fully and completely paid and discharged, the Borrower
shall pay the Commitment Fee due for the quarter (or portion thereof) then
ending.  Any accrued and unpaid portion of this fee shall be paid on the
Termination Date.  Any accrued and unpaid commitment fee due under the Original
Agreement as of the date hereof shall be paid on September 30, 1998.

     2.6.  Payments and Computations.  All payments hereunder (including any
           -------------------------                                        
payment or prepayment of principal, interest, fees and other charges) or with
respect to the Notes or the Loans shall be made in lawful money of the United
States of America, in immediately available funds without set-off, deduction or
counterclaim of any kind, to the Lender at its office at 1970 Chain Bridge Road,
McLean, Virginia 22102, or at such other place as the Lender may in writing
designate, and shall be applied, at the option of the Lender, first to accrued
Obligations other than principal and interest, next to accrued interest and then
to principal.  If any payment of principal, interest or fees is not due on a
Business Day, then the due date will be extended to the next succeeding full
Business Day and interest and fees will be payable with respect to the
extension.  If any payment of principal, interest or fees is not made within
seven (7) days of its due date, the Borrower agrees to pay to the Lender a late
charge equal to 5% of the amount of the payment.  Except as otherwise
specifically provided, interest and fees shall be computed on the basis of a
year of 360 days and actual days elapsed.  The Lender may, but shall not be
obligated to, debit the amount of any payment due under this Agreement to any
deposit account or loan account of the Borrower maintained with the Lender.

     2.7.  Termination of Revolving Facility by the Borrower.  The Borrower may
           -------------------------------------------------                   
terminate the Revolving Facility provided for in this Agreement and discontinue
borrowing thereunder by giving not less than 30 Business Days' prior written
notice of such termination to the Lender.  The termination of the Revolving
Facility provided for in this Agreement shall not affect the rights of the
Lender with respect to any Obligations arising prior or subsequent to such
termination and the provisions of this Agreement shall remain in full force and
effect until the Obligations have been fully and completely paid and discharged.

     2.8.  Extensions of Termination Date and Maturity Date.  The Lender may
           ------------------------------------------------                 
from time to time, in its sole discretion, extend the Termination Date or the
Maturity Date by giving written notice of such extension to the Borrower.
During any such periods of extension, the remaining terms and conditions of this
Agreement shall remain in full force and effect.

     SECTION 3.              [Reserved]

     SECTION 4.  Representations and Warranties.  As of the date hereof and as
                 ------------------------------                               
of each date a Loan is requested hereunder, the Borrower represents and warrants
to the Lender:

     4.1.  Incorporation, Good Standing and Due Qualification.  Each of the
           --------------------------------------------------              
Borrower and its Subsidiaries is a corporation duly organized, validly existing,
and in good standing under the laws of the jurisdiction of its incorporation;
has the corporate power and authority to own its assets and to transact the
business in which it is now engaged or in which it is proposed to be engaged;

                                       12
<PAGE>
 
and is duly qualified as a foreign corporation and in good standing under the
laws of each other jurisdiction in which such qualification is required.

     4.2.  Corporate Power and Authority.  The execution, delivery and
           -----------------------------                              
performance by the Borrower of the Loan Documents to which it is a party have
been duly authorized by all necessary corporate action and do not and will not
(a) require any consent or approval of the stockholders of the Borrower; (b)
contravene the Borrower's charter or bylaws; (c) result in a material breach of
or constitute a default under any material agreement or instrument to which the
Borrower is a party or by which it or its properties may be bound or affected;
(d) result in, or require, the creation or imposition of any Lien, upon or with
respect to any of the properties now owned or hereafter acquired by the Borrower
except as specifically created by or permitted under the Loan Documents; and (e)
to Borrower's best knowledge cause it to be in default under any law, rule,
regulation, order, writ, judgment, injunction, decree, determination or award
applicable to the Borrower.

     4.3.  Legally Enforceable Agreement.  This Agreement is, and each of the
           -----------------------------                                     
other Loan Documents when delivered under this Agreement will be, legal, valid
and binding obligations of the Borrower, enforceable against the Borrower, as
the case may be, in accordance with their respective terms, except as such
enforceability may be limited by bankruptcy, insolvency, receivership or by
general principles of equity.

     4.4.  Financial Statements; Financial Covenants.  The financial statements
           -----------------------------------------                           
of the Borrower which have been furnished to the Lender in connection with this
Agreement are complete and correct in all material respects in accordance with
GAAP and fairly present the financial condition of the Borrower, and, since the
date of each such statement, there has been no material adverse change in the
condition (financial or otherwise), business or operations of the Borrower.  As
of February 28, 1998, Tangible Net Worth was at least $10,000,000.00 and the
ratio of Current Assets to Current Liabilities was at least 3.0 to 1.

     4.5.  Litigation.  There is no pending or, to the Borrower's best
           ----------                                                 
knowledge, threatened action or proceeding against or affecting the Borrower or
any Subsidiary before any Tribunal, which may, in any one case or in the
aggregate, materially adversely affect the financial condition, operations,
properties or business of the Borrower or any Subsidiary.

     4.6.  Ownership and Liens.  The Borrower and each Subsidiary has title to
           -------------------                                                
all of its assets, and none of such assets, to the best of the Borrower's
knowledge, is subject to any Lien, except Liens permitted by this Agreement.

     4.7.  ERISA.
           ----- 

     (a) Prohibited Transactions.  No transaction has occurred in connection
         -----------------------                                            
with which the Borrower or any Subsidiary would be subject to a liability for
either a civil penalty assessed pursuant to (S) 502(i) of ERISA or a tax imposed
by Code (S) 4975.

                                       13
<PAGE>
 
     (b) Plan Termination. There has been no termination of an Employee Benefit
         ----------------                                                      
Plan or trust created under any Employee Benefit Plan that has or will give rise
to liability to the PBGC on the part of the Borrower or an ERISA Affiliate.  No
withdrawal or other liability has been incurred under Title IV of ERISA with
respect to any Employee Benefit Plan by the Borrower or an ERISA Affiliate.  The
PBGC has not instituted proceedings to terminate any Employee Benefit Plan.

     (c) Accumulated Funding Deficiency.  Full payment has been made of all
         ------------------------------                                    
amounts which are required under the terms of each Employee Benefit Plan to have
been paid as contributions to such Employee Benefit Plan as of the last day of
the most recent fiscal year of such Employee Benefit Plan ended on or before the
date of this Agreement, and no accumulated funding deficiency (as defined in (S)
302 of ERISA and Code (S) 412), whether or not waived, exists with respect to
any Employee Benefit Plan.  The Borrower and each ERISA Affiliate are current
with all required installments under Code (S) 412.

     (d) Relationship of Benefits to Pension Plan Assets.  The current value of
         -----------------------------------------------                       
the benefit liabilities (as defined in (S) 4001(a)(16) of ERISA) of each
Employee Benefit Plan does not exceed the fair market value of the assets of
such Employee Benefit Plan.  Neither the Borrower nor any ERISA Affiliate is
required to provide security to an Employee Benefit Plan under Code (S)
401(a)(29).  No lien under Code (S) 412(n) or (S)(S) 312(f) or 4068 of ERISA has
been or is reasonably expected by the Borrower to be imposed on the assets of
the Borrower or any ERISA Affiliate.

     (e) Multiemployer Plan.  Neither the Borrower nor any ERISA Affiliate
         ------------------                                               
participates in or contributes to or, since September 26, 1980 has participated
in or contributed to, any Multiemployer Plan.

     (f) Compliance with ERISA.  The Borrower and the ERISA Affiliates are in
         ---------------------                                               
compliance in all material respects with those provisions of ERISA which are
applicable to them.  Any Employee Benefit Plan which is intended to be
"qualified" under Code (S) 401(a) is so qualified.  No Reportable Event has
occurred with respect to any Employee Benefit Plan.  Each Employee Benefit Plan
has been administered in compliance with ERISA and the applicable provisions of
the Code, and in accordance with its terms and any related agreements or
documents.  The Borrower may terminate its contributions to any other Employee
Benefit Plan maintained by it without incurring any liability to any person
interested therein. There is no pending or, to the best knowledge of the
Borrower, threatened assessment, complaint, proceeding or investigation of any
kind before any Tribunal, including, but not limited to, the Internal Revenue
Service, the Department of Labor, the PBGC or any court of competent
jurisdiction, related to an Employee Benefit Plan, nor is there any basis
therefor.  The Borrower and each ERISA Affiliate have complied with the
continuation coverage requirements of Code (S) 4980B and Part 6 of Title 1 of
ERISA and any predecessor provisions thereto and, to the extent effective, the
group health plan portability, access and renewability requirements in Code
(S)(S) 9801 through 9806.

     4.8.  Taxes.  The Borrower and each Subsidiary have (a) timely filed or
           -----                                                            
caused to be filed all Tax Returns required to be filed for all periods up to

                                       14
<PAGE>
 
and including the date hereof in each jurisdiction in which they are or have
been subject to taxation and such returns and reports are true and correct, have
timely filed all claims for refunds to which they are entitled and have timely
paid or caused to be paid in full all taxes which are due and payable to any
taxing authorities for such periods, (b) fully paid or accrued on their
respective books an amount sufficient to pay all taxes to the extent of known
liabilities therefor which are not yet due and payable, (c) made or caused to be
made all withholdings of taxes required to be made, and such withholdings have
either been paid to the appropriate governmental authority or set aside in
separate accounts for such purposes, and (d) otherwise satisfied, in all
material respects, all legal requirements applicable to them with respect to all
aforementioned obligations of all taxing jurisdictions, and neither the Internal
Revenue Service nor any other taxing authority is now asserting or, to the best
knowledge of the Borrower, threatening to assert against the Borrower or any
Subsidiary any deficiency or claim for additional taxes or any interest thereon
or penalties in connection therewith.

     4.9.  Debt.  Neither the Borrower nor any Subsidiary is in any manner
           ----                                                           
directly or contingently obligated with respect to any Debt which is not
permitted by this Agreement.  Neither the Borrower nor any Subsidiary is in
default with respect to any such Debt.

     4.10.  Corporate Name; Chief Executive Office.  During the five years
            --------------------------------------                        
immediately preceding the date of this Agreement, neither the Borrower nor any
predecessor of the Borrower has used any corporate or fictitious name other than
its current corporate name and "Template Software, Inc., a Maryland
corporation."  The chief executive office of the Borrower, within the meaning of
Section 9.103(3)(d) of the UCC is 45365 Vintage Park Plaza, Suite 100, Dulles
(Loudoun County), Virginia 20166.

     4.11.  Environmental and Safety Matters.  The operation of the business of
            --------------------------------                                   
the Borrower and all Subsidiaries does not violate any applicable Environmental
Laws.  The Borrower and all Subsidiaries have timely obtained all licenses and
permits and timely filed all reports required to be filed under any applicable
Environmental Laws.  Neither the Borrower nor any Subsidiary has, and, to the
best knowledge of the Borrower, no other Person has, stored any chemical or
hazardous substances, including any "Hazardous Substances," "Pollutants" or
"Contaminants" (as such terms are defined in CERCLA), asbestos, petroleum
products, or polychlorinated biphenyls on, beneath or about any of the owned or
leased properties of the Borrower or any Subsidiary in violation of any
applicable legal requirements, including any Environmental Laws.   Except as
otherwise disclosed to the Lender in writing prior to the date hereof, to the
best knowledge of the Borrower, there is no condition relating to or resulting
from the release or discharge into the soil, surface waters, groundwaters,
drinking water supplies, navigable waters, land, surface or subsurface strata,
ambient air or any other environmental medium which has resulted or could result
in any damage, loss, cost, expense, claim, demand, order or liability to or
against the Borrower or any Subsidiary by any Tribunal or other third party
relating to or resulting from the operation of its business or otherwise related
to any real property owned or leased of the Borrower or any Subsidiary,
irrespective of the cause of such condition.  Neither the Borrower nor any
Subsidiary has received notice from any Tribunal or private or public entity
advising the Borrower or any Subsidiary that it is potentially responsible for
response costs with respect to a release or threatened release of any Hazardous

                                       15
<PAGE>
 
Substances.  Neither the Borrower nor any Subsidiary has and, to the best
knowledge of the Borrower, no other Person has, buried, dumped or otherwise
disposed of any Hazardous Substances on, beneath or about any property of the
Borrower or any Subsidiary or on, beneath or about any other property in
violation of any applicable legal requirements, including any Environmental
Laws.  Neither the Borrower nor any Subsidiary has received notice of violation
of any Environmental Law or zoning or land use ordinance, law or regulation
relating to the operation of the business of the Borrower or any Subsidiary, nor
is the Borrower aware of any such violation.

     4.12.  Licenses.  The Borrower and all Subsidiaries possess all Licenses
            --------                                                         
from federal, state and local governmental or regulatory authorities that are
necessary for the ownership, maintenance and operation of their respective
businesses as now conducted or as proposed to be conducted and the ownership or
leasing of their respective properties where the failure to possess such
Licenses would have a material adverse effect on the condition (financial or
otherwise), operations, business or property of such Borrower or such
Subsidiary.  The Licenses are in full force and effect, and the Borrower and
each Subsidiary, as the case may be, are in compliance in all material respects
with all of such Licenses.

     4.13.  Intellectual Property.  The Borrower and all Subsidiaries own all
            ---------------------                                            
right, title and interest in and to all Intellectual Property used in and
material to the operation of their respective businesses or, for such
Intellectual Property that is not owned, possesses adequate licenses or other
legally enforceable rights to use the same.  The Borrower has no reason to
believe that any valid basis exists upon which a claim adversely affecting any
such Intellectual Property may be asserted against the Borrower or any
Subsidiary.  To the best knowledge of the Borrower, no Person is infringing upon
the Intellectual Property used by the Borrower or any Subsidiary material to the
operation of their respective businesses.  The Borrower has taken appropriate
steps to protect the secrecy, confidentiality and value of its and all
Subsidiaries' rights in and to such Intellectual Property and to prevent others
from using such Intellectual Property without consent.

     4.14.  Absence of Payments.  None of the Borrower, any Subsidiary, any of
            -------------------                                               
their respective directors, officers, agents or employees, or, to the best
knowledge of the Borrower, any other Person acting on behalf of any such Person
has made any unlawful contributions, payments, gifts or entertainment, or made
any unlawful expenditures relating to political activity, to government
officials or others.

     4.15.  Related Party Transactions.  No present or former officer, director,
            --------------------------                                          
stockholder or Affiliate of the Borrower is a party to any transaction or series
of transactions with the Borrower which requires payments by the Borrower to
such officer, director, stockholder or Affiliate other than normal and customary
employment compensation and benefits.

     4.16.  Federal Reserve Board Regulations.  Neither the Borrower nor any
            ---------------------------------                               
Subsidiary is engaged or will engage, principally or as one of its important
activities, in the business of extending credit for the purpose of "purchasing"
or "carrying" any "margin stock" within the respective meanings of such terms
under Regulation U.  No part of the proceeds of any Loan will be used for

                                       16
<PAGE>
 
"purchasing" or "carrying" "margin stock" as so defined or for any purpose which
violates, or which would be inconsistent with, the provisions of the Regulations
of the Board of Governors of the Federal Reserve System.

     4.17.  Debarment and Suspension.  Neither the Borrower nor any Subsidiary
            ------------------------                                          
or Affiliate of the Borrower is currently or previously was debarred or
suspended from any contracting with the Government, and no event has occurred
and no condition currently exists that is likely to result in any such debarment
or suspension.

     4.18  Disclosure.  All facts material to the financial condition, results
           ----------                                                         
of operations, business, prospects and property of the Borrower and each
Subsidiary have heretofore been disclosed to the Lender.  No representation or
warranty made by the Borrower in this Agreement or in any of the other Loan
Documents, or in any statement, certificate, exhibit or schedule furnished or to
be furnished to the Lender pursuant to this Agreement or any of the other Loan
Documents or in connection with the transactions contemplated herein and
therein, contains or will contain any untrue statement of a material fact or
omits or will omit to state a material fact necessary to make the statements
contained herein and therein not misleading.

     SECTION 5.  Affirmative Covenants.  The Borrower covenants and agrees with
                 ---------------------                                         
the Lender that it will:

     5.1.  Maintenance of Existence.  Preserve and maintain, and cause each
           ------------------------                                        
Subsidiary to preserve and maintain, its corporate existence and good standing
in the jurisdiction of its incorporation, and qualify and remain qualified, and
cause each Subsidiary to qualify and remain qualified, as a foreign corporation
in each jurisdiction in which to the best of Borrower's knowledge such
qualification is required.

     5.2.  Maintenance of Records.  Keep, and cause each Subsidiary to keep,
           ----------------------                                           
adequate records and books of account, in which complete entries will be made in
accordance with GAAP, reflecting all financial transactions of the Borrower and
each Subsidiary, and maintain the principal records and books of account of the
Borrower and each Subsidiary at the chief executive office of the Borrower.

     5.3.  Maintenance of Properties.  Maintain, keep and preserve, and cause
           -------------------------                                         
each Subsidiary to maintain, keep and preserve, all of its properties (tangible
and intangible) necessary or useful in the proper conduct of its business in
good working order and condition, ordinary wear and tear excepted.

     5.4.  Conduct of Business.  Continue, and cause each Subsidiary to
           -------------------                                         
continue, to engage in an efficient and economical manner in a business of the
same general type as conducted by it on the date of this Agreement.

                                       17
<PAGE>
 
     5.5.  Maintenance of Insurance.  Maintain, and cause each Subsidiary to
           ------------------------                                         
maintain, insurance with financially sound and reputable insurance companies or
associations in such amounts and covering such risks as are usually carried by
companies engaged in the same or a similar business and similarly situated.

     5.6.  Compliance with Laws.  Comply, and cause each Subsidiary to comply,
           --------------------                                               
in all material respects with all applicable laws, rules, regulations and orders
(including, without limitation, ERISA), such compliance to include, without
limitation, paying before the same become delinquent all taxes, assessments and
governmental charges imposed upon it or upon its property, except as contested
in good faith and through appropriate proceedings deemed reasonably acceptable
to the Lender.

     5.7.  Right of Inspection.  At any reasonable time and from time to time,
           -------------------                                                
permit the Lender or any agent or representative thereof to examine and make
copies of and abstracts from the records and books of account of, and visit the
properties of, the Borrower and any Subsidiary, and to discuss the affairs,
finances and accounts of the Borrower and any Subsidiary with any of their
respective officers, directors or shareholders and the Borrower's independent
accountants; and in connection with any such inspection, pay to the Lender upon
demand its then current fee for such inspections to compensate the Lender for
the cost incurred and the commitment of resources required for conducting such
inspection.

     5.8.  Reporting Requirements.  Furnish to the Lender:
           ----------------------                         

     (a) Quarterly Financial Statements.  As soon as available and in any event
         ------------------------------                                        
within forty-five (45) days after the end of each of the quarters of each fiscal
year of the Borrower, unaudited financial statements consisting of consolidating
balance sheets of the Borrower and Subsidiaries as of the end of such quarter
and consolidating statements of income and retained earnings of the Borrower and
Subsidiaries for the period commencing at the end of the previous fiscal year
and ending with the end of such quarter, all in reasonable detail and stating in
comparative form the respective consolidating figures for the corresponding date

                                       18
<PAGE>
 
and period in the previous fiscal year and all prepared in accordance with GAAP.
Such financial statements shall be certified by the chief financial officer of
the Borrower, the Treasurer of the Borrower or such other financial officer of
the Borrower as is acceptable to the Lender, to present fairly the financial
condition of the Borrower (subject to year-end adjustment) and shall be
accompanied by a Compliance Certificate;

     (b) Annual Financial Statements.  As soon as available and in any event
         ---------------------------                                        
within ninety (90) days after the end of each fiscal year of the Borrower,
audited financial statements consisting of consolidated and consolidating
balance sheets of the Borrower and Subsidiaries as of the end of such fiscal
year, consolidated and consolidating statements of income and retained earnings
of the Borrower and Subsidiaries for such fiscal year, and consolidated and
consolidating statement of cash flows of the Borrower and Subsidiaries for such
fiscal year, all in reasonable detail and stating in comparative form the
respective consolidated and consolidating figures for the corresponding date and
period in the prior fiscal year and all prepared in accordance with GAAP.  The
consolidated statements shall be accompanied by an opinion thereon acceptable to
the Lender of an independent certified public accountant firm selected by the
Borrower and acceptable to the Lender and shall also be accompanied by a
Compliance Certificate;

     (c) Management Letters.  Promptly upon receipt thereof, copies of any
         ------------------                                               
reports submitted to the Borrower or any Subsidiary by independent certified
public accountants in connection with examination of the financial statements of
the Borrower or any Subsidiary made by such accountants;

     (d) Notice of Litigation.  Promptly after the commencement thereof, notice
         --------------------                                                  
of all actions, suits and proceedings before any Tribunal affecting the Borrower
or any Subsidiary, which, in the reasonable opinion of the Borrower, if
determined adversely, could have a material adverse effect on the financial
condition, properties or operations of the Borrower or such Subsidiary;

     (e) Notice of Defaults and Events of Default.  As soon as possible and in
         ----------------------------------------                             
any event within five (5) Business Days after the occurrence of each Default and
Event of Default, a written notice setting forth the details of such Default or
Event of Default and the action which is proposed to be taken by the Borrower
with respect thereto;

     (f) Proxy Statements, Etc.  Promptly after the sending or filing thereof,
         ---------------------                                                
copies of all proxy statements, financial statements and reports which the
Borrower or any Subsidiary sends to its stockholders, and copies of all regular,
periodic and special reports, and all registration statements which the Borrower
or any Subsidiary files with the Securities and Exchange Commission or any
governmental authority which may be substituted therefor, or with any national
securities exchange;

     (g)    [Reserved]

     (h) Government Contract Audits.  Promptly after the Borrower's receipt
         --------------------------                                        
thereof, notice of any final decision of a contracting officer disallowing costs
aggregating more than $25,000.00,  which disallowed costs arise out of any audit
of the Borrower's contracts with the Government;

     (i) Notice of Claimed Defaults.  Immediately upon becoming aware that the
         --------------------------                                           
holder of any Debt or Lien has given notice or taken any action with respect to
a claimed breach, default or event of default, a written notice specifying the
notice given or action taken by such holder and the nature of the claimed
breach, default or event of default by the Borrower thereunder, and the action
being taken or proposed to be taken with respect thereto;

     (j)                     [Reserved]

     (k) General Information.  Such other information respecting the condition
         -------------------                                                  
or operations, financial or otherwise, of the Borrower or any Subsidiary as the
Lender may from time to time reasonably request.

                                       19
<PAGE>
 
     5.9.  Licenses.  Keep, and cause each Subsidiary to keep, all Licenses and
           --------                                                            
all other agreements necessary to operate the business of such Borrower or such
Subsidiary in full force and effect and free from burdensome restrictions and
comply in all material respects with all terms and conditions thereof.

     5.10.  ERISA. (a) Make, and cause each Subsidiary to make, prompt payments
            -----                                                              
of contributions required by the terms of each Employee Benefit Plan and meet
the minimum funding standards set forth under ERISA and the Code with respect to
each Employee Benefit Plan to which such standards apply; (b) notify the Lender
immediately of any fact, including, without limitation, any Reportable Event,
arising in connection with any Employee Benefit Plan which, more likely than
not, would constitute grounds for the termination thereof by the PBGC or for the
appointment by the appropriate United States district court of a trustee to
administer the Employee Benefit Plan; (c) notify the Lender immediately of the
intent by the Borrower to terminate any Employee Benefit Plan; (d) notify the
Lender immediately of the adoption of an amendment to any Employee Benefit Plan
(or of any other event) which causes any Employee Benefit Plan to fail to have
sufficient assets to qualify for a standard termination under Section 4041 of
ERISA or to require providing security under Code (S) 401(a)(29); (e) promptly
after receipt thereof, furnish to the Lender a copy of any notice received by
the Borrower or any Subsidiary from the PBGC relating to the intention of the
PBGC to terminate any Employee Benefit Plan or to appoint a trustee to
administer any Employee Benefit Plan; (f) promptly after receipt thereof,
furnish to the Lender a copy of any notice received by the Borrower or any
Subsidiary from the Internal Revenue Service relating to the intention of the
Internal Revenue Service to disqualify any Employee Benefit Plan or to refuse to
grant a favorable determination letter with regard to any Employee Benefit Plan;
(g) notify the Lender immediately of any lawsuit, claim for damages or
administrative proceeding in which an Employee Benefit Plan or a fiduciary with
respect thereto is a defendant; and (h) furnish to the Lender, promptly upon its
request therefor, such additional information concerning each and every Employee
Benefit Plan as may be reasonably requested, including, but not limited to, the
annual report required to be filed under ERISA and any notices filed or proposed
to be filed in connection with any of the foregoing.

     5.11.  Environmental Matters.  Notify the Lender immediately of the receipt
            ---------------------                                               
by the Borrower or any Subsidiary of any notice from any Tribunal that there has
been a violation by the Borrower or any Subsidiary of any Environmental Law and
that remediation of such violation is necessary and assume responsibility for,
and control the process of, any response action, penalties or correction
associated with such violation.

     5.12.  Financial Covenants.
            ------------------- 

     (a) Minimum Tangible Net Worth.  Maintain, as of the ending date of the
         --------------------------                                         
financial period depicted in each balance sheet required to be delivered to the
Lender under the terms of this Agreement, a Tangible Net Worth of at least
$10,000,000.00.

                                       20
<PAGE>
 
     (b) Current Ratio.  Maintain, as of the ending date of the financial period
         -------------                                                          
depicted in each balance sheet required to be delivered to the Lender under the
terms of this Agreement, a ratio of Current Assets to Current Liabilities of at
least 3.0 to 1.

     SECTION 6.  Negative Covenants.  The Borrower agrees that it will not:
                 ------------------                                        

     6.1.  Liens.  Create, incur, assume or permit to exist, or permit any
           -----                                                          
Subsidiary to create, incur, assume or permit to exist, any Lien upon or with
respect to any of its properties, now owned or hereafter acquired, except:  (a)
Liens in favor of the Lender; (b) Liens which are incidental to the conduct of
the business of the Borrower or any Subsidiary arising in connection with
operating lease obligations evidencing the rights of the lessors under such
leases; (c) Liens on Equipment in existence on the date of this Agreement and
disclosed in Schedule 6.1(c) attached hereto; (d) Liens securing obligations of
a Subsidiary to the Borrower or another Subsidiary; (e) (i) Liens (other than
Liens imposed on any property of the Borrower or one or more of its Subsidiaries
or any ERISA Affiliate pursuant to ERISA or section 412 of the Code) associated
with deposits made in the ordinary course of business in connection with current
taxes, assessments and other governmental charges not yet due and payable or
workers' compensation, unemployment insurance and other types of social
security, (ii) Liens on deposits to secure the performance of utilities, leases,
statutory obligations and surety and appeal bonds and other obligations of a
like nature incurred in the ordinary course of business, and (iii) bankers'
Liens arising by statute or under customary terms regarding depository
relationships on deposits held by financial institutions with whom the Borrower
or a  Subsidiary has a banker-customer relationship, but only to the extent any
such Lien described in the foregoing clauses (i) through (iii) is not incurred
in connection with the obtaining of credit or the payment of a deferred purchase
price and does not, in the aggregate with all other such Liens, result in a
material adverse effect on the business, operations, assets or condition
(financial or otherwise) of the Borrower or one or more of its Subsidiaries; (f)
mechanic's, materialman's, carrier's, warehousemen's or similar Liens for sums
not yet due or being contested in good faith by the Borrower or one or more of
its Subsidiaries by appropriate proceedings and for which adequate reserves have
been established by the Borrower or one or more of its Subsidiaries as reflected
in the Borrower's or one or more of its Subsidiaries' financial statements; (g)
easements, rights-of-way, restrictions and other similar encumbrances on the
real property or fixtures of the Borrower or one or more of its Subsidiaries
incurred in the ordinary course of business which individually or in the
aggregate are not substantial in amount and which do not in any case materially
detract from the value of the property subject thereto or interfere with the
ordinary conduct of the business of the Borrower or any of its Subsidiaries; and
(g) purchase-money Liens on any fixed assets provided that (i) any property
subject to any such purchase-money Lien is acquired by the Borrower or any
Subsidiary in the ordinary course of its respective business and the purchase-
money Lien on any such property is created contemporaneously with such
acquisition and (ii) each such purchase-money Lien shall attach only to the
property so acquired.

     6.2.  Debt.  Create, incur, assume or permit to exist, or permit any
           ----                                                          
Subsidiary to create, incur, assume or permit to exist, any Debt, except (a) the
Obligations; (b) other Debt of the Borrower in an aggregate principal amount of
up to $1,000,000, including Debt of the Borrower in existence 

                                       21
<PAGE>
 
on the date of this Agreement and depicted in Schedule 6.2 attached hereto; (c)
subject to the limitations specified in Section 6.8 and 6.11 hereof, Debt of any
Subsidiary to the Borrower or another Subsidiary; (d) ordinary trade accounts
payable; and (e) Debt of the Borrower or any Subsidiary secured by Liens
permitted by this Agreement.

     6.3.  Mergers, Etc.  Merge or consolidate with a Person, or permit any
           ------------                                                    
Subsidiary to do so, except that (a) any Subsidiary may merge into or transfer
assets to the Borrower; (b) any Subsidiary may merge into or consolidate with or
transfer assets to any other Subsidiary; and (c) the Borrower may merge with any
other Person if the Borrower is the surviving entity; provided, however, that
the Lender's consent to any such merger shall be required if the aggregate
consideration paid or to be paid by the Borrower and its Affiliates in
connection with any such merger during the twelve month period beginning on the
immediately preceding July 1 (unless such test is occurring on July 1, in which
event such twelve month period shall begin on such July 1 rather than the
immediately preceding July 1) and ending on the next succeeding June 30 (unless
such test is occurring on June 30, in which event such twelve month period shall
end on such June 30 rather than the next succeeding June 30) plus the aggregate
consideration paid by or due from the Borrower and its Affiliates in connection
with all other mergers and acquisitions permitted under this clause (c) of this
Section 6.10 hereof consummated during such twelve month period exceeds
$5,000,000.00.

     6.4.  Leases.  Create, incur, assume, or permit to exist, or permit any
           ------                                                           
Subsidiary to create, incur, assume or permit to exist, any obligation as lessee
for the rental or hire of any real or personal property, except as is necessary
in connection with such party's normal and customary business activities.

     6.5.  Sale and Leaseback.  Sell, transfer or otherwise dispose of, or
           ------------------                                             
permit any Subsidiary to sell, transfer or otherwise dispose of, any real or
personal property to any Person and thereafter directly or indirectly lease back
the same or similar property.

     6.6.  Dividends.  Declare or pay any dividends; purchase, redeem, retire,
           ---------                                                          
or otherwise acquire for value any of its capital stock now or hereafter
outstanding; make any distribution of assets to its stockholders whether in
cash, assets or obligations of the Borrower; allocate or otherwise set apart any
sum for the payment of any dividend or distribution on, or for the purchase,
redemption, or retirement of, any shares of its capital stock; make any other
distribution by reduction of capital or otherwise in respect of any shares of
its capital stock; or permit any Subsidiary to purchase or otherwise acquire for
value any stock of the Borrower or another Subsidiary, except that if there is
no Default at such time and no Default would result after giving effect to the
proposed dividend (a) the Borrower may declare and deliver dividends and make
distributions payable solely in common stock of the Borrower, (b) the Borrower
may purchase or otherwise acquire shares of its capital stock by exchange for or
out of the proceeds received from a substantially concurrent issue of new shares
of its capital stock, and (c) the Borrower may declare and pay cash dividends;
provided that the Borrower shall not declare or pay any dividends permitted
under this Section 6.6 until the Lender has received such information as the

                                       22
<PAGE>
 
Lender may have requested in order to verify the amount of the proposed
dividends and to determine that the conditions precedent to the making of the
requested dividends have been satisfied.

     6.7.  Transfer of Assets.  Sell, lease, assign, transfer or otherwise
           ------------------                                             
dispose of or permit any Subsidiary to sell, lease, assign, transfer or
otherwise dispose of, any of its now owned or hereafter acquired assets
(including, without limitation, shares of stock and indebtedness of
Subsidiaries, Accounts Receivable and leasehold interests), except:  (a) the
sale or disposition of assets in the ordinary course of the Borrower's or such
Subsidiary's business; (b) the sale or other disposition of Equipment which the
Borrower determines in good faith to be obsolete; and (c) the sale, lease,
assignment, or other transfer by any Subsidiary of its assets to the Borrower.

     6.8.  Loans.  Make, or permit any Subsidiary to make, any loan or advance
           -----                                                              
to any Person except for (i) loans or advances by the Borrower to its employees,
officers or directors and loans or advances by a Subsidiary to its employees,
officers or directors, which loans or advances do not exceed at any time
outstanding the aggregate principal sum of $25,000.00, (ii) reasonable advances
by the Borrower or a Subsidiary for anticipated business expenses of the
Borrower's or such Subsidiary's employees that would be reimbursable to such
employees under the Borrower's or such Subsidiary's expense reimbursement
policy, (iii) loans or advances by any Subsidiary to the Borrower or another
Subsidiary, and (iv) loans or advances by the Borrower to an Affiliate (other
than a Subsidiary), which loans or advances, plus commitments to make loans or
advances, do not exceed at any time outstanding the aggregate principal sum of
$10,000,000.00.

     6.9.  Guaranties, Etc.  Assume, guarantee, endorse or otherwise be or
           ---------------                                                
become directly or contingently responsible or liable (including, but not
limited to, an agreement to purchase any obligation, stock, assets, goods or
services, or to supply or advance any funds, assets, goods or services, or to
maintain or cause such Person to maintain a minimum working capital or net
worth, or otherwise to assure the creditors of any Person against loss) for
obligations of any Person, except guaranties by endorsement of negotiable
instruments for deposit or collection or similar transactions in the ordinary
course of business.

     6.10.  Acquisitions and Investments.  Purchase or acquire, or permit any
            ----------------------------                                     
Subsidiary to purchase or acquire, all or substantially all of the assets of any
Person, or make, or permit any Subsidiary to make, any Investments in any Person
except:

     (a) the Borrower may maintain its ownership interest in each of the
Subsidiaries listed on Schedule 6.10 at the percentage of ownership disclosed on
said Schedule and may make additional Investments in Subsidiaries, provided that
the aggregate amounts of all such Investments and commitments to such make
Investments shall not exceed $15,000,000.00;

     (b) any Subsidiary may make and own Investments in the Borrower;

     (c) the Borrower or any Subsidiary may acquire and hold stock, obligations
or securities received in settlement of debts owing to the Borrower or such
Subsidiary;

                                       23
<PAGE>
 
     (d) the Borrower or any Subsidiary may make and own:

          (i) Investments in certificates of deposit or time deposits having
maturities in each case not exceeding one year from the date of issuance thereof
and issued by any FDIC-insured commercial bank incorporated in the United States
or any state thereof having a combined capital and surplus of not less than
$500,000.00;

          (ii) Investments in marketable direct obligations issued or
unconditionally guaranteed by the United States of America, any agency thereof,
or backed by the full faith and credit of the United States of America, in each
case maturing within one year from the date of issuance or acquisition thereof;

          (iii)  Investments in commercial paper issued by a corporation
incorporated in the United States or any State thereof maturing no more than one
year from the date of issuance thereof and, at the time of acquisition, having a
rating of A-1 (or better) by Standard & Poor's Corporation or P-1 (or better) by
Moody's Investors Services, Inc.; and

          (iv) Investments in money market mutual funds all of the assets of
which are invested in cash or investments described in clauses (i), (ii) and
(iii) of this paragraph (d).

     6.11.  Transaction with Affiliate.  Except as specifically permitted by the
            --------------------------                                          
terms of this Agreement, (including, without limitation, Sections 6.8 and 6.10
hereof), enter into any transaction, including without limitation, the purchase,
sale or exchange of property or the rendering of any service, with any
Affiliate, or permit any Subsidiary to enter into any transaction, including,
without limitation, the purchase, sale or exchange of property or the rendering
of any service, with any Affiliate, except in the ordinary course of and
pursuant to the reasonable requirements of the Borrower's or such Subsidiary's
business and upon fair and reasonable terms no less favorable to the Borrower or
such Subsidiary than would be applicable in a comparable arm's-length
transaction with a Person not an Affiliate.

     6.12.  Change of Chief Executive Office and Corporate Name.  Move the
            ---------------------------------------------------           
principal records and books of account of the Borrower or any Subsidiary from
its chief executive office or change its chief executive office or the name
under which it does business without (a) giving the Lender at least thirty (30)
days prior written notice, and (b) executing and delivering financing statements
reasonably satisfactory to the Lender prior to such move or change.

     SECTION 7.  Conditions of Lending.  The making of the Revolving Loans shall
                 ---------------------                                          
be subject to the following conditions:

     7.1.  Conditions Precedent to Closing.  The initial disbursement of the
           -------------------------------                                  
Revolving Loans shall be subject to the following conditions precedent:

                                       24
<PAGE>
 
     (a) The Loan Documents shall have been appropriately completed, duly
executed by the parties thereto, recorded and or filed where necessary and
delivered to the Lender, and all taxes and fees with respect to such recording
and filing shall have been paid by the Borrower.

     (b) No Default or Event of Default shall have occurred and be continuing.

     (c) All representations and warranties contained herein shall be true and
correct at the date of the Closing.

     (d) All legal matters incident to the Loans shall be satisfactory to
counsel for the Lender, and the Borrower agrees to execute and deliver to the
Lender such additional documents and certificates relating to the Loans as the
Lender may reasonably request.

     (e) If required by the Lender, the Lender shall have received an opinion of
counsel to the Borrower as to such matters as the Lender may request, in form
and substance satisfactory to the Lender and its counsel.

     (f) The Lender shall have received a certification by an acceptable
provider of financing statement searches of all financing statements of public
record which relate or pertain to the Borrower and its Subsidiaries, termination
statements shall have been filed with respect to any  financing statements not
constituting Liens permitted by this Agreement, and all other required releases
have been obtained, so that no Liens other than Liens permitted by this
Agreement shall exist, and all taxes and fees with respect to such recording and
filing shall have been paid by the Borrower.  The Lender shall also have
received a certification by an acceptable provider of judgments and tax lien
searches of the absence of any judgements or tax liens of public record against
the Borrower and/or the Subsidiaries.

     (g) If requested by the Lender, the Borrower shall have delivered to the
Lender (i) certified copies of evidence of all corporate actions taken by the
Borrower to authorize the execution and delivery of this Agreement, the
Revolving Note and the other Loan Documents, (ii) a certificate of incumbency
for the officers of the Borrower executing the Loan Documents required herein,
(iii) a good standing certificate dated not more than 30 days prior to the date
of the Closing from the appropriate state official of any state in which the
Borrower is incorporated or qualified to do business, and (iv) such additional
supporting documents as the Lender or counsel for the Lender may reasonably
request.

     (h)  [Reserved]

     (i) The Lender shall have received evidence satisfactory to it that the
Borrower has obtained the insurance required by this Agreement, including,
without limitation, endorsements to the Borrower's insurance policies naming the
Lender as loss payee or additional insured, as applicable.

                                       25
<PAGE>
 
     (j) The Lender shall have received such landlord and mortgagee waivers as
it shall request.

     (k) No material adverse change in the financial or business condition of
the Borrower or a Subsidiary shall have occurred since the date of the most
recent financial statements of such Person received by the Lender.

     (l) No litigation or proceedings shall be pending or threatened which, in
the Lender's sole judgment, will materially and adversely affect the financial
condition, operation, or prospects of the Borrower or any Subsidiary.

     7.2.  Conditions Precedent to Subsequent Disbursements.  The disbursement
           ------------------------------------------------                   
of subsequent Revolving Loans shall be subject to the following conditions
precedent:

     (a) No Default or Event of Default shall have occurred and be continuing.

     (b) No material adverse change shall have occurred in the financial or
business condition of the Borrower or a Subsidiary.

     (c) All representations and warranties contained herein shall be true and
correct at the date of such disbursement.

     (d) No change shall have occurred in any law or regulations thereunder or
interpretations thereof which in the opinion of counsel for the Lender would
make it illegal for the Lender to make Revolving Loans hereunder.

     (e) The Lender shall have received such landlord and mortgagee waivers as
it shall request from any landlord or mortgagee, and all landlord and mortgagee
waivers previously provided to the Lender by any landlord or mortgagee shall
remain in effect.

     SECTION 8.  Default.
                 ------- 

     8.1.  Events of Default.  Each of the following shall constitute an Event
           -----------------                                                  
of Default under this Agreement:

     (a) The failure of the Borrower to pay any Obligation to the Lender
including, without limitation, the principal of or interest on the Notes or any
of the Loans, when the same shall become due and payable, whether at maturity,
as a result of the Lender's demand for payment or otherwise; provided, however,
that any such failure (other than a failure to make a payment due pursuant to
Section 2.1(c), as to which no notice and cure period applies) shall constitute
an Event of Default only if such failure is not cured within five (5) days after
the date when the Lender's notice of such failure (which notice may be a
computer generated late payment notice) is deemed effective pursuant to Section
9.3 hereof; or

                                       26
<PAGE>
 
     (b) The failure of the Borrower to perform or observe any covenant set
forth herein (except any such failure resulting in the occurrence of another
Event of Default described in this Section) or to perform or observe any other
term, condition, covenant, warranty, agreement or other provision contained in
this Agreement or any of the other Loan Documents; provided that if such failure
is capable of cure, then such failure shall constitute an Event of Default only
if such failure is not cured within ten (10) days after the date when a notice
from the Lender specifying such failure is deemed effective pursuant to Section
9.3 hereof; or

     (c) The existence of any material inaccuracy in any representation or
warranty made by the Borrower or any statement or representation made in any
certificate, report or opinion delivered pursuant hereto or in connection with
any borrowing hereunder or the occurrence of any material breach thereof; or

     (d) The occurrence of a default under and the acceleration of any other
obligation of the Borrower or any Subsidiary for the payment of any Debt in
excess of $100,000.00, unless and to the extent that the declaration of default
and acceleration is being contested in good faith in a court of appropriate
jurisdiction; or

     (e) The making by the Borrower of an assignment for the benefit of
creditors, the filing by the Borrower of a petition in bankruptcy or a petition
or application to any Tribunal for the appointment of any receiver or trustee
for the Borrower or any substantial part of its property, or the commencement by
the Borrower of any proceeding relating to the Borrower under any
reorganization, arrangement, readjustments of debt, dissolution or liquidation
law or statute of any jurisdiction, whether now or hereafter in effect; or

     (f) The failure within 30 days after the filing of a bankruptcy petition or
the commencement of any proceeding against the Borrower seeking any
reorganization, arrangement, composition, readjustment, liquidation, dissolution
or similar relief under any present or future statute, law or regulation, to
have such proceeding dismissed, or the failure within 30 days after the
appointment, without the consent or acquiescence of the Borrower, of any
trustee, receiver or liquidator of the Borrower or of all or any substantial
part of the properties of the Borrower to have such appointment vacated; or

     (g) The occurrence of any of the events described in the two immediately
preceding clauses with respect to a Subsidiary, or any property of a Subsidiary;
or

     (h) The entry of any judgment against the Borrower or any Subsidiary in
excess of $100,000.00 or the attachment of any property of the Borrower or any
Subsidiary having a value in excess of $100,000.00 and the failure by the
affected Person to pay, discharge, bond-off or cause to be dismissed such
judgement or attachment within 30 days, unless and to the extent that the
judgment or attachment is appealed in good faith to a court of higher
jurisdiction and the appeal remains pending; or

                                       27
<PAGE>
 
     (i) The occurrence of a material adverse change in the financial or
business condition of the Borrower or a Subsidiary; or

     (j)  [Reserved]

     (k)  [Reserved]

     (l) Neither Andrew Ferrentino nor Linwood Pearce remaining active in the
management of the Borrower; or

     (m) The issuance to the Borrower or any Subsidiary of (i) a cure notice or
a show-cause notice relating to a possible termination for default under any
contract which is either a contract with the Government or is a subcontract (at
any tier) which is related to a contract between a third party and the
Government and, within thirty (30) calendar days after the date of such notice,
no written notification is received by the Borrower or such Subsidiary from the
cognizant Contracting Officer or Customer official stating that a termination
will not occur or (ii) a notice of actual termination for default (complete or
partial), under any such contract or subcontract; provided, however, that no
Event of Default shall be declared based upon clauses (i) or (ii) of this
Section 8.1(o) if the notice in question is issued at a time when the Unearned
Contract Value of the contract in question is less than $300,000.00 or
subcontract in question is less than $50,000.00.  The term "Unearned Contract
Value" shall mean the difference between (1) the then fully funded dollar value
of the contract or subcontract, whether or not earned, and (2) the total amounts
previously billed and properly billable for accepted end items or services; or

     (n) With respect to the Borrower or any Subsidiary, the occurrence of any
debarment or suspension from contracting or subcontracting with the Government;
or

     (o) The occurrence of any of the following events: (i) the termination of
any Employee Benefit Plan in a distress termination under Section 4041(c) of
ERISA or an involuntary termination under Section 4042 of ERISA; (ii) the
failure to maintain, or the filing of a request for a waiver of, the minimum
funding standard with respect to any Employee Benefit Plan; (iii) the occurrence
of any event which causes any Employee Benefit Plan to cease to have sufficient
assets at all times so as to qualify for a standard termination under Section
4041 of ERISA; (iv) the occurrence of any event which causes the unfunded
liability with regard to all such Employee Benefit Plans in the aggregate to
become an amount in excess of $1,000; (v) the appointment of a trustee by an
appropriate United States district court to administer any Employee Benefit
Plan; or (vi) the institution of any proceedings by the PBGC to terminate any
such Employee Benefit Plan or to appoint a trustee to administer any such
Employee Benefit Plan; or

     (p) The occurrence of an event of default under any other Loan Document.

     8.2.  Remedies upon Default.  Upon the occurrence of an Event of Default,
           ---------------------                                              
the following provisions shall be applicable:

                                       28
<PAGE>
 
     (a) The Lender may, at its option, declare all Obligations, whether
incurred prior to, contemporaneous with, or subsequent to the date of this
Agreement, and whether represented in writing or otherwise, immediately due and
payable without presentment, demand, protest, notice of non-payment or any other
notice required by law relative thereto, all of which are hereby expressly
waived by the Borrower and terminate the Lender's obligation to make Loans
hereunder; provided, however, that upon the occurrence of an Event of Default
specified in Sections 8.1(e) or (f), all Obligations automatically will be due
and payable and the Lender's obligation to make Loans hereunder will
automatically terminate without further action by the Lender.  If any of the
Obligations, including, without limitation, the Loans, shall be evidenced by a
demand instrument, the right of the Lender to declare any and all Obligations to
be immediately due and payable, as well as the recitation of the above events
permitting the Lender to declare all Obligations due and payable, shall not
constitute an election by the Lender to waive its right to demand payment under
a demand instrument at any time and in any event, as the Lender, in its
discretion, may deem appropriate.

     (b) The Lender is hereby authorized at any time or from time to time,
without notice to the Borrower (any such notice being expressly waived by the
Borrower) to set-off and apply against any and all of the Obligations, whether
or not due, any and all deposits (general or special, time or demand,
provisional or final) at any time held by the Lender, including any certificate
of deposit, and all other obligations and indebtedness at any time owed by the
Lender, in any capacity, to or for the credit or account of the Borrower.

     (c) The Lender may itself perform or comply, or otherwise cause performance
or compliance with the obligations of the Borrower contained in this Agreement.
The expenses of the Lender incurred in connection with such performance or
compliance, together with interest thereon at the Default Rate, shall be payable
by the Borrower to the Lender on demand and shall constitute Obligations.

     SECTION 9.  Miscellaneous.
                 ------------- 

     9.1.  Collection Costs.  The Borrower shall pay all of the reasonable costs
           ----------------                                                     
and expenses incurred by the Lender in connection with the enforcement of this
Agreement and the other Loan Documents, including, without limitation,
reasonable attorneys' fees and expenses.

     9.2.  Effect on Original Loan Documents, Modification and Waiver.
           ---------------------------------------------------------- 

     (a) The Borrower acknowledges and agrees that its obligations under the
Original Loan Documents remain valid and enforceable obligations and that the
execution and delivery of this Agreement and the other Loan Documents executed
in connection herewith shall not be construed as a novation of any of the
Original Loan Documents.  If any provision of this Agreement or any of the other
Loan Documents is avoided or found to be unenforceable, the corresponding
provision of the Original Loan Documents shall be automatically reinstated.  The
Borrower further acknowledges and agrees that, as of the date hereof, it has no

                                       29
<PAGE>
 
offsets or defenses against the payment of any of its obligations under the
Original Loan Documents.  As a specific inducement to the Lender without which
the Borrower acknowledges the Lender would not enter into this Agreement and the
other Loan Documents, the Borrower hereby waives any and all claims that it may
have against the Lender, as of the date hereof, arising out of or relating to
the Original Loan Documents, whether sounding in contract, tort or any other
basis.

     (b) The terms and conditions pursuant to which the Lender is making the
Revolving Loans available to the Borrower and the other terms and conditions
generally related to the relationship between the Borrower and the Lender are
completely restated in this Agreement and the other Loan Documents executed in
connection herewith.  Accordingly, the Original Loan Documents are superseded by
this Agreement and the other Loan Documents executed in connection herewith
except as provided in the immediately following sentence.  Notwithstanding the
foregoing, the Original Loan Documents shall survive and remain in effect to the
extent they pertain to the obligations of the Borrower with respect to the Term
Loan and the administration of the Term Loan.  In the event of a conflict
between the terms of the Original Loan Documents and the terms of this Agreement
and the other Loan Documents executed in connection herewith, the terms of this
Agreement and the other Loan Documents executed in connection herewith shall
control.

     (c) This Agreement, the other Loan Documents executed in connection
herewith, contain the entire agreement between the parties.

     (d) No modification or waiver of any provision of any of these documents
and no consent by the Lender to any departure therefrom by the Borrower shall be
effective unless such modification or waiver shall be in writing and signed by
an officer of the Lender with a title of assistant vice president or any higher
office, and the same shall then be effective only for the period and on the
conditions and for the specific instances and purposes specified in such
writing.

     (e) No notice to or demand on the Borrower in any case shall entitle the
Borrower to any other or further notice or demand in similar or other
circumstances.

     (f) No failure or delay by the Lender in exercising any right, power or
privilege hereunder shall operate as a waiver thereof; nor shall any single or
partial exercise thereof preclude any other or further exercise thereof or the
exercise of any other right, power or privilege.  The rights and remedies herein
provided are cumulative and not exclusive of any rights or remedies otherwise
provided by law.

     9.3.  Notices.  All notices, requests, demands or other communications
           -------                                                         
required or permitted by or in connection with this Agreement or any other Loan
Document, without implying the obligation to provide any such notice, request,
demand or other communication, shall be in writing addressed to the appropriate
address set forth below or to such other address as may be hereafter specified
by written notice by the Lender or the Borrower, as applicable, forwarded in
like manner.  Any such notice, request, demand or other communication shall be
deemed to be effective one (1) day after dispatch if sent by telegram, mailgram,

                                       30
<PAGE>
 
Purolator Delivery, express mail, Federal Express or any other commercially
recognized overnight delivery service or two (2) days after dispatch if sent by
registered or certified mail, return receipt requested.  Notwithstanding the
foregoing, all notices, requests, demands or other communications shall be
considered to be effective upon receipt if accomplished by hand delivery.

To the Lender:      First Union National Bank
                    1970 Chain Bridge Road
                    9th Floor
                    McLean, Virginia 22102
                    Attention: Kerry S. Teutschbein

To the Borrower:    Template Software, Inc.
                    45365 Vintage Park Plaza
                    Suite 100
                    Dulles, Virginia 20166
                    Attention: Kimberly E. Osgood

     9.4.  Counterparts.  This Agreement may be executed by the parties hereto
           ------------                                                       
individually or in any combination, in one or more counterparts, each of which
shall be an original and all of which together constitute one and the same
agreement.

     9.5.  Captions.  The captions of the various sections and paragraphs of
           --------                                                         
this Agreement have been inserted only for the purpose of convenience; such
captions are not a part of this Agreement and shall not be deemed in any manner
to modify, explain, enlarge or restrict any of the provisions of this Agreement.

     9.6.  Survival of Agreements.  All agreements, representations and
           ----------------------                                      
warranties made herein shall survive the delivery of this Agreement and the
making and renewal of the Loans hereunder.

     9.7.  Fees and Expenses.  Whether or not any Loans are made hereunder, the
           -----------------                                                   
Borrower shall pay on demand all costs and expenses incurred by the Lender in
connection with the preparation, negotiation, execution, delivery, filing,
recording and administration of this Agreement and any of the documents executed
or delivered in connection herewith, including, without limitation, the
reasonable fees and expenses of counsel to the Lender, including in-house
counsel for the Lender and local counsel who may be retained by the Lender, with
respect to this Agreement and such documents and any amendments thereof and with
respect to advising the Lender as to its rights and responsibilities thereunder.

     9.8.  Use of Defined Terms.  All terms defined in this Agreement shall have
           --------------------                                                 
the defined meanings when used in certificates, reports or other documents made
or delivered pursuant to this Agreement, unless the context shall otherwise
require.

                                       31
<PAGE>
 
     9.9.  Successors and Assigns.
           ---------------------- 

     (a) This Agreement shall inure to the benefit of and bind the respective
parties hereto and their successors and assigns; provided, however, that the
Borrower may not assign its rights hereunder without the prior written consent
of the Lender.

     (b) At any time and from time to time, the Lender may grant to one or more
Financial Institutions participating interests in the Lender's commitment to
make Loans hereunder or in any or all of the Loans or the Notes.  In the event
of any such grant by the Lender of a participating interest to a Financial
Institution, whether or not upon notice to the Borrower, the Lender shall remain
responsible for the performance of its obligations hereunder, and the Lender
shall continue to deal solely and directly with the Borrower in connection with
the Lender's rights and obligations under this Agreement.  Any agreement
pursuant to which the Lender may grant such a participation interest shall
provide that the Lender shall retain the sole right and responsibility to
enforce the obligations of the Borrower hereunder including, without limitation,
the right to approve any amendment, modification or waiver of any provision of
this Agreement; provided that such participation agreement may provide that the
Lender will not agree to any modification, amendment or waiver of this Agreement
which would have the effect increasing or decreasing the Maximum Amount,
extending the Termination Date or the Maturity Date, subjecting the Lender to
any additional obligation, reducing the principal of or rate of interest on any
Loan, or postponing the date fixed for any payment of principal of or interest
on any Loan or fees hereunder or under a Note without the consent of such
Financial Institution.  An assignment or other transfer which is not permitted
by subsection (c) or (d) below shall be given effect for purposes of this
Agreement only to the extent of a participating interest granted in accordance
with this subsection (b).

     (c) At any time, the Lender may assign to one or more Financial
Institutions all, or a proportionate part of all, of the Lender's rights and
obligations under this Agreement and the Notes, and such Financial Institution
shall assume such rights and obligations, pursuant to an instrument executed by
such Financial Institution and the Lender, with (and subject to) the consent of
the Borrower; provided that if such Financial Institution is an Affiliate of the
              --------                                                          
Lender, the Borrower's consent shall not be required.  Upon execution and
delivery of such an instrument and payment by such Financial Institution to the
Lender of an amount equal to the purchase price agreed between the Lender and
such Financial Institution, such Financial Institution shall become a party to
this Agreement and shall have all the rights and obligations of the Lender to
the extent of such Financial Institution's commitment to make Revolving Loans as
set forth in such Financial Institution's instrument of assumption, and the
Lender shall be released from its obligations hereunder to a corresponding
extent, and no further consent or action by any party shall be required.  Upon
the consummation of any assignment pursuant to this subsection (c), the Lender
and the Borrower shall make appropriate arrangements so that, if required, new
Notes are issued to the Financial Institution.  If the Financial Institution is
not incorporated under the laws of the United States of America or a state
thereof, it shall, prior to the first date on which interest or fees are payable
hereunder for its account deliver to the Borrower certification as to exemption
from deduction or withholding of any United States federal income taxes.

                                       32
<PAGE>
 
     (d) The Lender may at any time assign all or any portion of its rights
under this Agreement and the Notes to a Federal Reserve Bank.  No such
assignment shall release the Lender from its obligations hereunder.

     (e) The Lender may furnish any information concerning the Borrower in its
possession from time to time to any Financial Institution which is or may become
a participant or assignee under this Section 9.9 and may furnish such
information in response to credit inquiries consistent with general banking
practice.

     9.10.  Accounting Terms.  All accounting terms used herein which are not
            ----------------                                                 
otherwise expressly defined in this Agreement shall have the meanings
respectively given to them in accordance with GAAP in effect on the date of this
Agreement.  Except as otherwise provided herein, all financial computations made
pursuant to this Agreement shall be made in accordance with GAAP and all balance
sheets and other financial statements shall be prepared in accordance with GAAP.
Except as otherwise provided herein, whenever reference is made in any provision
of this Agreement to a balance sheet or other financial statement or the
information depicted therein for performing a financial computation, such terms
shall mean the most recent consolidated balance sheet or other financial
statement received by the Lender pursuant to the terms hereof.

     9.11.  Consent to Jurisdiction.  The Borrower irrevocably submits to the
            -----------------------                                          
jurisdiction of any State court sitting in Fairfax County, Virginia or the
United States District Court for the Eastern District of Virginia, sitting in
Alexandria, Virginia over any suit, action or proceeding arising out of or
relating to this Agreement.  To the fullest extent it may effectively do so
under applicable law, the Borrower irrevocably waives and agrees not to assert,
by way of motion, as a defense or otherwise, any claim that it is not subject to
the jurisdiction of any such court, any objection that it may now or hereafter
have to the laying of the venue of any such suit, action or proceeding brought
in any such court and any claim that any such suit, action or proceeding brought
in any such court has been brought in an inconvenient forum.

     9.12.  Enforcement of Judgments.  The Borrower agrees, to the fullest
            ------------------------                                      
extent it may effectively do so under applicable law, that a judgment in any
suit, action or proceeding of the nature referred to in Section 9.11 brought in
any such court shall be conclusive and binding upon the Borrower and may be
enforced in the courts of the United States of America or the Commonwealth of
Virginia (or any other courts to the jurisdiction of which the Borrower is or
may be subject) by a suit upon such judgment.

     9.13.  Waiver of Jury Trial.    AS A SPECIFICALLY INDUCED BARGAIN FOR THE
            ---------------------                                             
LENDER TO ENTER INTO THIS AGREEMENT AND TO EXTEND CREDIT TO THE BORROWER, THE
BORROWER AND THE LENDER EACH HEREBY WAIVES TRIAL BY JURY WITH RESPECT TO ANY
ACTION, CLAIM, SUIT OR PROCEEDING IN RESPECT OF OR ARISING OUT OF THIS AGREEMENT
AND/OR THE CONDUCT OF THE RELATIONSHIP BETWEEN THE LENDER AND THE BORROWER.

                                       33
<PAGE>
 
     9.14.  Service of Process.  The Borrower consents to process being served
            ------------------                                                
in any suit, action or proceeding of the nature referred to in Section 9.11 by
mailing a copy thereof by registered or certified mail postage prepaid, return
receipt requested, to the Borrower's address specified in or designated pursuant
to Section 9.3.  The Borrower agrees that such service (i) shall be deemed in
every respect effective service of process upon the Borrower in any such suit,
action or proceeding and (ii) shall, to the fullest extent permitted by law, be
taken and held to be valid personal service upon and personal delivery to the
Borrower.

     9.15.  No Limitation on Service or Suit.  Nothing in this Section 9 shall
            --------------------------------                                  
affect the right of the Lender to serve process in any manner permitted by law,
or limit any right that the Lender may have to bring proceedings against the
Borrower in the courts of any jurisdiction or to enforce in any lawful manner a
judgment obtained in one jurisdiction in any other jurisdiction.

     9.16.  Indemnification.  At all times prior to and after the consummation
            ---------------                                                   
of the transactions contemplated by this Agreement, the Borrower will indemnify
and hold each Indemnitee harmless from and against all losses, damages, claims,
fines, costs and expenses (including, without limitation, reasonable attorneys'
fees, costs and expenses) incurred by any such Indemnitee, whether direct or
indirect, as a result of or arising from or relating to any Proceedings by any
Person, whether threatened or initiated, asserting a claim for any legal or
equitable remedy against any Indemnitee arising from or in connection with this
Agreement, the Notes or any of the other Loan Documents, and any of the
transactions contemplated herein or therein, except to the extent such losses,
damages, claims, fines, costs or expenses are due to the willful misconduct or
gross negligence of the Lender; provided that in connection with such
indemnification obligations, the Borrower shall not be liable for any settlement
effected by any Indemnitee without the Borrower's prior consent (which the
Borrower shall not unreasonably withhold, delay or condition) and the Borrower
shall have the right to participate at its sole cost and expense in the defense
of any proceeding for which such indemnification may be sought.  In the event of
any Proceeding, the Lender shall promptly and as soon as is practicable notify
the Borrower of the existence of such Proceeding, provided that the Lender's
failure to do so shall not preclude any Indemnitee from seeking indemnification
hereunder.  At the request of the Lender, the Borrower will indemnify any Person
to whom the Lender transfers or sells all or any portion of its interest in the
Loans or participations therein on the terms set forth above.  The obligations
of the Borrower under this Section 9.16 shall survive the termination of this
Agreement and payment of the Obligations.

     9.17.  No Partnership, Joint Venture or Agency.  Neither this Agreement nor
            ---------------------------------------                             
any of the Loan Documents shall in any respect be interpreted, deemed or
construed as making the Lender a partner or joint venturer with the Borrower,
nor shall they be interpreted, deemed or construed as making the Lender the
agent of representative of the Borrower, and the Borrower agrees not to make any
contrary assertion, contention, claim or counterclaim in any action, suit or
other legal proceeding involving the Lender.

                                       34
<PAGE>
 
     9.18.  Time of Essence.  Time is of the essence of each provision of this
            ---------------                                                   
Agreement and each provision of each other Loan Document.

     9.19.  Interpretation.
            -------------- 

     (a) This Agreement and the rights and obligations of the parties hereunder
shall be construed and interpreted in accordance with the laws of the
Commonwealth of Virginia, excluding principles of conflict of laws.

     (b) The Lender hereby acknowledges and agrees that this Agreement shall be
subject to and interpreted in accordance with all applicable legal, regulatory
and contractual obligations of the Borrower with respect to the security,
privacy or nondisclosure of certain information regarding the business of the
Borrower.  By way of example and not limitation, the Lender acknowledges and
agrees that the Borrower may be prohibited from (i) disclosing the location of
certain information with respect to certain Accounts Receivable or (ii)
providing access to certain books and records. The Lender hereby agrees that the
compliance of the Borrower with such legal, regulatory and contractual
obligations shall not give rise to an Event of Default hereunder, even if such
compliance conflicts with the representations, warranties, covenants, agreements
and conditions set forth herein.

     IN WITNESS WHEREOF, the Borrower and the Lender have caused this Agreement
to be signed by their duly authorized representatives all as of the day and year
first above written, with the specific intention that this Agreement constitute
a document under seal.

                              BORROWER:

                              TEMPLATE SOFTWARE, INC., a Virginia 
                              corporation


ATTEST:                       By:  /s/ Kimberly Osgood
                                   -------------------------------
                              Name: Kimberly Osgood
                                    ------------------------------
Andrew B. Ferrentino          Title:  CFO
------------------------              ----------------------------
Secretary
[corporate seal]

                                       35
<PAGE>
 
                              LENDER:

                              FIRST UNION NATIONAL BANK, a
                              national banking association


                              By:  /s/ Kerry S. Teutschbein
                                   -----------------------------
                                    Kerry S. Teutschbein
                                    Assistant Vice President

                                       36
<PAGE>
 
                                                                       EXHIBIT A



                        FORM OF COMPLIANCE CERTIFICATE