Software agent-based negotiation is a major method to automate the interactions in electronic marketplaces and Internet enabled communities. The traditional approach is to let the agents to interact directly. In this paper it has been investigated how a mediator agent can improve the chances to reach the agreement via bargaining. Although the ideal mathematical model was proposed in the seventies, this was never implemented as a working mechanism, due to the fact that the mediator needed information that was difficult to gather and the usual environment was not repetitive enough to consolidate this information for a fair mediation. The agent-based infrastructure proposed collects continuously data about the negotiating parties and the mediator agents use this data to reduce the exaggeration of the parties. The paper includes a mediation example and the major conclusion is that negotiation is improved by a mediator which has historical data about the negotiating parties.