Combining Logical Agents with Rapid Prototyping for Engineering Distributed Applications