31 saga step types
Transforms, HTTP/webhooks, timers, signals, events, parallel fan-out, foreach, loops, try/catch, human tasks, sub-sagas, and more.
Embed or deploy
Run in-process with zero infrastructure, or deploy two Docker-friendly binaries backed by Postgres + RabbitMQ.
CEL expressions
Google CEL for conditions, transforms, filters, and routing โ evaluated against live run variables.
Scheduled & event-driven
Cron-scheduled and event triggers, durable timers, and a license-gated feature model.
Durable audit trail
Every step transition, rule evaluation, signal, and metric is written as an immutable event row.
gRPC workers
Microservices connect over bidirectional gRPC streams to handle action steps without polling.
30-second quickstart
Embed the engine in-process โ no infrastructure โ and run a saga:
sc := saga.InMemory()
sc.RegisterVerb("charge_card", "common",
verbs.HandlerFunc(func(ctx context.Context, run domain.SagaRun, step domain.Step) (map[string]any, error) {
return map[string]any{"ok": true}, nil
}))
sc.Register(domain.WorkflowDefinition{
ID: "checkout", Version: 1, Start: "charge", Published: true,
Steps: []domain.Step{
{ID: "charge", Type: "charge_card", Next: "done"},
{ID: "done", Type: domain.StepTypeEnd},
},
})
runID, _ := sc.Start(ctx, "checkout", map[string]any{"total": 4200})
run, _ := sc.Get(ctx, runID)
// run.State == succeeded