Atomic updates
Compare-and-swap guards shared state against lost updates from concurrent workers.
Agent primitivesState
Keep point reads, compare-and-swap updates, and TTLs next to the log. Copy-on-write branches let agents explore a change before promoting it or discarding it.
store = laser.kv("config")
await (
store.set("service:auth")
.json({"log_level": "info"})
.ttl(86_400_000)
.send()
)
# compare-and-swap on the stored version
entry = await store.get_entry("service:auth")
if entry is None:
raise RuntimeError("missing")
await (
store.set("service:auth")
.json({"log_level": "debug"})
.expect_version(entry.version)
.commit()
)Keyed working data
Compare-and-swap guards shared state against lost updates from concurrent workers.
TTLs keep sessions and temporary working data bounded without a separate cleanup system.
Test alternate state safely, then promote the branch only when the result is valid.
Combine transport, prompt assembly, recall, relationships and live views without stitching together disconnected systems.
Laser Stack runs the whole stack locally in Docker. LaserData Cloud runs it for you.