Operational Semantics for Agents by Iterated Refinment