Atomix: Timely, Transactional Tool Use for Reliable Agentic Workflows
Organizations: Max Planck Institute for Software Systems · Aarhus University · EPFL
Abstract
LLM agents execute multi-step workflows that mutate external state through tools. Common orchestrators treat tool return as the settlement trigger, so faults, speculation, and concurrent agents can leave partial effects, losing-branch residue, stale writes, or irreversible sends. Correct settlement needs two facts that retries, checkpoint replay, locks, and compensation each conflate: which effects must settle together, and when earlier conflicting work is exhausted. Atomix makes this split explicit with progress-aware transactions. The runtime records reads and effects during execution, seals a transaction when its footprint is complete, and commits only after per-resource frontiers show that no earlier conflicting work can still arrive. Commit is final settlement: Atomix releases bufferable effects, accepts reversible external effects as final, and lets irreversible effects leave the gate. Abort suppresses unreleased effects and compensates externalized reversible effects where possible. On representative agent workloads, this composition improves clean recovery under injected faults, isolates contending and speculative work, and prevents correctly classified irreversible actions from leaking; microbenchmarks show microsecond-scale wrapper overhead relative to tool latency.
Figures & tables
| Synthetic plan-delay (4 ag, ) | Real LLM (GPT-4o-mini) | Disjoint wait (ms) | |||||
|---|---|---|---|---|---|---|---|
| Mode | Inv./run | Wait (ms) | Blocked | Inv./run, 4ag | Inv./run, 8ag | 4 ag | 8 ag |
| Tx-Full | 0.00 † | 1 0.0 | 0% | 0.0 † | 0.0 | 0.0 | 0.0 |
| Workflow-Lock | 0.00 † | 112.3 | 75% | 0.0 † | 0.0 | 44.9 | 104.7 |
| Per-Call-Lock | 4.91 | 1 0.0 | 0% | 3.0 | 7.0 | 0.0 | 0.0 |
| OCC-Revalidate-and-Retry | 0.00 ‡ | 1 0.0 | 0% | 0.0 ‡ | 0.0 ‡ | 0.0 | 0.0 |
| No-Tx | 4.97 | 1 0.0 | 0% | 3.0 | 7.0 | 0.0 | 0.0 |
| Mode | Leaks | Attempts | Leak rate | 95% CI |
|---|---|---|---|---|
| Tx-Full | 0 | 500 | 0% | [0, 0.74] |
| Saga-Compensation | 400 | 500 | 80% | [76, 83] |
| Checkpoint-Replay | 200 | 500 | 40% | [36, 44] |
| TCC-Confirm | 0 | 500 | 0% | [0, 0.74] |
| Mutex+WAL+Rollback ∗ | 0 | 500 | 0% | [0, 0.74] |
| No-Tx | 500 | 500 | 100% | [99.3, 100] |
| Mixed faults | F2-only | F4-only | Wait | ||
|---|---|---|---|---|---|
| Mode | (ms) | ||||
| Tx-Full | 84 | 65 | 100 | 85 | 1 0.1 |
| OCC | 82 | 62 | 100 | 75 | 1 0.0 |
| Mutex-Workflow | 81 | 62 | 100 | 77 | 95.9 |
| TCC-Confirm | 79 | 63 | 100 | 81 | 1 0.1 |
| Mutex+WAL+Rollback | 70 | 24 | 80 | 78 | 1 0.4 |
Appendix figures & tables20 assets
Supplementary material from the paper’s appendix.
Appendix
| Workload / adapter | Representative scope(s) | Idempotency key pattern | Compensation / gating |
|---|---|---|---|
| Filesystem writes | absolute path, /repo/src/app.py | path:trace: epoch:branch | restore previous contents; delete files created by aborted writes |
| WebArena actions | page scope, webarena:site:page optional element suffix | webarena:action: trace:epoch:branch | no generic per-action compensation; settlement controlled by transaction scopes |
| OSWorld GUI actions | UI app scope, osworld:ui:app: text_input or mouse:region | action:args: trace:epoch:branch | action-specific compensation when available; read-only actions carry no scope |
| -bench tools | real runner: tau2:tool harness: retail:order:id | real runner: trace:epoch:tool harness: order-scoped key | structured tool calls are replayable; multi-agent harness checks order invariants |
| WebArena | OSWorld | |||
|---|---|---|---|---|
| Mode | ||||
| Tx-Full | 73.0 5.5 | 57.2 6.7 | 63.0 7.5 | 37.0 8.8 |
| Checkpoint-Replay | 68.0 4.8 | 53.2 4.3 | 62.0 6.2 | 37.1 5.1 |
| TCC-Confirm | 25.0 4.2 | 18.0 3.5 | 10.0 3.0 | 6.0 2.8 |
| Saga-Compensation | 18.0 3.2 | 10.0 2.8 | 7.0 2.8 | 4.0 2.2 |
| Mutex+WAL+Rollback | 65.0 5.1 | 48.0 5.5 | 55.0 6.8 | 32.0 6.5 |
| Mode | -bench ( , ) | -bench ( , ) | -bench ( , ) |
|---|---|---|---|
| Tx-Full | 60 [26, 88] | 73 [54, 87] | 57 [37, 75] |
| Checkpoint-Replay | 60 [26, 88] | 63 [44, 80] | 53 [34, 72] |
| TCC-Confirm | 60 [26, 88] | 40 [23, 59] | 3 [0, 17] |
| Saga-Compensation | 60 [26, 88] | 37 [20, 56] | 7 [1, 22] |
| Mutex+WAL+Rollback | 60 [26, 88] | 33 [17, 53] | 3 [0, 17] |
| No-Frontier | 60 [26, 88] | 30 [15, 49] | 3 [0, 17] |
| Mode | Bursty (entry 0.04, len 3) | Bernoulli ( ) |
|---|---|---|
| Tx-Full | 20/30 = 67% | 22/30 = 73% |
| Checkpoint-Replay | 17/30 = 57% | 19/30 = 63% |
| TCC-Confirm | 18/30 = 60% | 12/30 = 40% |
| No-Tx | 18/30 = 60% | 8/30 = 27% |
| Mutex+WAL+Rollback | 15/30 = 50% | 10/30 = 33% |
| No-Frontier | 14/30 = 47% | 9/30 = 30% |
| Mode | F2-only ( ) | F4-only ( ) | (F2 F4) |
|---|---|---|---|
| Tx-Full | 63 [44, 80] | 67 [47, 83] | pp |
| Checkpoint-Replay | 57 [37, 75] | 57 [37, 75] | pp |
| Saga-Compensation | 43 [25, 63] | 70 [51, 85] | pp |
| OCC-Revalidate-and-Retry | 40 [23, 59] | 53 [34, 72] | pp |
| Mutex+WAL+Rollback | 33 [17, 53] | 57 [37, 75] | pp |
| No-Frontier | 37 [20, 56] | 67 [47, 83] | pp |
| Mode | F1 | F2 | F3 | F4 | F5 | F1 | F2 | F3 | F4 | F5 | F1 | F2 | F3 | F4 | F5 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Tx-Full | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 96 | 98 | 96 | 100 | 96 |
| Tx-NoFrontier+Retry | 100 | 100 | 100 | 88 | 100 | 100 | 100 | 100 | 64 | 100 | 94 | 98 | 96 | 16 | 96 |
| Saga-Compensation | 100 | 100 | 100 | 92 | 100 | 100 | 100 | 100 | 60 | 100 | 96 | 98 | 94 | 17 | 96 |
| Checkpoint-Replay | 100 | 100 | 100 | 88 | 100 | 100 | 100 | 100 | 56 | 100 | 98 | 97 | 98 | 16 | 96 |
| OCC-Revalidate-and-Retry | 100 | 100 | 100 | 90 | 100 | 100 | 100 | 100 | 66 | 100 | 96 | 97 | 98 | 18 | 94 |
| Mode | ||||||
|---|---|---|---|---|---|---|
| Tx-Full | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| Tx-GlobalFrontier (single global lock) | 14.8 | 44.9 | 104.7 | 563.9 | 1,163.2 | 2,368.6 |
| Composition ablation | Inv./run | Wait (ms) | Extra writes (per run) | What it removes |
|---|---|---|---|---|
| Tx-Full (control) | 0.00 | 1 0.0 | 0.0 | none |
| Tx-NoScopeOnRead | 4.83 | 1 0.0 | 6.5 | scope registration on first read |
| Tx-NoAbortOnStale | 4.87 | 1 0.0 | 6.5 | abort-on-stale retry |
| Tx-GlobalFrontier | 0.00 | 113.0 | 0.0 | per-resource granularity (single global lock) |
| Mode | Buffer | Filesystem | DB rows | Mailbox |
|---|---|---|---|---|
| Tx-Full | 0 | 0 | 0 | 0 |
| Tx-GlobalFrontier | 0 | 0 | 0 | 0 |
| Mutex+WAL+Rollback | 0 | 0 | 0 | 0 |
| TCC-Confirm | 0 | 0 | 0 | 1000 |
| Saga-Compensation | 0 | 0 | 0 | 1000 |
| OCC-Revalidate-and-Retry | 0 | 0 | 0 | 1000 |
| Mode | disjoint | overlap | |||
|---|---|---|---|---|---|
| Tx-Full | 5.09 | 4.43 | 3.22 | 2.28 | 1.66 |
| Tx-GlobalFrontier | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| Workflow-Lock | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| No-Tx | 1000 | 873 | 751 | 627 | 503 |
| Mechanism | tx_manager LOC | Per-tool wiring | Leaks/500 | Composes with |
| (one-time) | (per integrated tool) | R/I/S | ||
| Tx-Full | 500 (runtime) | 17 (scope+effect builder) | 0 | R/I/S |
| TCC-Confirm | 115 | 50 (try/confirm/cancel triple) | 0 | I only |
| Mutex+WAL+Rollback | 168 | 30 (explicit gating predicate) | 0 | I + S |
| OCC-Revalidate-and-Retry | 135 | 15 (read-version site) | 500 ∗ | S only |
| Saga-Compensation | 0 92 | 30 (compensation handler) | 400 | R only (irreversibles leak) |
| Mode | Tool fail | Losing spec. | Stale read | Pre-commit veto | Timeout |
|---|---|---|---|---|---|
| Tx-Full | 0 | 0 | 0 | 0 | 0 |
| Saga-Compensation | 1000 | 1000 | 1000 | 0 | 1000 |
| Checkpoint-Replay | 1000 | 0 | 0 | 0 | 1000 |
| TCC-Confirm | 0 | 0 | 0 | 0 | 0 |
| Mutex+WAL+Rollback ∗ | 0 | 0 | 0 | 0 | 0 |
| No-Tx | 1000 | 1000 | 1000 | 1000 | 1000 |
| Mode | Trials | GT clean | Classified clean | Mismatch | |
|---|---|---|---|---|---|
| Tx-Full | 0.0 | 600 | 600 | 600 | 0 |
| Tx-Full | 0.1 | 600 | 589 | 589 | 0 |
| Tx-Full | 0.3 | 600 | 557 | 557 | 0 |
| Saga-Compensation | 0.3 | 600 | 559 | 559 | 0 |
| Retry-only | 0.3 | 600 | 534 | 534 | 0 |
| Tx-Full-NoResidueClassification | 0.3 | 600 | 564 | 600 | 36 |
| Branches ( ) | Setup ( s) | Commit ( s) | Total / p99 ( s) |
|---|---|---|---|
| 2 | 13 | 85 | 98 / 295 |
| 4 | 23 | 142 | 165 / 273 |
| 8 | 44 | 321 | 365 / 1339 |
| 16 | 86 | 939 | 1025 / 23198 |
| Frontier-advancement mode | Out-of-order commits | Invariant violations | Tx-Full waits |
|---|---|---|---|
| Correct (advances after each commit finalizes) | 0/200 | 0/200 | 0 |
| Stalled (no advancement) | 0/200 | 0/200 | 200/200 (100% block) |
| Premature (advance before earlier-epoch finalizes) | 200/200 | 200/200 | 0 |
| Kill point | Trials | Duplicate effects | Lost effects |
|---|---|---|---|
| (i) before pending-log write | 50 | 0 | 50 |
| (ii) after pending-log, before effect | 50 | 0 | 50 |
| (iii) after effect, before committed-mark | 50 | 0 | 0 |
| (iv) after committed-mark, before retry | 50 | 0 | 0 |
| Scope strategy | Should-conflict cases | Missed conflicts | False conflicts |
|---|---|---|---|
| (across all substrates) | (false neg.) | (false pos.) | |
| Tx-Full canonical | 28 | 0 | 0 |
| Tx-NaiveStringScopes | 28 | 12 | 0 |
| Coarse-Global | 28 | 0 | 28 |
| Fine-NoOverlapAware | 28 | 12 | 0 |
| Configuration | Inv./200 | Leaked irrev./200 | Failure mode |
|---|---|---|---|
| Tx-Full (control) | 0 | 0 | none |
| E10-OB Over-broad scope | 0 | 0 | failure-closed |
| E10-TN Too-narrow scope | 66 | 0 | failure-open |
| E10-WC Wrong effect class | 0 | 17 | failure-open |
| E10-NC Missing compensation | 0 | 35 | failure-open with alert |
| Atomix’s axes | Orthogonal | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| System | Per-resource | Effect-class | Spec. isolation | Irrev. gating | Stale-plan iso. | Shim deploy. | Single-proc. dedup. | IFC | Sem. valid. |
| Atomix (this paper) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
| SAFEFLOW Li et al. [2025a] | ✗ | ✗ | ✗ | ✓ a | ✓ | ✗ | ✓ | ✓ | ✗ |
| SagaLLM Chang and Geng [2025] | ✗ | ✗ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ | ✓ |
| ALAS Geng and Chang [2025] | ✗ | ✗ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ | ✓ |
| Temporal Saga Temporal Technologies Inc. [2026] , Garcia-Molina and Salem [1987] | ✗ | ✗ | ✗ | ✗ b | ✗ | ✓ | ✓ | ✗ | ✗ |
| Mechanism | Sealed footprint | Per-resource progress | Scope-on-read + abort-on-stale | Effect-class settlement |
|---|---|---|---|---|
| Sagas Garcia-Molina and Salem [1987] | ✗ | ✗ | ✗ | ✗ |
| TCC Pardon and Pautasso [2014] | partial a | ✗ | ✗ | partial b |
| OCC Weikum [1991] | ✗ | ✗ | ✓ | ✗ |
| Two-phase locking Mohan et al. [1992] | ✗ | ✗ | ✗ | ✗ |
| Watermarks (Naiad/Flink) Murray et al. [2013] , Apache Flink [2026] | ✗ | ✓ c | ✗ | ✗ |
| Workflow-Lock | ✗ | ✗ | ✗ | ✗ |
Tool Use
Tool use studies how AI agents select, invoke, and combine external tools to solve tasks beyond their internal knowledge.
See all 91 papers