An Architecture for Tuple-based Coordination of Multi-Agent Systems