Insights Business| SaaS| Technology Who Owns Agent State? Your Database, a Cluster or a Vendor Platform, and What Exit Costs
Business
|
SaaS
|
Technology
•
Nov 3, 2026

Who Owns Agent State? Your Database, a Cluster or a Vendor Platform, and What Exit Costs

AUTHOR

James A. Wondrasek James A. Wondrasek
Who Owns Agent State and What It Costs to Leave

A record exists. An agent run depends on it: the step it reached, the outputs already committed, the timer due Thursday. Someone can read that record, mutate it, price access to it, migrate it, or refuse access to it. That is the ownership question, and it gets settled at architecture time.

81% of leaders report concern about AI vendor dependency, while only 6% believe they could switch providers without material disruption. Both numbers come from a vendor survey, so treat them as a signal rather than a measurement. The gap they describe closes through design decisions taken before signature.

Five questions follow, each answered against a named engine. Start with the state ownership picture and the guarantee you are paying for.

So which of the three custodians can you leave?

Who owns agent state: your database, a cluster you run, or somebody else’s platform?

Whoever can act on the record without you is the owner, and where the bytes sit is a secondary detail. Three custodians exist: your own database, a cluster you operate, somebody else’s platform. Five rights sit inside the definition: read, mutate, price, migrate, refuse. Only the third, a vendor platform, can exercise all five without asking you first.

One distinction to hold from here on. The record is the ordered history of what a run did; a checkpoint is a save point within it, telling you where a run got to rather than how it got there.

Your own database is the shortest distance. LangGraph checkpoints every superstep into tables you run, Mastra snapshots its state when a step suspends, and DBOS writes its rows into your Postgres. The record stays inside the backup and restore story you already trust, and that story does not move without you.

A cluster you run is the middle distance. Temporal’s four services sit against a persistence database you operate and a separate deployable holding your workflow code, with a search index behind visibility queries. Restate is one binary with embedded RocksDB, snapshotting into an object store.

Somebody else’s platform is the far distance: Temporal Cloud, hosted Inngest, a managed agent server. You can query it and cannot operate it. Foundry’s state store holds Agent Framework checkpoints and platform conversation history inside one product, which puts authority in two places, and either can go missing.

Data hosted in Sydney by a foreign-controlled entity is resident in Australia and contested in the vendor’s home jurisdiction, and no clause in the agreement fixes that. Residency is one question to put to a vendor. Here is the rest of the list, with the three custodians mapped in the ownership picture.

What should you ask a vendor about state export, history portability and exit cost before you commit?

Ask whether the record exports in a form that can be replayed elsewhere without the vendor’s consent. Then ask what breaks: the payload ceiling, what Continue-As-New discards, who holds the keys, and what termination does to a paused run. The format decides whether leaving works, and the clause only decides whether you were allowed to try.

Continue-As-New closes the current run and starts a fresh event history, which truncates the audit trail along with the storage bill, and Temporal’s docs say the mechanism comes with other tradeoffs. Each payload is capped at 2 MB, fixed at that value on Temporal Cloud, and a run whose event history passes 50 MB can be terminated. Cloud keeps closed histories for 90 days at most before recommending its Export feature. A record with a hole cannot be produced as an audit record.

Keys and jurisdiction go together, because a portable format is worth little if the key stays behind. Paused state is the case vendors document least.

Over a three-year horizon the choice narrows quickly: SQLite is single node, Postgres is the boring answer when you already run it, Redis trades durability for latency, and a managed agent server trades custody for convenience.

Nothing in the vendor documentation reviewed for this article describes importing another engine’s export. Temporal Cloud exports; nothing documents the matching import, which is the answer to treat as risk. What the guarantee is worth once you can leave therefore rests on an export path nobody has published.

EU Data Act Article 29 bans switching charges from 12 January 2027 while contemplating highly complex switching, and leaves non-exportable data outside the ban. The fee goes to zero. The engineering does not.

The clearest place to see that gap is the managed-versus-self-hosted split.

Temporal Cloud or your own cluster: what are you actually buying?

Cloud removes the cluster, the database tuning, the visibility store, the upgrade sequence and the worker-fleet deploy split. It reinstates a renewal date, a per-action bill and a custodian with the five rights above. You are buying the on-call rota. The durability guarantee is the same code you would have run yourself.

The SDKs are MIT-licensed and free to run, so the licence line comes to zero and the bill arrives as a database, a cluster and someone on call. One published estimate puts a small self-hosted cluster at $480 to $790 a month in infrastructure, from a company that sells workflow automation, so read the figure with that in mind. It excludes the person who patches the database at 2 am, who does not appear on an invoice.

Crossover is a volume question, since Cloud bills per Action and an Action is a workflow start, an activity, a signal or a timer. History shard count is fixed at cluster creation and cannot be changed without rebuilding the cluster, which caps throughput for its whole life. One company’s case shows the operational bite: Attentive moved to Cloud after a sharded persistence layer made upgrades risky and an incident consumed developer hours.

If the record cannot leave, running the cluster yourself hedges the vendor’s roadmap; whether you can exit is still set by the record’s format.

Which engine you can carry depends on how much platform you can staff.

Temporal or Restate for three engineers with nobody on platform?

If your team is three engineers with no platform function, Restate’s single binary with object-storage snapshots is the shape you can carry: several copies of one binary plus a bucket. Temporal’s four services, external database and separate worker fleet amount to a platform commitment.

The mechanism worth understanding is the Virtual Object: a keyed entity with isolated key-value state and a single-writer guarantee per key. Its job is concurrency control, because excluding concurrent writes to one key stops two replicas re-driving the same agent run, which is the race a checkpoint-only setup like Mastra’s leaves open. Awakeables cover pause and wake without a polling loop.

Restate is BSL 1.1, which is not open source. Its ecosystem and language support are narrower than Temporal’s. Its documentation lists S3 and MinIO for snapshots, with GCS and Azure Blob listed as coming soon.

At that size the purchase is durable timers and pauses. If your agent never pauses and never needs to resume, the layer is unnecessary, and that is a legitimate architectural conclusion.

Operational shape is one axis. The transaction boundary is the sharper one.

DBOS or the hosted engines when state has to commit in the same transaction as my own data?

When the workflow record has to agree with your own rows, DBOS is the discriminator. Workflow state and step outputs land in the Postgres you already run, in the same transaction as your business data, so one commit saves both. Hosted engines close the gap with an outbox table and a job that drains it, so the two commits remain.

Recovery becomes a query against a database you already back up, and the system of record stays where your business data lives. DBOS is the youngest option here, so the least production history is the price of the shortest distance.

This works only if you already run Postgres and intend to keep running it, which is why Postgres keeps turning up as the baseline the other options get measured against. The part that bites at month two is determinism and versioning after month one.

What survives every custodian?

The five rights collapse to one. Export is the mechanism that makes the right to migrate real, so it decides whether the other four ever become usable. Switching without material disruption is an architecture property, which is what the 6% figure is really reporting: those systems were built where the record could be restored and replayed.

Put the record where you can restore it, keep the transaction boundary where your business data already commits, and rehearse an export you do not need, on a cadence, before you need it. An undocumented export path is a cost you have already taken on.

The record’s format sets what leaving costs; the exit clause only sets what it is permitted to cost. The durable execution series picks up the rest.

Frequently Asked Questions

What actually counts as agent state, beyond the obvious?

Agent state is everything a run needs in order to continue correctly: the current step, completed step outputs, timers, queued messages, retry counters and the identifiers of anything external it has already touched. Credentials and paused-run context often sit in the same store. That breadth is why the format question matters, because a record exported as logs and metrics looks complete and is not, since it cannot be replayed.

Is open source the same as portable?

No. A licence governs what you may do with the code, not with the record. Temporal’s SDKs are MIT-licensed, which keeps the bill low and the code readable, but a self-hosted cluster still writes history in Temporal’s own format into its own database. Restate’s BSL 1.1 adds a licensing constraint on top of that. Portability turns on whether the format can be replayed elsewhere.

Does my model provider own the memory my agent accumulates?

Often yes, in the sense that matters. Thread and memory features on hosted model APIs store conversation state inside the provider’s account, in a format it controls, with no replayable export. That is usually the least portable state in the stack, because nothing else can read it. Keep durable memory in your own Postgres and treat provider memory as a cache you can rebuild.

Is there a standard format for exporting agent state?

No. There is no interchange format for agent state the way there is for container images or database dumps. Each engine serialises its own event history, checkpoint tables or RocksDB snapshot, and no retrieved vendor documentation describes importing another engine’s export. The nearest thing to a standard is Postgres: rows you can dump, inspect and restore with tools you already trust.

Can I move an agent run that is mid-flight, or do I have to let it finish?

In practice you drain it. Migration usually runs as a dual-run period, where new runs start on the new engine while old runs finish on the old one, and the old system stays readable until the last run exits. Paused runs and long timers are the awkward case, because they may not finish for weeks, so cap pause durations before you plan a switch.

Where does the cost of leaving actually sit?

Almost entirely in engineering, not in fees. The work is re-implementing orchestration code against a different programming model, re-establishing determinism so in-flight steps do not re-run destructively, and rehearsing the restore until it is boring. That is why a zero-cost exit clause can coexist with a switch nobody wants to schedule: the clause removes a charge, not a quarter of your team’s attention.

Does self-hosting in an Australian region satisfy data sovereignty?

Only partly. Running the cluster in Sydney or Melbourne answers where the bytes sit, which is what most sovereignty policies actually test. It does not answer who can act on them, because support access, telemetry and managed add-ons can reinstate a third party over the top. Residency and custody are separate checks, and a serious reviewer will ask for both.

Will the EU Data Act ban on switching charges protect me?

Only in a narrow sense. Article 29 bans switching charges for data processing services from 12 January 2027, but the text expressly contemplates services involving highly complex or costly switching and requires only that customers be informed. Charges heading to zero leaves the engineering untouched. If you sell into Europe it shapes your contracts; if you trade only in Australia, your export risk is unchanged.

What is the cheapest thing I can do this quarter to reduce exit cost?

Run an export you do not need. Take one production run, export its record, restore it into a staging environment on different hardware and replay the last few steps. Repeat it quarterly so it stays honest. That single rehearsal tests format, keys, engine versions and your team’s understanding at once, and it costs a few days rather than a migration programme.

Why is event history worth keeping if I already take checkpoints?

Because they answer different questions. A checkpoint is a save point: it tells you where a run got to, not how it got there, so an interrupted step re-runs rather than resumes. Event history is the ordered record of what actually happened, which is what a replay needs and what an auditor reads. Keep the history if you ever expect to explain a decision.

AUTHOR

James A. Wondrasek James A. Wondrasek

SHARE ARTICLE

Share
Copy Link

Related Articles

Need a reliable team to help achieve your software goals?

Drop us a line! We'd love to discuss your project.

Offices Dots
Offices

BUSINESS HOURS

Monday - Friday
9 AM - 9 PM (Sydney Time)
9 AM - 5 PM (Yogyakarta Time)

Monday - Friday
9 AM - 9 PM (Sydney Time)
9 AM - 5 PM (Yogyakarta Time)

Sydney

SYDNEY

55 Pyrmont Bridge Road
Pyrmont, NSW, 2009
Australia

55 Pyrmont Bridge Road, Pyrmont, NSW, 2009, Australia

+61 2-8123-0997

Yogyakarta

YOGYAKARTA

Unit A & B
Jl. Prof. Herman Yohanes No.1125, Terban, Gondokusuman, Yogyakarta,
Daerah Istimewa Yogyakarta 55223
Indonesia

Unit A & B Jl. Prof. Herman Yohanes No.1125, Yogyakarta, Daerah Istimewa Yogyakarta 55223, Indonesia

+62 274-4539660
Bandung

BANDUNG

JL. Banda No. 30
Bandung 40115
Indonesia

JL. Banda No. 30, Bandung 40115, Indonesia

+62 858-6514-9577

Subscribe to our newsletter