We propose an architecture for an agent-based virtual market that includes all elements required for simulating a real market. These elements include a communication infrastructure, mechanisms for storage and transfer of goods, banking and monetary transactions, and economic mechanisms for direct or brokered producer-consumer transactions. We report findings that resulted from implementing and conducting experiments with a free-market agent architecture (MAGMA). MAGMA is an extensible architecture that provides all services essential to agent-based commercial activities. These services are available through an open-standard messaging API, which allows using a heterogeneous set of agents, independently of the platform and language.