<PAGE>


                                                                    EXHIBIT 10.4

                                  IMX, INC.

                  SERIES B PREFERRED STOCK PURCHASE AGREEMENT

     This Agreement is made as of August 12, 1997 among IMX, Inc., a Delaware
 corporation, with a principal place of business at 111 Deerwood Road, Suite
 220, San Ramon, California 94583 (the "Company"), and the persons and entities
 listed on the Schedule of Purchasers attached hereto as Exhibit A (the
 "Purchasers").

                                   SECTION I

                   Authorization and Sale of Preferred Stock
                   -----------------------------------------

1.1  Authorization.  The Company will authorize the sale and issuance of
     -------------
4,970,179 shares (the "Shares") of its Series B Preferred Stock (the
"Preferred"), at the price of $1.2072 per share, having the rights, preferences,
privileges and restrictions as set forth in the Amended and Restated Certificate
of Incorporation (the "Restated Certificate") in the form attached to this
Agreement as Exhibit B .

     1.2  Sale of Preferred.  Subject to the terms and conditions hereof, the
          -----------------
Company will issue and sell to each of the Purchasers at the Closing (as defined
below), and the Purchasers will severally buy from the Company at the Closing,
the total number of shares of Preferred specified opposite such Purchaser's name
on the Schedule of Purchasers, at the aggregate purchase price set forth on the
Schedule of Purchasers. The Company's agreements with each of the Purchasers are
separate agreements, and the sales of the Preferred to each of the Purchasers
are separate sales.

                                  SECTION II

                              Closings; Delivery
                              ------------------

2.1  Closing.  The closing of the purchase and sale of the Shares being issued
     -------
and sold hereunder shall be held at the offices of Gray Cary Ware & Freidenrich,
A Professional Corporation, 400 Hamilton Avenue, Palo Alto, CA 94301 at 10:00
a.m., local time, on August 12, 1997 (the "Closing") or at such other time and
place upon which the Company and the Purchasers shall agree (the date of the
Closing is hereinafter referred to as the "Closing Date").

     2.2  Delivery.  At the Closing, the Company shall deliver to each Purchaser
          --------
a certificate or certificates, registered in such Purchaser's name set forth on
the Schedule of Purchasers, representing the number of Shares designated on the
Schedule of Purchasers to be purchased by such Purchaser, against payment of the
purchase price therefor, by cancellation of indebtedness, check payable to the
Company or wire transfer per the Company's instructions, or a combination
thereof.
<PAGE>

                                  SECTION III

                 Representations and Warranties of the Company
                 ---------------------------------------------

     Except as set forth on Exhibit C attached hereto, the Company represents
and warrants to the Purchasers as follows:

     3.1  Organization and Standing; Certificate and Bylaws.  The Company is a
          -------------------------------------------------
corporation duly organized and existing under, and by virtue of, the laws of the
State of Delaware and is in good standing under such laws.  The Company has
requisite corporate power and authority to own and operate its properties and
assets, and to carry on its business as currently conducted and as proposed to
be conducted.  The Company is not currently qualified to do business as a
foreign corporation in any jurisdiction, and the failure to be so qualified will
not have a material adverse affect on the Company's business as now conducted.
The Company has furnished the Purchasers' special counsel with true and complete
copies of its Certificate of Incorporation and Bylaws, as amended to date.

     3.2  Corporate Power.  The Company has all requisite corporate power and
          ---------------
authority to execute and deliver this Agreement, the Amended and Restated
Investor Rights Agreement in substantially the form attached hereto as Exhibit D
(the "Rights Agreement"), the Voting Agreement in substantially the form
attached hereto as Exhibit E (the "Voting Agreement"), to sell and issue the
Shares hereunder, to issue the Common Stock of the Company (the "Common Stock")
issuable upon conversion of the Shares, and to carry out and perform all of its
obligations under the terms of this Agreement, the Rights Agreement, the Voting
Agreement and the Certificate of Incorporation and to carry on its business as
presently conducted and as presently proposed to be conducted, and such other
agreements and instruments.

     3.3  Capitalization.  The authorized capital stock of the Company consists,
          --------------
or will, upon the filing of the Restated Certificate, consist, of 15,802,605
shares of Common Stock, of which 2,676,900 shares will be issued and outstanding
immediately prior to the Closing, and 9,197,395 shares of Preferred Stock, of
which 4,216,216 shares have been designated "Series A Preferred Stock" and
4,981,179 shares have been designated "Series B Preferred Stock."  Immediately
prior to the Closing, 4,216,216 shares of Series A Preferred Stock and no shares
of Series B Preferred Stock will be issued and outstanding.  All outstanding
shares of Common Stock have been duly authorized and validly issued, are fully
paid and nonassessable, were issued in compliance with all federal and state
securities laws, and were not issued in violation of any preemptive rights.
There are no authorized or outstanding subscription, warrant, option or other
rights or commitments (including, without limitation, preemptive rights or
rights of first refusal) to purchase or acquire from the Company any shares of
any class of capital stock of the Company or securities convertible into or
exchangeable for such capital stock.

     3.4  Authorization.  All corporate action on the part of the Company, its
          -------------
directors and shareholders necessary for the authorization, execution, delivery
and performance of this Agreement, the Rights Agreement and the Voting Agreement
by the Company, the authorization, sale, issuance and delivery of the Shares and
the Common Stock issuable upon conversion of the Shares and the performance of
all of the Company's obligations hereunder and thereunder has been taken or will
be taken prior to the Closing.  Each of this Agreement, the Rights Agreement
<PAGE>

and the Voting Agreement, when each is executed and delivered by the Company,
shall constitute a valid and binding obligation of the Company, enforceable in
accordance with its terms, except as the indemnification provisions of Section
5.7 of the Rights Agreement may be limited by principles of public policy, and
subject to laws of general application relating to bankruptcy, insolvency and
the relief of debtors and rules of law governing specific performance,
injunctive relief of other equitable remedies. The Shares, when issued in
compliance with the provisions of this Agreement, will be validly issued, fully
paid and nonassessable, and will have the rights, preferences, privileges and
restrictions described in the Restated Certificate. The Common Stock issuable
upon conversion of the Shares has been duly and validly reserved and, when
issued in compliance with the provisions of this Agreement and the Restated
Certificate will be validly issued, fully paid and nonassessable. The issuance
and delivery of the Shares and such Common Stock issuable upon conversion
thereof, as applicable, is not subject to any preemptive or other similar rights
or any liens or encumbrances that have not been waived or complied with;
provided, however, that the Shares, and such Common Stock issuable upon
conversion thereof, as applicable, may be subject to restrictions on transfer
under state and/or federal securities laws as set forth herein or in the Rights
Agreement.

     3.5  Financial Statements.  The Company has delivered to each Purchaser its
          --------------------
balance sheet as of June 30, 1997 and statements of income, stockholders' equity
and cash flows for the period then ended (collectively, the "Financial
Statements").  Except as set forth in the Financial Statements, the Company has
no liabilities of any nature (matured or unmatured, fixed or contingent), other
than (x) liabilities incurred in the ordinary course of business subsequent to
June 30, 1997 and (y) obligations under contracts and commitments incurred in
the ordinary course of business which, individually or in the aggregate, are not
material to the financial condition or operating results of the Company.

     3.6  Business Condition.  Since June 30, 1997, the Company has not:
          ------------------

          (a) incurred any absolute or contingent material obligation by way of
guaranty, endorsement, indemnity or warranty;

          (b) suffered any damage, destruction or loss, whether or not covered
by insurance, to any of its material assets;

          (c) waived or compromised a material right or debt owed to it;

          (d) made any loan to its employees, officers or directors, other than
travel advances made in the ordinary course of business;

          (e) entered into any contract or other arrangement relating to
compensation of the Company's employees, officers or directors;

          (f) declared or paid any dividend or other distribution of the assets
of the Company;

          (g) redeemed, repurchased, canceled, granted or issued or effected any
other change to any of the capital stock of the Company or options to purchase
the same; or
<PAGE>

          (h) entered into any agreement obligating the Company to make payments
exceeding $50,000 in any fiscal year.

     3.7  Compliance with Other Instruments: No Conflicts.  The Company is not
          -----------------------------------------------
in breach or violation of any term of its Certificate of Incorporation or
Bylaws, of any term or provision of any contract, agreement, instrument,
judgment or decree, or any order, statute, rule or regulation, in each case
where such breach or violation would have a material adverse effect on the
Company. The execution, delivery and performance of and compliance with this
Agreement, the Rights Agreement and the Voting Agreement and the issuance, sale
and delivery of the Shares and the Common Stock issuable upon conversion of the
Shares will not result in any such breach or violation.

     3.8  Litigation, etc.  There is no action, proceeding or investigation
          ---------------
pending, or to the best of the Company's knowledge threatened, against the
Company or any of its properties or assets or that questions the validity of
this Agreement, the Rights Agreement or the Voting Agreement, or any action
taken or to be taken in connection herewith. The foregoing includes, without
limitation, actions involving the prior employment of any of the Company's
employees, their use in connection with the Company's business of any
information or techniques allegedly proprietary to any of their former
employers, or their obligations under any agreements with prior employers. The
Company is not a party or subject to the provisions of any order, writ,
injunction, judgment or decree of any court or government agency or
instrumentality. No action, suit or proceeding has been instituted or is
threatened by the Company.

     3.9  Intangible Property.  The Company owns, or has the right to use (or
          -------------------
can obtain the right to use on reasonable commercial terms), all patents,
trademarks, service marks, names, trade names, copyrights, licenses, trade
secrets or other proprietary rights necessary to its business as now conducted,
and has not received any written notice that it is infringing upon or otherwise
acting adversely to the right or claimed right of any person under or with
respect to any of the foregoing, and to the Company's knowledge there is no
basis for any such claim.  There are no outstanding options, licenses or
agreements of any kind relating to the foregoing, nor is the Company bound by or
a party to any options, licenses or agreements of any kind with respect to the
patents, trademarks, service marks, trade names, copyrights, trade secrets,
licenses, information and other proprietary rights and process of any other
person or entity other than such licenses or agreements arising from the
purchase of "off the shelf" or standard products.  The Company has not received
any communication alleging that the Company has violated any third party's
patent, maskwork right, moral right, trademark, trade secret, trade name or
copyright.  To the Company's knowledge, none of the Company's offices or
employees has improperly used or is making improper use of any confidential
information or trade secrets of others, including those of any former employer
of such officer or employee.  The Company is not aware of any violation by a
third party of any of its patents, licenses, trademarks, trade names, service
marks, copyrights, trade secrets or other proprietary rights.

     3.10 Securities Laws; Governmental Consent.  Based in part on the accuracy
          -------------------------------------
of the Purchasers' representations and warranties set forth in Section 4, the
offer, sale and issuance of the Shares as provided in this Agreement are exempt
from the registration and prospectus delivery requirements of the Securities Act
of 1933, as amended (the "Securities Act"), and have been qualified (or are
exempt from qualification) under all applicable state securities
<PAGE>

qualification requirements. Except for the filing of the Restated Certificate
and except for the filing of notices required or permitted to be filed after the
Closing Date with certain United States federal and state securities
commissions, which notices the Company will file on a timely basis, no consent,
approval or authorization of, or designation, declaration or filing with, any
governmental authority on the part of the Company is required in connection with
the valid execution, delivery and performance of this Agreement, the Rights
Agreement or the Voting Agreement, the offer, sale or issuance of the Shares
(and the issuance of the Common Stock issuable upon conversion of the Shares) or
the consummation of any other transaction contemplated hereby, or by the Rights
Agreement or the Voting Agreement.

     3.11 Contracts and Other Commitments.  The Company is not a party to or in
          -------------------------------
breach of any:

          (a) agreement for the purchase of assets that involves an expenditure
by the Company in excess of $50,000;

          (b) indenture, loan or credit agreement, security agreement,
promissory note or other agreement or instrument relating to or evidencing
indebtedness for borrowed money in excess of $50,000;

          (c) lease or other agreement under which the Company is lessee of or
holds or operates any property, real or personal, owned by any other person
under which payments to such person exceed $50,000 per year;

          (d) license agreement, either as licensor or licensee, that is
material to the Company's business; or

          (e) other agreement under which the Company is obligated to make
payments exceeding $50,000 or which could result in the loss by the Company of
any rights that are material to the conduct of its business.

     3.12 Registration Rights.  Except as provided in the Rights Agreement, the
          -------------------
Company has not granted or agreed to grant to any person or entity any rights
(including piggyback registration rights) to have any securities of the Company
registered with the United States Securities and Exchange Commission ("SEC") or
any other governmental authority.

     3.13 Minute Books.  The minute books of the Company provided to special
          ------------
counsel to the Purchasers contain a complete summary of all meetings, consents
and actions of the board of directors and the shareholders of the Company since
the time of its incorporation, accurately reflecting all transactions referred
to in such minutes in all material respects.

     3.14 Title to Property and Assets.  The Company owns its material
          ----------------------------
properties and assets free and clear of all mortgages, deeds of trust, liens,
encumbrances, security interests and claims except for statutory liens for the
payment of current taxes that are not yet delinquent and liens, encumbrances and
security interests which arise in the ordinary course of business and which do
not affect the Company's rights to use and possess such properties and assets.
With respect to the property and assets it leases, the Company is in compliance
with such leases and, to the best of the Company's knowledge, the Company holds
valid leasehold interests in such
<PAGE>

assets free of any liens, encumbrances, security interests or claims of any
party other than the lessors of such property and assets.

     3.15 Labor Agreements and Actions.  The Company is not bound by or subject
          ----------------------------
to any contract, commitment or arrangement with any labor union, and to the
Company's best knowledge, no labor union has requested, sought or attempted to
represent any employees, representatives or agents of the Company.  There is no
strike or other labor dispute involving the Company pending nor, to the
Company's best knowledge, threatened, nor is the Company aware of any labor
organization activity involving its employees.  The Company is not aware that
any officer or employee intends to terminate their employment with the Company,
nor does the Company have any present intention to terminate the employment of
any of its officers or employees.

     3.16 Interested Party Transactions.  To the best knowledge of the Company,
          -----------------------------
no officer or director of the Company or any "affiliate" or "associate" (as
those terms are defined in Rule 405 promulgated under the Securities Act) of any
such person has, either directly or indirectly, a material interest in: (i) any
person or entity which purchases from or sells, licenses or furnishes to the
Company any goods, property, technology, intellectual or other property rights
or services; or (ii) any contract or agreement to which the Company is a party
or by which it may be bound or affected.

     3.17 Stock Restriction Agreements.  The Company has furnished to special
          ----------------------------
counsel to the Purchasers true and complete copies of all stock restriction or
other agreements pursuant to which shares of the Company's Common Stock have
been issued.

     3.18 Invention Assignment and Confidentiality Agreement.  Each current and
          --------------------------------------------------
former employee and contractor of the Company has entered into and executed an
Invention Assignment and Confidentiality Agreement in the form attached to this
Agreement as Exhibit G or an employment or consulting agreement containing
substantially similar terms.  No such employee or contractor has excluded works
or inventions from his or her assignment of inventions to such employee or
contractor's Invention Assignment and Confidentiality Agreement.

     3.19 Disclosure.  The Company has fully provided the Purchasers with all
          ----------
the information the Purchasers have requested for deciding whether to purchase
the Shares. This Agreement and the Exhibits hereto (when read together) do not
contain any untrue statement of a material fact and do not omit to state a
material fact necessary to make the statements therein or herein not misleading.

     3.20 No Breach by Employee.  The Company is not aware that any employee or
          ---------------------
consultant of the Company is obligated under any agreement (including licenses,
covenants or commitments of any nature) or subject to any judgment, decree or
order of any court or administrative agency, or any other restriction relating
to the relationship of any such employee or consultant with the Company or any
prior employer that would interfere with the use of his or her best efforts to
carry out his or her duties for the Company or to promote the interests of the
Company or that would conflict with the Company's business as proposed to be
conducted.  Neither the execution nor delivery of this Agreement, the Rights
Agreement or the Voting
<PAGE>

Agreement, nor the carrying on of the Company's business by the employees and
contractors of the Company and the conduct of the Company's business as
presently proposed will not, to the best of the Company's knowledge, conflict
with or result in a breach of the terms, conditions or provisions of, or
constitute a default under, any contract, covenant or instrument under which any
of such employees or contractors or the Company is now obligated. The Company
does not believe it is or will be necessary to utilize any inventions of any
employees of the Company (or persons the Company currently intends to hire) made
prior to their employment by the Company.

     3.21 Subsidiaries.  The Company does not presently own or control, directly
          ------------
or indirectly, any interest in any other corporation, association, or other
business entity.  The Company is not a participant in any joint venture,
partnership, or similar arrangement.

     3.22 Tax Returns, Payments and Elections.  The Company has filed all tax
          -----------------------------------
returns and reports as required by law.  These returns and reports are true and
correct in all material respects.  The Company has paid all taxes and other
assessments due, except those contested by it in good faith that are set forth
on Exhibit C hereto.  The Company has not elected pursuant to the Internal
Revenue Code of 1986, as amended (the "Code"), to be treated as a Subchapter S
corporation or a collapsible corporation pursuant to Section 1362(a) and Section
341(f) of the Code, respectively, nor has it made any other elections pursuant
to the Code (other than elections that relate solely to methods of accounting,
depreciation or amortization) that would have a material effect on the Company,
its financial condition, its business as presently conducted or proposed to be
conducted or any of its properties or material assets.  The Company has never
had any tax deficiency proposed or assessed against it and has not executed any
waiver of any statute of limitations on the assessment or collection of any tax
or governmental charge.  None of the Company's federal income tax returns and
none of its state income or franchise tax or sales or use tax returns has ever
been audited by governmental authorities.  Since inception, the Company has made
adequate provisions on its books of account for all taxes, assessments and
governmental charges with respect to its business, properties and operations.
The Company has withheld or collected from each payment made to each of its
employees, the amount of all taxes (including, but not limited to, federal
income taxes, Federal Insurance Contribution Act taxes and Federal Unemployment
Tax Act taxes) required to be withheld or collected therefrom, and has paid the
same to the proper tax receiving officers or authorized depositories.

     3.23 Insurance.  The Company has in full force and effect fire, casualty
          ---------
and liability insurance policies, with extended coverage, sufficient in amount
(subject to reasonable deductibles) to allow it to replace any of its properties
that might be damaged or destroyed and adequate to protect the Company and its
financial condition against the risks involved in the business of the Company.

     3.24 Marketing Rights.  The Company has not granted rights to license,
          ----------------
market, or sell its products to any other person and is not bound by any
agreement that affects the Company's exclusive right to develop, distribute,
market, or sell its products.
<PAGE>

                                  SECTION IV

               Representations and Warranties of the Purchasers
               ------------------------------------------------

     Each Purchaser hereby severally represents and warrants to the Company with
respect to the purchase of Shares as follows:

     4.1  Investment Experience.  It is aware of the Company's business affairs
          ---------------------
and financial condition and has acquired sufficient information about the
Company to reach an informed and knowledgeable decision to acquire the Shares
and the underlying Common Stock.  Such Purchaser:  (i) has experience as an
investor in securities of companies in the development stage and acknowledges
that such Purchaser is able to fend for itself, can bear the economic risk of
such Purchaser's investment in the Shares and has such knowledge and experience
in financial or business matters that such Purchaser is capable of evaluating
the merits and risks of this investment in the Shares and protecting its own
interests in connection with this investment and/or (ii) has a preexisting
personal or business relationship with the Company and certain of its officers,
director or controlling persons of a nature and duration that enables such
Purchaser to be aware of the character, business acumen and financial
circumstances of such persons.  Such Purchaser is an "accredited investor"
within the meaning of Regulation D promulgated under the Securities Act.

     4.2  Investment intent.  It is acquiring the Shares and the underlying
          -----------------
Common Stock for investment only for its own account, and not with the view to,
or for resale in connection with, any distribution thereof.  It understands that
the issuances of the Shares and the underlying Common Stock to such Purchaser
have not been, and will not be, registered under the Securities Act by reason of
a specific exemption from the registration provisions of the Securities Act, the
availability of which depends upon, among other things, the bona fide nature of
the investment intent of such Purchaser as expressed herein.

     4.3  Rule 144.  It acknowledges that the Shares and the underlying Common
          --------
Stock must be held indefinitely unless subsequently registered under the
Securities Act or unless an exemption from such registration is available.  It
is aware of the provisions of Rule 144 promulgated under the Securities Act
which permit limited resale of shares purchased in a private placement subject
to the satisfaction of certain conditions, including, among other things, the
existence of a public market for the shares, the availability of certain current
public information about the Company, the resale occurring not less than one
year after the security was last held by the Company or an affiliate of the
Company, the sale being effected through a "broker's transaction" or in
transactions directly with a "market maker" and the number of shares being sold
during any three-month period not exceeding specified limitations.

     4.4  No Public Market.  It understands that no public market now exists for
          ----------------
any of the securities issued by the Company, and that the Company has made no
assurances that a public market will ever exist for the Company's securities.

     4.5  Access to Data.  It has had an opportunity to discuss the Company's
          --------------
business, management and financial affairs with the Company's management.  It
understands that such discussions, as well as any written information issued by
the Company, were intended to describe certain aspects of the Company's business
and prospects which the Company believes
<PAGE>

to be material, but were not a thorough or exhaustive description, except as set
forth in Section 3 hereof. The foregoing, however, does not limit or modify the
representations and warranties made by the Company in Section 3.

     4.6  Authorization.  Each of this Agreement, the Rights Agreement and the
          -------------
Voting Agreement when executed and delivered by such Purchaser will constitute a
valid and legally binding obligation of the Purchaser, enforceable in accordance
with its terms, except as the indemnification provisions of Section 5.7 of the
Rights Agreement may be limited by principles of public policy, and subject to
laws of general application relating to bankruptcy, insolvency and the relief of
debtors and rules of law governing specific performance, injunctive relief or
other equitable remedies.

     4.7  Legends.  It is understood that the certificates evidencing the Shares
          -------
may bear one or all of the following legends:

          (a) "THESE SECURITIES HAVE NOT BEEN REGISTERED UNDER THE SECURITIES
ACT OF 1933, AS AMENDED.  THEY MAY NOT BE SOLD, OFFERED FOR SALE, PLEDGED OR
HYPOTHECATED IN THE ABSENCE OF A REGISTRATION STATEMENT IN EFFECT WITH RESPECT
TO THE SECURITIES UNDER SUCH ACT OR AN OPINION OF COUNSEL SATISFACTORY TO THE
COMPANY THAT SUCH REGISTRATION IS NOT REQUIRED OR UNLESS SOLD PURSUANT TO RULE
144 OR RULE 144A OF SUCH ACT. THESE SECURITIES ARE SUBJECT TO RESTRICTIONS ON
TRANSFER FOLLOWING AN INITIAL PUBLIC OFFERING PURSUANT TO AN AGREEMENT BETWEEN
THE HOLDERS OF THESE SECURITIES AND THE COMPANY."

          (b) Any legend required by the laws of the State of California,
including any legend required by the California Department of Corporations and
Sections 417 and 418 of the California Corporations Code.

     4.8  California Corporate Securities Law.  THE SALE OF THE SECURITIES THAT
          -----------------------------------
ARE THE SUBJECT OF THIS AGREEMENT HAS NOT BEEN QUALIFIED WITH THE COMMISSIONER
OF CORPORATIONS OF THE STATE OF CALIFORNIA AND THE ISSUANCE OF SUCH SECURITIES
OR THE PAYMENT OR RECEIPT OF ANY PART OF THE CONSIDERATION FOR SUCH SECURITIES
PRIOR TO SUCH QUALIFICATION IS UNLAWFUL, UNLESS THE SALE OF SECURITIES IS EXEMPT
FROM QUALIFICATION BY SECTION 25100, 25102 OR 25105 OF THE CALIFORNIA
CORPORATIONS CODE.  THE RIGHTS OF ALL PARTIES TO THIS AGREEMENT ARE EXPRESSLY
CONDITIONED UPON SUCH QUALIFICATION BEING OBTAINED, UNLESS THE SALE IS EXEMPT.
<PAGE>

                                   SECTION V

                             Conditions to Closing
                             ---------------------

     5.1  Conditions to the Purchasers' and the Company's Obligations.  The
          -----------------------------------------------------------
obligations of a Purchaser to purchase and of the Company to issue and sell the
Shares are subject to the fulfillment, on or prior to the Closing, of all of the
following conditions, any of which may be waived in whole or in part by mutual
agreement of such Purchaser and the Company:

          (a) The Company shall have obtained all consents, permits and waivers
necessary or appropriate on the part of the Company for consummation of the
transactions contemplated by this Agreement, the Rights Agreement and the Voting
Agreement at such Closing.  Except for the notices required to be filed after
such Closing with certain federal and state securities commissions, which
notices the Company will file on a timely basis, the Company shall have obtained
all approvals of any federal or state governmental authority or regulatory body
that are required on the part of the Company in connection with the lawful sale
and issuance of the Shares and the Common Stock issuable upon conversion of the
Shares at such Closing.

          (b) At such Closing, the purchase of the Shares by the Purchasers
hereunder shall be legally permitted by all laws and regulations to which the
Purchasers or the Company is subject.

          (c) The Restated Certificate shall have been filed with and accepted
by the Secretary of State of the State of Delaware.

          (d) The Company and the Purchasers shall have entered into the Rights
Agreement and the Voting Agreement.

     5.2  Additional Conditions to the Purchasers' Obligations. In addition to
          ----------------------------------------------------
the conditions set forth in Section 5.1 hereof, each Purchaser's obligation to
purchase the Shares is subject to the fulfillment, on or prior to the Closing,
of all of the following conditions (except as otherwise provided below), any of
which may be waived in whole or in part by such Purchaser:

          (a) The representations and warranties made by the Company in Section
3 hereof shall be true and correct when made, and shall be true and correct as
of the Closing with the same force and effect as if they had been made on and as
of the Closing.

          (b) The Company shall have performed all obligations and conditions
herein or in the Rights Agreement required to be performed or observed by it on
or prior to the Closing.

          (c) The Purchasers shall have received from Gray Cary Ware &
Freidenrich, A Professional Corporation, counsel to the Company, an opinion
letter addressed to them, dated such Closing Date and in substantially the form
attached hereto as Exhibit F.

          (d) The Voting Agreement and the Rights Agreement shall have been
executed by the parties thereto (other than the Purchasers).
<PAGE>

          (e) The Company shall have delivered to the Purchasers a certificate,
executed by the President of the Company and dated the Closing Date, certifying
to the fulfillment of the conditions specified in Sections 5.1(a), and 5.2(b)
and that there has been no materially adverse change in the business, affairs,
prospects, operations, properties, assets or condition of the Company since June
30, 1997.

          (f) All corporate and other proceedings in connection with the
transactions contemplated at the Closing and all documents incident thereto
shall be reasonably satisfactory in form and substance to each Purchaser and to
the Purchasers' special counsel, and they shall each have received all such
counterpart originals and certified or other copies of such documents as they
may reasonably request.  Such documents shall include (but not be limited to)
the following:

              (i)    A copy of the Restated Certificate and the Bylaws of the
Company (as amended through the date of such Closing), certified by the
Secretary of the Company as true and correct copies thereof as of such Closing.

              (ii)   A certificate of the Secretary or an Assistant Secretary or
other officer of the Company certifying the names of the officers of the Company
authorized to sign this Agreement, the certificates for the Shares and the other
documents, instruments or certificates to be delivered pursuant to this
Agreement by the Company or any of its officers, together with the true
signatures of such officers.

              (iii)  A copy of the resolutions of the Board of Directors and, if
required, the stockholders of the Company evidencing the amendment to the
Company's Certificate of Incorporation providing for the authorization of the
Shares, the approval of this Agreement, the Rights Agreement, the Voting
Agreement and the issuance of the Shares and the other matters contemplated
hereby.

              (iv)   Good standing certificates issued by the Delaware Secretary
of State dated within ten (10) days of the Closing.

          (g) The Board of Directors shall at the Closing consist of Stephen  K.
Fraser, Mark Korell, John Hummer and Derek Proudian.  In accordance with the
Voting Agreement, one (1) additional director shall be designated by the
unanimous consent of the other four (4) directors as soon as practicable after
the Closing.  After the Closing, the directors shall be elected and removed
pursuant to the Restated Certificate and the Voting Agreement.

     5.3  Additional Condition to Obligations of the Company.  In addition to
          --------------------------------------------------
the conditions set forth in Section 5.1 hereof, the Company's obligation to
issue and sell the Shares to each Purchaser is subject to the fulfillment to the
Company's satisfaction, on or prior to the Closing, of the following conditions,
any of which may be waived in whole or in part by the Company:

          (a) The representations and warranties made by such Purchaser in
Section 4 hereof shall be true and correct when made, and shall be true and
correct as of such Closing with the same force and effect as if they had been
made on and as of the Closing.
<PAGE>

          (b) Such Purchaser shall have performed all obligations and conditions
herein or in the Rights Agreement required to be performed or observed by it on
or prior to the Closing.

          (c) Such Purchaser shall have paid the consideration for the Shares to
be sold to such Purchaser as set forth on Exhibit A hereto.

                                  SECTION VI

                                 Miscellaneous
                                 --------------

6.1  Governing Law.  This Agreement shall be governed in all respects by the
     -------------
laws of the State of California as such laws are applied to agreements between
California residents entered into and to be performed entirely within
California.

     6.2  Survival.  The representations, warranties, covenants and agreements
          --------
made herein shall survive any investigation made by the Purchaser and the
closing of the transactions contemplated hereby. All statements as to factual
matters contained in any certificate or other instrument delivered by or on
behalf of the Company pursuant hereto or in connection with the transactions
contemplated hereby shall be deemed to be representations and warranties by the
Company hereunder as of the date of such certificate or instrument.

     6.3  Successors and Assigns.  Except as otherwise expressly provided
          ----------------------
herein, the provisions hereof shall inure to the benefit of, and be binding
upon, the successors, assigns, heirs, executors and administrators of the
parties hereto, provided, however, that the rights of the Purchaser to purchase
Preferred shall not be assignable without the written consent of the Company.

     6.4  Entire Agreement; Amendment.  This Agreement and the other documents
          ---------------------------
delivered pursuant hereto constitute the full and entire understanding and
agreement between the parties with regard to the subjects hereof. Neither this
Agreement nor any provision hereof may be amended, changed, waived, discharged
or terminated other than by a written instrument signed by the party against who
enforcement of any such amendment, change, waiver, discharge or termination is
sought; provided, however, that holders of more than fifty percent (50%) of the
outstanding Shares (or Common Stock issued upon conversion of the Shares or a
combination thereof) may waive or amend, with the Company's written consent, on
behalf of all Purchasers and other holders of Shares, any provisions hereof
benefiting the Purchasers (other than the provisions of Sections 5.1 and 5.2) so
long as the effect thereof will be that all such Purchasers and other holders of
Shares will be treated equally.

     6.5  Notices. etc.  All notices and other communications required or
          ------------
permitted hereunder shall be in writing and shall be deemed effectively given
upon personal delivery to the party to be notified twenty-four (24) hours after
confirmed transmission of a facsimile, one business day after deposit with a
recognized overnight courier and four business days after deposit in the U.S.
mail, certified or registered, return receipt requested, addressed (a) if to a
Purchaser, at the address set forth on Exhibit A or at such other address as
such Purchaser shall have furnished the Company in writing, with a copy to
Gordon K. Davidson, Esq., Fenwick &
<PAGE>

West LLP, Two Palo Alto Square, Palo Alto, California 94306, or (b) if to the
Company, at its address set forth at the beginning of this Agreement, or at such
other address as the Company shall have furnished to the Purchaser in writing,
with a copy to Gregory M. Gallo, Esq., Gray Cary Ware & Freidenrich, A
Professional Corporation, 400 Hamilton Avenue, Palo Alto, California 94301.

     6.6  Severability.  If any provision of this Agreement shall be judicially
          ------------
determined to be invalid, illegal or unenforceable, the validity, legality and
enforceability of the remaining provisions shall not in any way be affected or
impaired thereby.

     6.7  Finder's Fees.
          -------------

          (a) Except as set forth on Exhibit C hereto, the Company (i)
represents and warrants that it has retained no finder or broker in connection
with the transactions contemplated by this Agreement and (ii) hereby agrees to
indemnify and to hold the Purchasers harmless of and from any liability for any
commission or compensation in the nature of a finder's fee to any broker or
other person or firm (and the costs and expenses of defending against such
liability or asserted liability) for which the Company, or any of its employees
or representatives, is responsible.

          (b) Each Purchaser (i) represents and warrants that it has retained no
finder or broker in connection with the transactions contemplated by this
Agreement and (ii) hereby agrees to indemnify and to hold the Company and the
other Purchasers harmless of and from any liability for any commission or
compensation in the nature of a finder's fee to any broker or other person or
firm (and the costs and expenses of defending against such liability or asserted
liability) for which such Purchaser, or any of its employees or representatives,
is responsible.

     6.8  Titles and Subtitles.  The titles of the Certificate and Sections of
          --------------------
this Agreement are for convenience of reference only and are not to be
considered in construing this Agreement.

     6.9  Counterparts.  This Agreement may be executed in any number of
          ------------
counterparts, each of which shall be an original, but all of which together
shall constitute one instrument.

     6.10 Delays or Omissions.  It is agreed that no delay or omission to
          -------------------
exercise any right, power or remedy accruing to any party upon any breach or
default of any other party under this Agreement shall impair any such right,
power or remedy, nor shall it be construed to be a waiver of any such breach or
default, or any acquiescence therein, or of any similar breach or default
thereafter occurring; nor shall any waiver of any single breach or default be
deemed a waiver of any other breach or default theretofore or thereafter
occurring.  It is further agreed that any waiver, permit, consent or approval of
any kind or character of any breach or default under this Agreement, or any
waiver of any provisions or conditions of this Agreement must be in writing and
shall be effective only to the extent specifically set forth in writing, and
that all remedies, either under this Agreement, by law or otherwise, shall be
cumulative and not alternative.

     6.11 Payment of Fees and Expenses.  Each party shall be responsible for
          ----------------------------
paying its own fees, costs and expenses in connection with this Agreement and
the transactions herein contemplated; provided, however, that if the Closing is
effected, the Company agrees to pay the reasonable fees and expenses; provided
that such fees and expenses of special counsel to the
<PAGE>

Purchasers are presented to the Company in a reasonably detailed invoice and
that such amount does not exceed $20,000. In the event of any action to enforce
any of the terms of this Agreement, the prevailing party shall be entitled to
reimbursement from the non-prevailing party of its costs and expenses (including
reasonable attorneys' fees) incurred in connection therewith, in addition to all
other remedies and relief to which such prevailing party is entitled.


                    [REMAINDER OF PAGE INTENTIONALLY BLANK]