Existing architectures for multiagent systems emphasize low-level messaging-related considerations. As a result, the programming abstractions they provide are also low level. In recent years, commitments have been applied to support flexible interactions among autonomous agents. We present a layered multiagent system architecture based on commitments. In this architecture, agents are the components, and the interconnections between the agents are specified in terms of commitments, thus abstracting away from low level details. A crucial layer in this architecture is a commitment-based middleware that plays a vital role in ensuring interoperation and provides commitment-related abstractions to the application programmer. Interoperation itself is defined in terms of commitment alignment. This paper details various aspects of this architecture, and shows how a programmer would write applications to such an architecture.