The Saga Pattern is a design pattern for managing long-running, distributed transactions by decomposing them into a sequence of local transactions. Each local transaction updates the database and publishes an event or message to trigger the next step. If a step fails, the pattern executes a series of predefined compensating transactions to semantically undo the preceding steps, ensuring eventual data consistency without requiring a global lock. This makes it a cornerstone of reliable orchestration in microservices and multi-agent systems.
