Temporal と AI エージェントのための Durable Execution

Temporal and Durable Execution for AI Agents

Software Engineering Daily47分
Temporal と AI エージェントのための Durable Execution

Temporal と AI エージェントのための Durable Execution

Software Engineering Daily

0:0047:10

要約

Temporal 共同創業者の Maxim Fateev が Sean Falconer と対談し、実行状態を常に保持する「durable execution」の仕組みと、AI エージェント時代に求められる理由を語った。リプレイによる復元、LLM の非決定性との両立、新機能、MIT ライセンスの完全オープンソース戦略を中心に、競合が増える中での優位性についての見解が示された。

この回のポイント

  • ●Durable execution は、プロセスがクラッシュしても同じ状態から再開できる抽象化であり、Temporal は各外部呼び出しの結果を記録し、コードを先頭から再実行(リプレイ)して状態を復元する。
  • ●ワークフローのコードは決定的でも、LLM やツールを呼ぶ activity は非決定的なため、エージェントループも実装できると Fateev 氏は説明している。静的なグラフではなく「動的なプロセス」を書ける点を強調した。
  • ●Temporal は独自のフレームワークを作らず、OpenAI Agents SDK、Pydantic、LangGraph などと統合するプラグイン方式を採る。実運用のエージェントの 8〜9 割は実質ワークフローだとの見方を示した。
  • ●新機能として standalone activities、workflow streams、Rust SDK、serverless workers、外部ペイロードストレージなどが紹介された。
  • ●Temporal Cloud は計算資源やデータを見ない制御プレーンであり、暗号化や外向き接続のみの設計でセキュリティ審査に対応しやすいと述べている。
  • ●競合が増える中、全機能を含む MIT ライセンスのオープンソースを優位性とし、利用者の「逃げ道」を確保することが事業上も重要だと語った。

章立て

  1. Durable Execution とは何か

    クラッシュしても状態が保持され、数日後に続きから再開できる抽象化を説明。try-catch やコールバック分割からの解放を語る。

  2. リプレイの仕組みと自作との差

    イベントソーシング的に結果を記録して再実行する仕組みと、スナップショット自作が困難な理由を解説。

  3. 成長の背景と OpenAI での採用

    年間 200% 超の成長や、ChatGPT の画像生成や Codex での利用、スケールへの早期投資の話。

  4. インフラとしての位置づけと非決定性

    抽象と実装の違い、LLM の非決定性とワークフローの決定性の両立、エージェントフレームワークとの統合を議論。

  5. アーキテクチャとセキュリティ

    サーバー、SDK、自前の計算資源という構成と、Cloud がデータを見ない設計、Lambda 連携を説明。

  6. 新機能の紹介

    standalone activities、Nexus RPC、workflow streams、Rust SDK、非決定性検出などの狙いを解説。

  7. 競合とオープンソース戦略

    Restate や DBOS などの競合への見方、完全 OSS が堀となる理由、FedRAMP などの実例。

  8. AI 時代の展望

    AI が Temporal を推薦する現象、エージェント経由のサインアップなど今後の展望。

解説記事

Software Engineering Daily に、Temporal 共同創業者の Maxim Fateev 氏が Sean Falconer 氏のホストで再登場した。長時間動くプロセスを分散システム上で確実に完走させる「durable execution」とは何か、AI エージェント時代になぜ重要性が増しているのかが主題だ。

Durable Execution の基本とリプレイ

Fateev 氏によれば、Temporal は Uber で生まれ 10 年以上続くオープンソースプロジェクトである。開発者は通常のプログラミング言語で関数を書くだけでよい。実行状態は常に保存され、API の応答待ち中にプロセスが落ちても、3 日後に同じ変数が揃った状態で再開できる。プログラマーから見れば関数が 3 日間ブロックされていただけに見える。30 日間の sleep を本番コードに書くことも許される、という例も挙げられた。

実装の中核はリプレイだ。外部呼び出しや副作用の結果をイベントソーシングのように記録し、復旧時には関数を先頭から再実行する。すでに起きた呼び出しは実際には行わず、記録済みの結果を返す。コードが決定的なら同じ状態に戻る。同氏は、リプレイは内部機構にすぎず、開発者は「一度だけ実行される関数」として書けばよいと述べている。

スナップショットを自作すればよいのではという問いには、クラッシュの検知、数万〜数十億のトランザクションからの復旧対象の特定、ワーカーへの再配分、フロー制御やレート制限、可視化まで自前で作る負担を指摘した。多くのチームが同じ車輪を再発明し、業務ロジック以外に時間を使っているという見方だ。

エージェントとの相性

LLM は非決定的なのに決定的リプレイが成り立つのか、という疑問への答えは明快だった。ワークフローのコードは決定的でも、LLM やツールを呼ぶ activity は非決定的であり、全体としては非決定的なプロセスになる。エージェントループ(LLM を呼び、返ってきたツールを実行して繰り返す)はそのまま書ける。Fateev 氏は「決定性」より「動的なプロセスと静的なグラフ」という言い方を好み、コードなので任意のデータ構造や DSL の解釈もできると説明した。

長時間ツールにも強みがある。5 秒の呼び出しも 5 日の呼び出しも、durable execution では区別がない。可視性と復旧性も標準で得られる。同社は独自のフレームワークを作らず、OpenAI Agents SDK、Pydantic、LangGraph などにプラグインで対応している。さらに同氏は、実運用のエージェントの 80〜90% は実質ワークフローであり、従来型の決定的ソフトウェアはむしろ増えるという見解を示した。エージェントが生成したコードへのガードレールを会社横断で置く構想にも触れている。

成長と新機能

成長については、オープンソースが月 8% 程度の複利で伸びてきたことと、AI 関連の開発爆発が重なったと説明された。OpenAI は大口顧客で、ChatGPT の画像生成や Codex のサーバー側で使われているという。年間 200% 超の成長で、年間換算の売上は昨年末の約 1 億ドルから約 3 億ドルになったと語っている。

新機能では、単一 activity だけのワークフローが多用されていたことから生まれた standalone activities が紹介された。優先度、フロー制御、可視性、キャンセルなどを備えた軽量なキューとして使え、長時間 RPC を扱う Nexus RPC の実装にも向く。内部では Chasm という状態機械の基盤が使われる。workflow streams は大量の小さなストリームを UI に届けるためのもので、Kafka の代替ではない。Rust 製の SDK core の上に、ユーザー向けの Rust SDK も提供された。

オープンソースという堀

Restate や DBOS など競合が増えた現状を、同氏はカテゴリーの検証として歓迎している。その上で、全エンタープライズ機能を含む MIT ライセンスの完全オープンソースは自社だけだと主張する。顧客には、Temporal が不誠実になったときの逃げ道が必要で、それが価格面での規律にもなるという。FedRAMP 環境でオープンソース版を使う顧客もおり、ライセンスを変えれば事業の半分を失うと述べた。競合の「シンプルさ」には、機能が少ないか安全性とのトレードオフだという見解を示している。

まとめ

日本の読者にとって注目点は、エージェント開発の耐障害性を、フレームワークではなくインフラ層の抽象として扱う考え方だ。実運用のエージェントが実はワークフロー中心だという指摘は、設計判断の参考になる。一方、数値や競合比較は同氏の自社に関する発言であり、割り引いて受け取る必要がある。リトライやチェックポイントを自作している現場は、一度 durable execution の概念を確認する価値がある。

文字起こし(英語・自動生成)

Coordinating long-running processes on top of distributed systems is one of the persistent hard problems in software. A process that runs across many steps can't count on finishing in one clean pass, since the machines running it may crash, stall, or drop connections. To handle this fragility, developers have often resorted to writing layers of retries, timeouts, and checkpointing to keep state alive across failures. However, this custom plumbing is often brittle, hard to maintain, and can break down at scale. Temporal is an open-source platform built around an approach it calls durable execution. Developers write a workflow as a straightforward sequence of steps, and the platform preserves its full state underneath, so the code can survive a crash and resume exactly where it left off. The underlying technology was created at Uber over a decade ago. Since then, Temporal has become foundational infrastructure for AI and agent workloads, where long-running tools and agent loops need exactly this kind of durability.

Maxim Fatayev is a co-founder of Temporal. He returns to the show with Sean Falconer to discuss how durable execution works, why its infrastructure rather than a framework, how it fits the non-deterministic world of AI agents, its new capabilities, and why Temporal's fully open-source strategy is central to its moat. This episode is hosted by Sean Falconer. Check the show notes for more information on Sean's work and where to find him. Max, welcome back to the show. Thanks for having me back. Yeah, absolutely. As we were saying, sort of pre-show, I'm sure a lot has changed in the last couple of years since the year we're on. Lots of growth, lots of things to get into. And also the world in technology has massively changed as well, I think, since the bursting on the scene of agendic engineering and locked language models and agents.

I'm sure it's transformed a lot of what you're dealing with day-to-day now. Absolutely. I certainly am a convert now. Yeah. I guess for anyone that's listening to this, hasn't worked with Temporal before, isn't quite aware of even the space of durable execution, how do you explain what it is that you do? So Temporal, first, is an open-source project. It's been around for over 10 years. We started it at Uber. and it's based on kind of a novel idea which is a new abstraction. We call it durable execution. And the idea is that you write code in normal programming language and almost practically any programming language and we preserve the full state of execution all the time. So just most basic way to explain that, you write a function, this function calls some API and then whilst waiting for the reply, process crashes. and then maybe three days later reply comes back and we resurrect process

in exactly the same state still waiting on the same function with all variables being there and give it result and it continues executing. So from programmer point of view just this function was just blocked for three days on a single API call. But obviously a lot of things happen behind the scene but from your point of view we cannot get code which cannot crash and we handle much more than just process crashes but the idea is that Your state is always durable, so you don't need a database. You can just put stuff into local variable, and then you can block on any API call as long as you want, or you can just call sleep 30 days inside of your production code, and it's okay to do that. So it completely changes how you think about writing your business logic. Yeah, so there's no more try-catch, failure, exponential back-off, and all these types of things that I have to deal with. You're essentially abstracting away all the complexity and a lot more. Yeah, okay. You still probably need try catch if it's a business error. For example, you need to handle your business logic. But yes, you don't do try catch of external call failed.

And also, it's not even the try catch or retries. Think about that you need to practically break your logic in bulk of callbacks, right? So practically most of the code these days is read message from a queue, get request, load stuff from database, update database, return the result. And then you can have cron jobs, queues. you kind of tie all this together. And when you use durable execution, you can just write a single function, which will probably cover the whole system. I've seen cases when people write multi-component, very complex system with probably like 50 lines of code. Can you walk me through how this kind of replay thing actually works in practice? Like if a process crashes halfway through the workflow, how does this system know exactly where it left off and then recover from that? So if you talk about durable execution, is an abstraction, right? So how you implement that, there are different ways to implement that. The way we implement that is we use replay. So practically, you can think of it as event sourcing. We record the result of every external invocation,

every side effect, and then we need to recover state. We will run your function from the beginning, and then every time it makes an external call, we will return exactly the same result as it was before, and we don't make actual calls because they already happened. And if your code is deterministic, so it takes the same path with the same results, you end up in exactly the same state. But it's kind of invisible to you. I think one mistake people do is when they start, they start thinking about replay when they code, but reality is just internal mechanism. You just write code as this function executes exactly once. I guess, why wouldn't I be able to do something like this myself? If I kind of write my checkpoint logic, I'm essentially dumping that into a database on every step, leaning on the database's own transactional guarantees so I don't lose it right, and then try to recover from there. What would I be missing if I attempt to do that versus using temporal? So first, if you just dump snapshots to database, first you need to make these snapshots. Yes, it's forcible.

Then how do you determine that your process crashed? So you need something, some sort of timer, right, or some sort of process which will detect that your process crashed, right? Then you need to find out which actual transaction was going. Because it's just process crashed, but imagine you have 10,000 transactions going in the same process all the time or you have like a billion transactions open, like for example a billion agents running and then you crash. How do you know which one should recover? So first, just finding which snapshot to recover is non-trivial. And then you need to find appropriate workers, redistribute that work and then recover those snapshots. And then snapshots are not very efficient because usually your state doesn't change that much with every step. But if you're kind of snapshotting the whole memory, you can end up writing a lot of duplicated data. So it's possible, but it's actually non-trivial. And then, again, you write so much code, how much of that would be your business logic? And then if you start kind of looking at production system, which runs at scale, a lot of edge cases are around flow control, around retries, around rate limits.

So practically productizing that visibility metrics. So all of those things you need to do yourself. And this is what exactly most teams are doing. They're kind of reinventing this wheel every time. and, again, spent 90% of their time doing all of that, but their business logic. This temporal just prevent the business logic and we take care of the rest. And it's 10 years in production at tens of thousands of companies, so it's just battle-tested for a while. Yeah, and I know you've raised choices here in relatively short order, six months or roughly apart, so congratulations, and more than double the valuation. I guess what has happened in the last year from a market perspective that has led to that growth and essentially the funding appetite for this? As you mentioned, a lot of teams start out building something before they ever go out and reach for Temporal as a solution. So has something changed in the market that has made this more top of mind for companies that led to a lot of growth on your end? Actually, there are two answers there. One is it's a result of a lot of years of compounding.

We've been growing, like our open source, for example, was growing around like 8% month over month since we started Tracker six years ago. So that compounds over time pretty well. Then also our go-to-market was always based on a land and extent strategy. So we tried to sign up as many enterprises and the customers as possible, even without practically, because we're a consumption-based service. So practically without any commits, just we want to make sure people start experiencing the platform. And usually it takes years for people to get really comfortable to start putting big production kind of mission-critical workloads in the platform. So that started to compound, and now general business always was growing pretty well. But also AI happened, and AI, just the amount of new development in new companies and also traditional companies, exploded. And when you do new development, both enough developers already were familiar with Timporo, which just assumed that this is the right way to build their companies around. So there are a lot of startups, especially AI startups,

which are 100% based on Temporal architecture. And then we've got hyperscalers. Like OpenAI is a very large customer of Temporal, and they have a lot of internal products on that. But from publicly facing ones which we can talk about, for example, every time you generate an image using ChatGPT, it uses Temporal workflow. Or, for example, Codex, like the server-side part of Codex, all that platform is also orchestrated by Temporal. So all of that compounding together led to a situation when we grew over 200% year over year. And we practically ended up just, we were around 100 million run rate like end of last year. And now we're 300. And that was certainly not something we expected to grow so fast. And other thing is beyond just go to market is clearly that we are becoming kind of sub-straight forward of new AI workloads and agentic workloads. And I think a lot of companies realize that. And obviously our investors are very excited about that. Yeah, I mean, that's amazing growth. and again, congratulations.

I guess if you take the open AI example, and I'm just using this as an example so you don't have to get into the specifics of things that maybe you can't disclose about it, but what causes that team to think, I guess, durable, code execution, temporal, reach for that as a tool versus the traditional method of maybe trying to solve that problem themselves. Has there been all the work that you've done around sort of creating this category? Is it at a place where this is becoming something that people just now understand the way that they might understand, oh, I need a database and I need these other systems, essentially at an infrastructure level? Or is there something else that has led to that? I think one thing which happened in OpenAI is that OpenAI kind of sucked a lot of practically the best people from the Valley and also acquired a few companies. And a lot of those people already knew Tim Portal from their previous companies. So they already knew this new global execution paradigm, and we're familiar with that. And that's why we had kind of critical mass of people, which like they didn't need these two years to kind of get

there. They right away knew that this is the right way to build new applications. And also, OpenAI moves extremely fast. It's insane how fast they're moving. When you get some exposure, you really get amazed. And when they move so fast, they just don't have time to rebuild this infrastructure over and over again. And they certainly We are super concerned about us ability to scale because they scale Like we publicly I think when they talked at our conference they called 60x like temporal usage over one year and it was like very very aggressive so we are able to kind of keep up with their growth and i think this is what allowed us to become a really important partner for them it's kind of a really funny story there is that we invested into our current resistance very early usually startups don't start thinking about these things like that earlier and CEO of our company and co-founder Samar, he probably told me once, like we over-invested in scalability. Just nobody will ever need million requests per second,

things like that, because on a single namespace, because no business process kind of runs that frequently. And now, like later we figure out, like, okay, now we know why we did it. Now we have all of that and we invest in the next level of scale right now, because it looks like we don't know where it will lead us. Yeah, I mean, I think that everything's accelerated in terms of scale from probably anything we can imagine with how fast people are producing code, how fast these systems are being spun out. And I can only imagine how fast a company like OpenAI is potentially moving and consuming all these resources and things like that. Typically what ends up happening to a lot of startups is they get some major customer and then they have to scramble like crazy. Essentially it pushes their platform to the limit and they have to do a lot to kind of meet the needs of that. It sounds like because you were invested in scale early, you haven't really had quite that pressure, I guess. But at the same time, you're seeing the trend line and essentially you're trying to be where the market's going to be maybe a year from now or two years from now. Yes, I think one thing is at our conference,

I even talked in our keynote, is that practically it's not only open AI. Almost everyone right now in the industry has this dilemma. You either move very fast, right? And you cannot just stop right now, right? The whole industry moves extremely fast. And then you have either invest into the kind of core infrastructure because you want to be reliable. But if you do that, you kind of fall behind, right, on features and innovation. And Temporal kind of helps companies to achieve both. You still can have reliability in scale. And at the same time, being able to keep up with kind of all this immense pressure of delivering new features and keeping up with the market. And one thing is about us, we kind of let you build things faster. But our promise is that even if you scale up to the, like, open AI levels, You don't need to change your software. We will scale with you. I've heard you describe durable execution as infrastructure, not as a framework. Why does that distinction matter? So I think think about it this way. A durable execution itself is more like abstraction, right?

Oh, you have code which doesn't kind of crash. The way I kind of give comparison is transaction, right? Transaction is an abstraction, right? And there are concrete implementations like, for example, Postgres, right? Or maybe database, you wipe code it overnight. You still can have a transaction. So, durable execution is an abstraction which hides a lot of complexity, like transaction does. But first, what temporal is, it's a very high-scale, very complex distributed system, which implements almost every possible distributed system abstraction and component, but it hides all of that under this nice durable execution abstraction, right? And this is what allows us to take care of all your distributed system concerns. But durable execution itself, again, we implement it, and this is how you consume it. But the organization by itself, like it's not that hard to write that piece of code which will replace things from results, right? Like I've seen people on Twitter saying, oh, I've implemented that in one day. Yes, you absolutely can. But it doesn't mean that you have all this backend system which can run a million transactions per second and don't fail with like four, five nines of availability.

Yeah, I mean, it's one thing to spin up something that works for some demo purposes, but doing it scales a different beast and also be building for whatever the future state of your company is. I think a lot of this comes down to, is this the problem that you want your engineers focused on, or do you want them focused on accelerating the roadmap that's actually customer-facing or whatever it is that your company is trying to accomplish? Yeah, there is other thing. It's just time, right? Think about it. I believe if I and top 10 engineers of my company leave tomorrow and decide to implement Temporal, we cannot complete this Temporal for the next two, three years, right, just because it took 10 years and hundreds of many years to get where we are. and then even if you have this code base, you need to run it in production for a while, right, to solidify. So it's just not even, are we good enough? It's just time investment. I'm a voice agent powered by Deepgram. I don't just understand words, I understand context. Like when you're fixing the sink and say, we've got a leak, you're talking about a pipe. But when you're a new parent and you say,

we've got a leak, you mean that you're going to have to change into a clean shirt. Oh, it's everywhere. DeepGram understands words and context across STT, TTS, and voice agents. That means better conversations at production scale. Learn more at deepgram.com slash context is everything. This portion of Software Engineering Daily is brought to you by Origin. Your coding agents can launch each other. Theirs did. An engineer asked Codex to pull data from staging. Codex had no connection there, but CloudCode did, so Codex launched CloudCode. When Cloud Code said it lacked permission, Codex relaunched it with the dangerously skipped permissions flag. Nobody was asked. A permission check doesn't mean much if another agent can switch it off. Your logs might show a process that started with a flag. Their trace showed the whole job and why Codex did it. Origin finds the agents on your company's endpoints and reconstructs their work from request to outcome on one timeline. Origin is endpoint AI observability. Read what they found in their own traces at originhq.com.

slash S-E-D. That's O-R-I-G-I-N-H-Q dot com slash S-E-D. You spent weeks choosing the right model for your agent. How long did you spend choosing its web search? Parallel is web search built for agents, not people. Building a voice agent? Parallel Search Turbo answers in about 200 milliseconds for a dollar per thousand requests. Need an agent for thorough research? Parallel Search Advanced digs deep across the web to answer your toughest questions. Parallel works with any model. and drop straight into Cloud Code, Cursor, Vercel, or Langchain. The best web search at every speed and price. Try it free today. Add the Parallel MCP server to your agent in minutes at parallel.ai.s.ed. So with LLMs, their calls are inherently non-deterministic, but your execution model is built on this idea of deterministic replay. So how do those two things kind of fit together? Yeah, I think it's actually a bit of common confusion.

I've even seen some people kind of say TeamPro cannot be used for this because of exactly that, which I think is very, people are just confused. Why? Because think about it this way. Workflow code should be deterministic just because it uses replay. But workflow code logic depends on external IEO, which is kind of the model as activities. And activities are non-deterministic, right? So your workflow code can be a genetic loop. Call LLM, look at the list of tools returned, right? Call those tools and keep looping. So this code is kind of deterministic, but what LLM returns, list of tools, it returns, right? And what tools return, right? And kind of the whole interaction is non-deterministic. So workflow is never deterministic because it calls non-deterministic activities. But actual workflow kind of orchestration logic can be deterministic, but the end-to-end process is non-deterministic. So temporal is actually a very good way to implement such. That's why I don't use determinism in this. I usually say dynamic processes versus static, right? because you absolutely can implement very dynamic workflows using temporal.

It's different because usually people, when they see workflow, they imagine kind of boxes connected with arrows, right, kind of tags and graphs. And graphs are usually pretty static. You can mutate stuff at runtime, but it becomes pretty weird very fast. But as temporal workflows are just code, right, and code can be extremely dynamic. You can use any data structure, lists, hashes, maps, whatever, graphs. You can load a DSL document and interpret that as a workflow. So this is how you support domain-specific languages easily with Temporal by designing your own DSLs and interpreting them. With agents, you were just saying that Temporal's model is actually a really good working model for building these types of systems. But was there any different shape that came along with people building agents that has forced you to rethink the original programming model that you took with Temporal? Is there new things that you essentially needed to add to meet the needs of AI applications? So core model didn't change. So it's pretty clear that agents, especially agents which take real action on the world, not just read-only agents, they need durability, right?

You need to make sure that you don't lose your session in the middle of executing something important. Also, practical applications require long-running tools. You want a tool which can take one hour, right, or three hours. Even short talk, if system is down, becomes long running. This retries, right? And existing protocols, MCP just added tasks and still I don't think anyone supports that. And with temporal, your event loop stays the same, like agentic loop stays the same. You call a tool, you block on tool call, and in durable execution, there is no difference between five-second call or five-day call. And I think this is very important. So agentic loop, and also because we record every step, you get visibility out of the box. and durability out of the box. So all this recoverability, because there are existing solutions out there which use snapshots. But for example, as I described initially, discovering which snapshot to recover and when is left to the implementer, which is actually super non-trivial. Temporal gives you out of the box. And one thing we did,

which wasn't, I think, very well understood initially, we didn't write our own framework, for example, or our own harness. We integrated with all of them. Because we are called, we can take any existing harnesses and start running on top of Temporal practically with minimal changes. So we started with OpenAI agencies decay, but later we added like ATK, strengths. Pedantic guys did integration themselves, and I think it's one of the widely used ones. Later integrated LANGraph, so you can run LANGraph workflows as well on top of Temporal and get durability. So you can practically take a new framework and start running on top of Temporal with minor changes. We practically have notion of plugins. We kind of have a plugin for each specific integration. So our idea is to be open platform, which supports all of them underneath and gives them durability, but we are not opinionated about specific framework or specific like data formats and so on. If you're writing your own, you can absolutely use Tim Portal for that. I mean, I think we've seen over the last year or so in the specific agent frameworks, a lot of those frameworks have started to add some level of like state management, crash recovery,

and basically the starts of durable execution, but specifically focused on the agent. I guess, what is the limitation of that approach versus providing using a more general platform like Temporal to solve this problem? I think it's the same thing as we talked about, like more traditional application. You can do it, right? You can take your queues, database, and checkpoint, and it kind of works until it doesn't. But Temporal just gives you on the platform level, and then it just makes it easier to implement, and you don't need to maintain all of that, And again, the moment you hit a very large scale or like specific edge case, you don't need to maintain that and support that. That is one. Another is that I still we talk agents all the time. But if you look at real production use cases, I would say 80% or 90% of agents are actually workflows, right? They are not like just agentic loops. Yes, we have some, like especially coding agents. Even coding agents started to add this kind of workflow things, right? Sub agents and so on but most applications right now I don think it will be like pure agents in applications right It will be a big mixture of things Like think about it like most basic one

Oh, I want an agent which will look at the GitHub issues and submit pull requests, right? Yes, you can have an agentic loop with a skill, but reality is you probably want to have a hard-coded workflow which will say, look for issues, start a sandbox, like start, I don't know, with agentic loop, or maybe just cloud inside. right, submit pull requests, watch for pull requests, reply. So practically, this is more like kind of well-defined workflow. And if you start looking at real use cases, most of them are like that. And I personally think they will have more, what would be, say, traditional deterministic software out there than fewer agents. The way I kind of, somebody said it once, and I kind of like it, is agents will replace people, but people still need to operate some software, right, like, and operate some operations, APIs, and so on. And these things will stay, right? You're not going to replay, like, I don't know, money transfer API with agents. But agents will call money transfer API to purchase something. So my personal opinion, the amount of actual code, which is more traditional code,

will actually increase 100-fold, maybe a million-fold, because it's so much easier to produce this code these days. And nobody thinks about durability of that code, and temporal gives you out of the box. And it's not only durability. I think one thing which we discovered, nobody thinks about securing that code. because people talk about security of agents. So they put guardrails around like, and you can do it in harness until agent hacks the harness. But at least people try. But the moment you have some code mode or code generated by an agent, all you can do is sandbox or maybe some static validation. And it's not the right way to do that, right? And Temporal by its execution model allows you practically have guardrails on agent generated code. And one thing we are thinking about is like, can you have company-wide guardrails? not like this MCP gateway, which is very limited, and not-generated code uses MCP gateways, and also don't harness PCP, but can I have kind of company-wide centralized place to guardrail all your applications, including, again, not only just Argentic groups,

but actual agent-generated code? Yeah, and I think that agent has become a pretty overloaded term as well, where people use flexibly agents to refer everything from single shot to an LOM to like fully dynamic decision making and so forth. And I think the reality, like I agree with you, I think that most of these systems are going to be full body software systems where there's some level of by definition agent sort of dynamic orchestration, but then other parts of it are going to be more workflow-y or single shot or deterministic. And it's the combination of that stuff that makes like a really interesting piece of software. And then from a durability standpoint, you don't want just the agentic loop to be durable, you want the whole software system to be durable. So the durability expands beyond just the single point of the agentic loop. And this is exactly why Temporal solved this problem for thousands of companies, and a lot of companies run mission-critical workloads on Temporal, from banking payments to... Every Snapchat story is a Temporal workflow.

And every Coinbase transaction. So when you do traditional things, so it's kind of Companies don't want to lose that investment in their traditional systems. They want to tie all these things together. And Temporal is actually a perfect glue to tie traditional systems with agentic systems using single glue and single security, single durability, and single approach. I want to get into some of the new announcements you made, but just one more thing on Temporal. Can you kind of walk me through specifically what's happening when I write code using Temporal and the code's actually executing? What are the pieces of the state management? What's being sent? Like if I'm using Temporal in the cloud, what is being sent to the cloud? What's being sent to me? Like how does that kind of work from like a transactional standpoint? Yeah, so first thing, just as I mentioned, Temporal is an open source platform and it consists from backend server and server uses traditional database. So you can use Postgres, Cassandra, MySQL, SQLite. Then you have SDKs, which are libraries which you link into your application

and we have like nine SDKs in different languages from Rust to kind of TypeScript, and you run the video code yourself. So the idea is that you bring your own compute, you run this code yourself, the way you would run present Kafka consumer, and there is backend cluster, and when we say temporal cloud, it actually holds the cluster itself, right? So we only, in the same way as Confluent, for example, would host Kafka cluster, right, for their customers. That is the same approach. And the nice thing about it is that, first, because temporal cloud never sees the compute, and also because you can encrypt every message before sending to Timporal. We never see the payload in clear text as well. So we're kind of a control plane which orchestrates these flows without understanding the actual business logic and seeing any data. This is why it's very secure and we can pass security view of any bank because once they understand that. Also, one thing we also do is that we never connect back. All these processes and applications always connect to our cloud, usually through private think, which also kind of makes the configuration of networking

as much simpler. That is kind of the main idea about security model around that. One kind of point is actually added support for things like recently added support for compute, like lambdas, like functions. For example, you can do agent core, you can do AWS Lambda, you can do Google Cloud Run, and we're adding more and more integrations with different providers. So you don't necessarily need to run it kind of on your premises. you can use cloud providers. And we probably will add our own compute at some point as well. I think Lambdas have like a hard 15-minute execution ceiling. Like, how does that kind of play? Like, if the activity, like, we genuinely need to run longer than that on its own. So workflow doesn't have limit because workflows are not executed. They can be activated, perseverated, so you can workflow run for a year and still use these 15-minute chunks. By the way, I think they increased this limit recently. So I think it's not 15 anymore. But even when it was 15, it worked fine. But yes, activities had to be limited to 15 minutes if they run on Lambda. There's a bunch of new pieces you announced at Replay this year,

like standalone activities, workflow streams, serverless workers, external payload storage. What was the actual problem that kind of brought you to build some of it? Maybe we'll start with standalone activities. Yeah, so standalone activity, again, we have workflows which orchestrate tasks, right? And these tasks we call activities. and activities which actually perform real work, talk to external services and so on. And what we found is that a lot of our users actually use Temporal with a single activity workflows. So we'll write workflow, which all it does invokes a single activity because sometimes they just wanted to use other features of Temporal because, for example, our task use have priorities, fairness, flow control, visibility, cancellation. So we have a lot of features long running, like hot bits. And they just wanted to use these features, but they didn't need to have multiple steps, right, in the sequence. They just wanted to use it in a very smart queuing system. And we can realize that, and we added a much more efficient and cheaper version of that, which we call standalone activity.

It's still the same activity implementation. You can invoke it from a workflow, but you also can invoke it from outside. And that was kind of the main thing. And another reason I really was excited about that is we have this technology called Nexus RPC, and the idea of Nexus is, think about RPC, like usually you have services, microservices they have service definitions, APIs and you can call them but the moment you say oh this operation can take three hours, like you can throw away the whole RPC paradigm, right? You need to go to queues or you need to go to webhooks and so on. And give it to five engineers they'll model that long running operation differently and we said why we just don't extend the normal RPC paradigm and you still have service definitions but operations are guaranteed to be called and they can be as long running as necessary. And we practically call it Nexus RPC, tightly integrated with temporal. But when you implement a Nexus operation, you can implement it as a workflow, naturally. But sometimes it's a kind of short operation, right? I want to just retry it. And standalone activity is the best way to implement that.

So the standalone activity, it doesn't have a workflow on top of it, right? So how does it track the state? It's actually tracking state in the standalone activity. So you can think of it as a very optimized built-in workflow within temporal server. So it doesn't appear as a workflow, But obviously, there is a state, right? So, like retries, like next, a durable timer to retry, right? And you still visibility records. You can list them in UI, kind of which standard activities were there. You can cancel them. So, there is a state machine living inside of service, but it's more lightweight state machine than the whole workflow. Yes, we actually implemented special technology inside of Timporal. We call it Chasm, which allows to build the state machines, custom state machines, much more efficiently. So, external activity was one of those kind of first users of that framework. And then workflow streams, my understanding is that it batches events through a signal to publish and a long-running update for subscribers. And then there's no multi-device standout through workflow streams. Is that right? Yeah, workflow streams are practically, it is to solve a very specific problem

with just shipping kind of streams from activity to workflow kind of to client. So practically your UI watching the tokens as they come in, they're not like replacements for Kafka streams in any way. They're not even like, it's solving this kind of like a talking stream problem. No, it pops up. Yeah, it's not pops up. It's purely, think about like very large number of very small throughput streams versus big pipe like Kafka is. So that is, practically imagine you're building a harness. You want to kind of show updates as things are executing on the background. And then it's kind of updating UI from that. This is kind of how it's done. You know, SDK core has been Rust underneath it for, I think, a number of years. And then now you've come out with a first-class Rust SDK. What was kind of missing from what you had before to make it so that you needed to come out with a dedicated Rust SDK versus what was there before? So, temporal SDK is pretty fat because we practically implement the whole kind of very complex statement on the client side.

because of determinism requirements we need to have deterministic dispatcher for example if it's Python we have deterministic async I.O. loop and we do additional checks around determinism it's pretty kind of complex and we wrote it twice in Go and Java and we realized if we need to support multiple languages it will be very very expensive to write these SDKs from scratch. So we ended up writing what we call SDK core and we picked Rust mostly because Rust is very embeddable in other languages It's much easier to have Rust library in Python than, for example, you can have Go library inside of Python. It would be very weird, right? So this library gives you a pretty low-level API, which other SDKs consume. But when we did Rust SDK, we added user-facing abstractions, like activities, workflows, like functions and clients. So you practically write the same way you have TypeScript, JavaScript, sorry, Python 1 or Java 1. Now you have Rust SDK. A nice thing about Temporal is that all of them can interoperate, right?

So if your company uses multiple languages, Temporal can be the glue which allows you to, all these components, talk to each other in a reliable manner. Would it be possible to have part of your code written in one language? And I guess you can hand that off to the, since we have another process running in another language using Temporal. Is there some notion? Could you share state across that? No usually it doesn share state Usually your workflow has state It stateful and workflow is written in one language But activities and child workflows are usually can be in different language And processes which start workflows, I interact with them from outside of temporal ecosystem, can be also in third language or fourth language. Also, they describe Nexus RPC, right? Obviously, clients and handlers can be in different languages. We're adding actually code generation there to kind of make this much easier to integrate different technologies. Alright, yeah. Okay, that makes sense. And then You added there's this non-determinism detection on workflow features to catch wakes that didn't come from an SDK-controlled operations.

Like, is that a runtime check, or is there something else that's going on in order to catch those? This is SDK-specific, right? So, for example, in TypeScript, we actually run every workflow in its own kind of mini-container using the eight isolates. So you can have global variables, you can call any APIs, and we guarantee that the code will execute deterministically just by container. So when you write code, you don't need to think about it. The only thing you cannot call certain libraries, we limit libraries you can call from the workflow. You should call those libraries from your activities, which is just Node.js kind of functions. But for example, in some other languages, like for example, Java, we don't put any restrictions. You practically have to do GoCa, specific APIs yourself. For those languages, we provide static checkers. So for example, Go and Java, you can kind of statically check your code that you don't call prohibited API. The space around you has gotten a lot more crowded. There's a lot more players in the market now. Restate, D-Boss, Resne, Little Horse.

There's a whole host of them, essentially. They're all kind of chasing a piece of this. Does that competition kind of help validate the category that you've sort of trailblazed? Is that how you think about it? Oh, yeah. Actually, I was thinking about it. I think it's exciting. You invent something, not just you, right? that the whole world is trying to implement this. I think it's amazing. Some of them have some interesting ideas which approach it from a different angle. Obviously, they need to differentiate so they're not just trying to repeat us because it wouldn't make any sense. They're trying to find different angles. And I obviously have my own opinions about each of those angles and why we're still the best solution for that. But I think it's amazing that it's happening. And yes, it's certainly... I think durable execution, if I said when we talked, I don't know, last time, I think it was still kind of nobody thought about it. It was a niche thing. Nobody was using that in their marketing. Now there are multiple companies and even like very big companies, they

explicitly use durable execution even for things which are not durable execution. But at least it became a term which you want to get attached to. I think it's amazing. In terms of where you think about your position, honestly, I think you're very much the category leader, but in terms of your moat, like I've heard you say that this kind of infrastructure takes years that you just can't compress. Is that how you think about your moat? Is all the years of distributed engineering systems work that has gone into this or is it something else? There's operational maturity, there's an ecosystem you've built around this, the trust that you've built with these different clients over the years. How do you kind of think about your position from a differentiated perspective? I think all of it. Obviously first we have the most number of SDKs, right? We have the most mature system. We can scale probably better than anyone else. I think they are the only ones who are pure open source, by the way, because all our competition is not real open source, right? Either use more restricted licenses or they have proprietary components which make the system unusable in production.

We have like real open source with every enterprise feature out there. For example, multi-region replication, very enterprising feature, right? It's part of our open source. So I think this is the largest, most important thing, because then we can discuss about technical merits, right, of specific decisions. But I think being fully open source, and the MIT license, I think, is our trend. So far, I've seen some innovation, but I didn't see anything which would say that, oh, it actually completely changes the paradigm, right, or makes it so much better. Everybody has to make trade-offs, and I don't agree with most of those trade-offs. I think the kind of angle people, let's say, attack us, which probably not right word, but try to compete with us, what they call simplicity, right? I think position always is complicated, right? And we are simpler. And usually it means some trade-off, right? Or just not having features. Like it's very easy to say we are simpler if you have like 10% of features, but when you start adding them, you clearly start seeing that any product will become more complicated. But a lot of that is just, for example, philosophical.

For example, for us, security is more important and making sure a system will not fail in production. And as I said, TypeScript is decay. We separate out workflows into these deterministic containers, and we guarantee that they will not fail, and you cannot write codes which will fail, right? Because we put a lot of effort making this container. Competitions, they just go and say, we'll write workflow code and activity code in a single file, all mixed together, which looks shorter. If you do Hello World, compare them, our sample will work longer. But at the same time, it's very easy to make a mistake in their code, which will mix up any data or any variable or forget about this. And you will get very nasty production failure. So it's kind of philosophical. I would prefer to do a little bit more longer code, but safer code versus simpler code, which is not safe. I think this is kind of where we differ. Why is the investment in open source so important? Like, couldn't you also take that as beyond a certain point, you're potentially hurting yourself because someone can always be like,

well, you know, I can run this, you know, I can go grab the source code and, you know, run this and this and I'll deal with the operational overhead, but I guess in many years I can throw it at it. First, when you get into open source, you need to realize you cannot capture 100% of value by definition, right? It's just given. So I think it's expected. But the business reason, besides like saying, oh, we're good citizens, is that people run mission-critical workloads in Timporo, right? There are a lot of companies, I cannot name all the names, but even if you go to our reference pages in our conference, you will see how many companies run on Temporal. When companies kind of run mission-critical stuff, they need to make sure that we are good citizens, right? And, you know, this is a real world. I can promise whatever, right? But they need to have escape hatch, right, hatch, if Temporal starts misbehaving. And having fully open source, fully featured platform is that way. even like for example if you take something like BSL license BSL license kind of open source but not really nobody can run it

as a service but imagine if we go and raise our prices 10x what will happen tomorrow Amazon will run it or somebody else will run it and our license doesn't prohibit that also you can run it but also some FedPlatty can run it and I think this keeps us honest and it allows users to have this peace of mind I think and it's important also just practical for example we don't have FedRAMP And we have a lot of customers which use our cloud but run on open source in FedRAM. And that is also very common. And there are practical reasons to run open source without paying us. And we fully support that. And sometimes we have agreements with them to support them for those scenarios. So I think it's a very practical business decision. Yes, it makes some people even internally uneasy. Because obviously, if you have go-to-market, go-to-market won't store on every workload out there. But this is life. And I think it's a very important strategic decision. And that's why we cannot change it. The moment we change StartMessence's our license, we will lose half of our business, at least long term. You've been at this for a decade now, starting with the open source project,

and worked tangentially in this space for even before that. I guess, what keeps you excited to keep working on this problem? I think it's just understanding that probably we found something and we found some abstraction, right? and the way to build distributed systems that probably like, I don't think there is a company which doesn't need that. I don't think there is a developer which, it's amazing that still not every developer knows about it, but once developers have learned about the durable execution and temporal, they cannot go back. The kind of total addressable market, and again, not even from money point of view, but like, let's say, for the at least idea is almost infinite. Also, I think weaving that into this new Argentica world, I think is super exciting. At some point, I don't say I was bored, but this is infrastructural software. Things don't happen overnight. You cannot build a wipe code feature and put it in production tomorrow. Which means that usually you work on ideas which you had like 3 to 4 years ago or maybe like 10 years ago. And certainly at some point things are slow.

But now with AI it's completely changed. So now I need to deal with new ideas, new problems and new customers every day. So I think I'm super excited about the future and how AI changes the industry. I know it's hard, but I think it's clearly, I'm on a very positive side. Do you think about how, as more and more code gets generated by AI, how Temporal becomes part of that sort of default tool chain? So if I go and I'm building some sort of application, ideally my, you know, whatever that is, codex, cloud code knows that if I'm running this system, you know, I should be using something like Temporal and durable execution principles to make it so that I'm not going to have to deal with these, you know, normal faults that happen in distributed systems. It's already happening. We see a lot of adoption coming from agents. And I very frequently hear from people on our public open source support channel, like in our Slack or on conferences, that they learned about us because Cloud or OpenAI just told them so

because they frankly present the problem. and they say, no, you want to use durable execution for this. Also, we just created our own skills. And the temporal skill is pretty easy to start and write your workflow just from practically a high-level description. We're certainly working to improve, for example, our cloud experience. Our dream is, for example, being able to do 100% agentic sign-up, for example, for the cloud without ever going to... I don't think it's possible right now because of some credit card information and stuff, But I certainly see the future when you can 100% productize your application without ever kind of clicking the button or doing something, just talking to your agent. Yeah, I mean, I think that even though like logging into a dashboard experience is going to disappear in the next couple of years, because why do that when I can just go to my agent and ask it to pull down whatever the latest information is and where I'm getting problems and sort of debug it from there? Yes, I think the whole kind of lifecycle and where code lives and what code is. and yeah, I think it's amazing to innovate on that. I talk to a lot of people and I see a lot of approaches

and I clearly see that a lot of very smart people are thinking about how soft video lifecycle will look like a few years from now. I think it's going to change a lot. You know, as we come up on time, is there anything else you'd like to share? Again, if you never looked at Timporal, please go to Timporal.io and just check out our documentation tutorials and just learn about the rubble execution, right? I think this is a new concept for a lot of people and I know a lot of people who practice that it's completely changed how they build software, how they operate software and it was practically life-changing for them. So just join the club. Awesome. Well, I'm sure that's very, very nice to hear as a founder and creator of the category. So thanks so much, Max, for coming back on the show and giving us the update. Thanks for having me. Cheers. you

番組の概要欄(原文)

Coordinating long-running processes on top of distributed systems is one of the persistent hard problems in software. A process that runs across many steps can’t count on finishing in one clean pass, since the machines running it may crash, stall, or drop connections. To handle this fragility, developers have often resorted to writing layers of retries, timeouts, and checkpointing to keep state alive across failures. However, this custom plumbing is often brittle, hard to maintain, and can break down at scale. Temporal is an open-source platform built around an approach it calls durable execution. Developers write a workflow as a straightforward sequence of steps, and the platform preserves its full state underneath, so the code can survive a crash and resume exactly where it left off. The underlying technology was created at Uber over a decade ago. Since then, Temporal has become foundational infrastructure for AI and agent workloads, where long-running tools and agent loops need exactly this kind of durability. Maxim Fateev is a co-founder of Temporal. He returns to the show with Sean Falconer to discuss how durable execution works, why it’s infrastructure rather than a framework, how it fits the non-deterministic world of AI agents, its new capabilities, and why Temporal’s fully open source strategy is central to its moat. Sponsorship inquiries: sponsor@softwareengineeringdaily.com The post Temporal and Durable Execution for AI Agents appeared first on Software Engineering Daily.

出典・この記事について

番組
Software Engineering Daily(Software Engineering Daily)
元の回
Temporal and Durable Execution for AI Agents
配信日
要約作成日
公式サイト
softwareengineeringdaily.com

この要約・解説記事は、元の音声を文字起こしした内容をもとに AI(Claude)が日本語で作成したものです。 固有名詞や数値に誤りを含む場合があるため、正確な内容は元の音声でご確認ください。制作方法について

X でシェア

関連エピソード