An approval pauses the run, not a workerA paused run releases its lease and holds no worker. It waits until someone decides, then the approval node returns the decision and the run continues from that step.Why every execution is pinned to one versionAn execution records its workflow version once, when it starts, and never follows a live pointer. That is why resume and replay still mean something weeks after a graph has changed.Memory has a subject, a namespace, and an expiryEvery memory fact lives under a key, a subject and a namespace, and it always expires: 90 days by default, one year at most. Here is how writes, reads and sharing work.What happens when a worker dies mid-runA worker holds a 30 second lease and renews it every 10 seconds. If it dies, the lease expires, another worker claims the run, and the run resumes from the last checkpoint.Which Linea client to use, and which key goes whereThe TypeScript SDK has a server client, an environment client for production starts, an end-user client for browsers, and a webhook verifier. Each one takes a different credential.Linea Labs is not Consensys LineaLinea Labs builds Linea, an open-source AI agent runtime at getlinea.app. It is not the Consensys Linea blockchain, and not the Linea Sketch iPad app.What is an AI agent runtime?A framework gives you the agent loop. A runtime runs it in production: durable steps, checkpoints, approvals, crash recovery, and replaying one failed step.Why replay needs the checkpointYou cannot re-run step four without the exact input it saw. That input only exists if the host executed the run and kept the checkpoint.One graph, not two productsThe canvas, the workflow JSON, and the node registry describe one thing. A second editor is fine. A second graph is a second product.The half frameworks do not shipFrameworks solve the loop. You still host it, retry it, store its memory, and keep its checkpoints. That second half is the product.Memory is not a side questFacts have to survive the run. If you stand up the store yourself, you are still doing the ops half. We think the graph should ask for memory and the host should keep it.Sandbox the code nodeA code node is an escape hatch. It still has to run somewhere that cannot take down the host. Linea does not ship one yet, and this is why.Triggers are not the productStarting a graph is a solved problem. The product is what has to stay up after it starts: the worker, the checkpoint, the wait, and the memory.
Toggle menu

Memory has a subject, a namespace, and an expiry

Every memory fact lives under a key, a subject and a namespace, and it always expires: 90 days by default, one year at most. Here is how writes, reads and sharing work.

Linea Labs
  • Memory

A memory node looks simple: write a fact now, read it on a later run. The details are what decide whether a fact lands in the right place, stays isolated or shared on purpose, and goes away when it should. This post lays out those details as the host enforces them.

Four things name a fact

A memory fact is addressed by four things. Get them right and reads and writes find each other.

PartWhat it isRule
KeyThe name of the fact, such as `plan`Required. A node without a key fails.
SubjectWho the fact is aboutThe verified end user of the run, or an id read from the node's input with `subjectPath`
NamespaceThe group the fact belongs toDefaults to the workflow, so facts are isolated per workflow
EnvironmentWhere the run happensRequired. Memory is scoped to the environment as well as the workspace

The subject deserves a closer look. When a verified end user started the run, memory is keyed by that user's record and subjectPath is not needed. For runs your own system starts, subjectPath names where in the node's input to find an id. The value there can be a string, a number, or a boolean. If nothing is found at that path, the node fails with a message naming the path.

A fact is addressed by environment, subject, namespace and key. Reads and writes that name the same four things find each other.

Writing a fact

A write node saves a value under the key, for the subject, in the namespace:

JSON

{
  "id": "remember-plan",
  "type": "memory",
  "config": {
    "operation": "write",
    "subjectPath": "customer.id",
    "namespace": "billing",
    "key": "plan",
    "valuePath": "customer.plan",
    "ttlSeconds": 2592000
  }
}

valuePath picks which part of the input to store. Leave it out and the whole input is stored. If you name a path and nothing is there, the node fails instead of quietly storing nothing.

On success the node returns the key and the time the fact will expire, so a later step can show or log it.

Reading a fact

A read node takes the same subject, namespace and key, and returns two things: whether a fact was found, and the value.

JSON

{
  "operation": "read",
  "subjectPath": "customer.id",
  "namespace": "billing",
  "key": "plan"
}

A missing fact is not an error. The node returns found: false with a null value, and the graph decides what to do next. That makes the common pattern easy: read the fact, branch on found, and fall back to asking the customer.

Sharing or isolating

The namespace is the switch. Leave it empty and it resolves to the workflow's own id, so a fact written by one workflow is invisible to every other. Set the same namespace on several workflows and they share the fact. Two workflows that both use billing read and write the same plan.

Nothing crosses subjects, though. A fact about one customer is never returned for another, because the subject is part of the address.

Every fact expires

Expiry is not optional in the way it first looks. If you leave ttlSeconds out, the fact still expires: the default is 90 days. If you set it, the value must be between one second and one year. Anything outside that range fails the node with a message that states the allowed range.

So the real choice is not whether a fact expires but when. Set a short life for a fact that goes stale, such as a pending order, and a long one for something durable. The year cap means no fact is kept forever by accident.

Replay does not change what later runs recall

One rule protects your history. When a run is a replay or a regression run, memory writes do not happen. The node fails with a non-retryable error that explains why: a write would change what later runs recall.

That is the right trade. A replay exists to test a step against the original input. If it could also rewrite memory, testing a fix would quietly alter the facts the next real run reads. Reads still work in a replay, so the step sees the same facts it saw the first time.

A short checklist

  • Name the key, the subject and the namespace on every memory node.
  • Leave the namespace empty to keep a fact inside one workflow, and set it to share.
  • Pick ttlSeconds on purpose. The default is 90 days, and the ceiling is one year.
  • Branch on found after a read, and do not assume the fact is there.

The Linea newsletter

What we learn from every run.

New releases and field notes on running agents in production.

One email when something ships. Unsubscribe anytime.