Agent Primitives /State = Keyed working data

Keyed state, with safe branches.

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.

const kv = laser.kv("profiles")
await kv.set(utf8(KEY)).json(profile)
  .ttl(TTL_MICROS).send()

const old = await kv.getEntry(utf8(KEY))
if (!old) throw new Error("profile missing")
await kv.set(utf8(KEY)).json(upgraded)
  .expectVersion(old.version).commit()

const fork = laser.fork("experiment-1")
await fork.squash()
await fork.create().severed()
  .tables(["profiles"]).send()
await fork.putRow("profiles", 0, 0n)
  .field("plan", "enterprise-preview").send()
await fork.promote()

Primitive guarantees

A durable foundation, not another integration.

01

Atomic updates

Compare-and-swap guards shared state against lost updates from concurrent workers.

02

Lifecycle controls

TTLs keep sessions and temporary working data bounded without a separate cleanup system.

03

Copy-on-write branches

Test alternate state safely, then promote the branch only when the result is valid.

Built forAgent sessionsFeature flagsWhat-if simulations

Explore the system

Eight primitives. One durable history.

Combine transport, prompt assembly, recall, relationships, and live views without stitching together disconnected systems.