Expand description
Record-once, replay-forever — the durability half of effectful execution.
A run that calls a model is not reproducible by re-running it. The answer differs, so a crash halfway through means starting over, and an experiment record of “what this agent did” cannot be checked against anything.
Durable-execution engines solve this by journaling: perform each effect once, write the result down, and on replay serve the recorded result instead of performing it again. The orchestration is deterministic; only the recorded edges are not.
Soma already has the storage for that — the same two-table action store
the filter cache uses (ActionCache for small records, BlobStore
for payloads). What this module adds is the keying, and the distinction
the filter cache cannot express:
| Effect kind | Key includes | Reused |
|---|---|---|
| Pure (a graph run) | the effect’s content | across every run, like a filter |
| Impure (a model call, a tool) | run, node, turn, effect | only when replaying that run |
That second row is the point. Asking a model the same question twice is
genuinely two events, so memoizing by content would freeze the first
answer forever — the _deterministic = false foot-gun wearing a hat.
Scoping the key to (run, node, turn) means a resumed run sees exactly
what the original saw, while a fresh run asks afresh.
Structs§
- Effect
Journal - Reads and writes effect results.
- Effect
Site - Where an effect happened, for keying its record.