Architectural Design of Multi-agent Systems