You are building an orchestration layer for a multi-agent system that coordinates planning, tool use, and task execution across specialized agents. Some tasks span multiple steps and external actions, so partial failure can leave the system in an inconsistent state.
How would you design an orchestration layer for a multi-agent system to ensure task atomicity and error recovery?