Applying Software Engineering to Agent Development