クラウドエージェント構築から得た教訓(12 分読了)
Cursor は、クラウドエージェントの品質向上には単なるモデル性能だけでなく、開発者環境を完全に再現する「OS レイヤー」の構築が不可欠であると示した。
キーポイント
開発環境が製品の核心である
クラウドエージェントの出力品質を決める最大要因は、ローカル開発者が持つような完全な開発環境を再現できるかどうかであり、これが製品そのものと言える。
環境構築の不備は質的低下として現れる
ローカルと異なりクラウドでは環境構築が不完全だと明示的なエラーではなく、モデルの能力不足と誤認されやすい微妙な出力品質の低下として現れる。
単なる移植から OS レイヤー構築へ
クラウドエージェント開発は、ローカル環境をサーバーにポートする作業ではなく、その上で動作するための基盤となる「OS レイヤー」を構築する作業へと進化している。
モデルの知能化が環境依存度を高める
以前は環境設定の影響が小さかったが、モデルの推論能力が高まるにつれ、実行・検証に必要な環境が整っているかが成否を分ける決定要因となっている。
重要な引用
The single biggest factor in cloud agent output quality is ensuring it has a full development environment, like a developer has.
Instead of a crash or an error message, often the only indication is a subtle degradation in output quality.
Building cloud agents... looks less like porting a local agent to a server and more like building an operating layer around it.
影響分析・編集コメントを表示
影響分析
この記事は、AI エージェントの実用化において「モデル性能」だけでなく「インフラ・環境構築」がボトルネックであることを明確に示しており、業界全体がハードウェア依存型から環境制御重視のアーキテクチャへシフトする必要性を説いている。開発者や企業にとって、エージェント導入時に単に API を繋ぐだけでなく、完全な再現性のあるサンドボックス環境を設計・維持するコストと技術的課題が新たな重要課題として浮き彫りになるだろう。
編集コメント
モデルの推論能力が飛躍的に向上した現在、エージェントの実用化における最大の障壁は「コードを書く力」から「実行する環境をどう整えるか」へと移り変わっている。この洞察は、次世代 AI エージェント開発の方向性を示す重要な指針となる。
1 年前にクラウドエージェントを初めて立ち上げた際、それらはローカルエージェントの単純な拡張のように思えました。それから以来、クラウドエージェントの機能は大幅に拡大しました。
クラウドエージェントは今や独自の専用仮想マシン上で実行され、独自の環境、依存関係、ネットワークアクセスを持っています。並列処理が可能で、無人でも動作でき、ラップトップ上のローカルエージェントよりも長いタスクを任せることができます。
これらの機能は、エージェントがあなたのラップトップ上で動作している場合よりも、環境設定、信頼性、オーケストレーションに関する課題をより顕在化させます。
本稿では、クラウドエージェント構築において得た最大の教訓と、なぜこの作業がローカルエージェントをサーバーに移植するものから、その周りにオペレーティングレイヤーを構築するものへと変化しているのかについて共有します。
開発環境こそが製品である
過去 1 年間を通じて、クラウドエージェントの出力品質における最大の要因は、開発者が持つような完全な 開発環境 を確保することであると学びました。
これはローカルではそれほど意識する必要がないことです。なぜなら、ローカルエージェントはラップトップから無料であなたの作業用開発環境を継承するからです。クラウドでは、すべてを一から再構築する必要があり、完璧にできていない場合にそれがどれほど深刻かを判断するのは、意外にも難しいものです。
クラッシュやエラーメッセージの代わりに、出力品質の微妙な低下だけが唯一の兆候となることもよくあります。最初はそれに気づかないか、あるいは気づいてもモデルのせいだと片付けてしまうかもしれません。
しかし、私たちは何度も同じ診断にたどり着きました:クラウドエージェントが作業を実行または検証するために必要な環境を持っていないという問題です。1 年前は、モデル自体が環境をあまり活用できなかったため、この問題はそれほど重要ではありませんでした。しかし、モデルが賢くなるにつれて、環境のセットアップがその潜在能力を最大限に発揮できるかどうかを決定づける要因となっています。
image
image
今日、"完全な環境"を実現するには、驚くほど多くのインフラストラクチャを再構築する必要があります:
- エージェント環境を構築するためのより優れたユーザーツール
- メッセージ間でエージェント仮想マシン(VM)を効率的に休止および再開する方法
- VM イメージを迅速かつ永続的にチェックポイントし、復元およびフォークするためのパイプライン
- エージェントと人間が両方とも環境を理解して対話できるようにするための、きめ細やかなハーンとクライアントの統合
そして、クラウドエージェントがより多くの作業を引き受けるにつれ、PR の作成、依存関係の取得、調査などのために制御されたネットワークアクセスが必要となります。時間の経過とともに、私たちは本質的にエージェント向けのエンタープライズ IT を構築することになり、機密情報の削除、ネットワークポリシー、認証情報管理まで備えたものとなりました。
長時間実行されるエージェントには永続的な実行環境が必要
クラウドエージェントは、ローカルエージェントとは異なる種類の信頼性の課題を提示します。あなたのラップトップ上でローカルリソースを競合するのではなく、クラウドエージェントは独自の隔離された VM で実行されます。これにより、開発者は多数のエージェントを並列で実行し、しばしば数分ではなく数時間を要する長時間実行タスクを委任することが容易になります。
しかし、VM での実行は、推論プロバイダの障害、ポッドの置き換えが必要になること、EC2 ノードのダウンなど、様々な中断への曝露を生み出します。
私たちは当初、ワーカーノードがエージェントを引き受けて完了までループさせる「ワーク・スチーリング」アーキテクチャでクラウドエージェントの構築を始めました。これはローカルで機能するものをサーバーに移植したものでしたが、脆いセットアップでした——私たちの初期ベータ版のクラウドエージェントは、信頼性が 9 のうち 1 という状態で運用されることがよくありました。
image
image
クラウドエージェントの成熟に伴い、Temporal がすでに解決している多くの永続的な実行プリミティブ(例:リトライメカニズム、マシン間でのタスクスケジューリング、ノード障害に対する耐久性)を再構築しようとしていることに気づきました。そこで、私たちはそれらを再構築するのではなく、Temporal への移行を選択しました。
image
image
Temporal 上の現在のエージェントループは、推論の信頼性の瞬間的な低下やポッドの休止・再開、さらには数日甚至いは数週間にわたる実行にも耐えることができます。この移行だけで、私たちは信頼性レベルを「9」が2桁からさらに向上させました。現在、Temporal は700 万を超えるユニークなワークフロー全体で、1 日に5,000 万件以上のアクションを処理しています。社内のプルリクエスト(PR)の40%以上がクラウドエージェントによって作成されており、その割合はさらに増加しています。
image
image
長年にわたり、Temporal ワークフローのアーキテクチャをより良く構築する方法を学んできました。一度きりのタスク完了後に終了する複数の短いワークフローへと移行し、「永遠に続く」エージェントワークフローから脱却しました。これによりバージョンアップが容易になりました。また、タイムアウトやリトライを非同期ツール呼び出しとしてより正確に捉えるためにアクティビティを分割しました。サブエージェントや推論プロバイダの障害が発生したことで、私たちの基礎的な前提条件も変化しています。
image
image
会話状態からエージェントとマシンを分離する
クラウドエージェントはもはや単一のマシンで動作する一つのループではありません。代わりに、エージェントは一台のマシン上で実行されたり、複数のマシンに非同期のサブエージェントを生成したり、ローカルで開始して作業をクラウドへ委譲したりします。また、サブエージェントが親プロセスよりも長く存続したり、全く異なる種類のポッド(注:コンテナ実行環境)上で動作することさえあります。
image
image
その仕組みを機能させるために、エージェントループ、マシン状態、会話状態を独立したコンポーネントとして維持することが有効であると私たちは見出しました。エージェントループは VM 自体ではなく Temporal 内に存在するため、ポッドのライフサイクルを独立して管理し、読み取り専用 VM やプリウォームされた VM といった最適化を含むさまざまな種類のポッド間でエージェントを実行することができます。
会話側においては、ストレージとストリーミング層をコアなエージェントワークフローから分離しました。ウェブおよびデスクトップクライアントへ会話更新情報をストリーミングする効率的なアペンドオンのみストレージメカニズムを構築しました。この層はリトライ処理を担当しており、エージェントループのステップが部分的な出力をストリーミングした後に失敗し、再試行された場合でも、クライアントはそのことを検知してストリームを巻き戻し、古いデータではなく新しいデータを表示することができます。
邪魔にならない方法を学ぶ
image
image
クラウドエージェントのハネスを構築するということは、どの程度の振る舞いが決定論的であり、どの程度がエージェントに委譲されるかを絶えず再評価することを意味します。
当初、私たちはエージェントをあまり信頼していなかったため、ハルネスは各タスクの後に作業を再確認し、強制的にコミットしてプッシュしていました。モデルが賢くなるにつれて、ロジックをハルネスからエージェントが制御するツールへと移行させ始めました。1 年前は、マルチリポジトリ設定にはハードコードされたハルネス動作が必要でしたが、現在はエージェントにリポジトリのレイアウトを与え、ブランチやプルリクエスト用のツールを公開して、作業方法を自分で判断させることができます。
CI オートフィックスにおいても同様のことが起こりました。以前のバージョンのクラウドエージェントハルネスには、ジョブ失敗ログを取得して VM に書き込むロジックが含まれていましたが、現在はエージェントに GitHub CLI のアクセス権を与え、検索可能なファイルに大規模な出力を自動的に書き込むようにしています。エージェントへの通知は大幅に簡素化され、この傾向は今後も続くものと予想されます。
ハルネスがなくなるというよりは、その中身が変化しているのです。コンピューター操作(Computer use)は現在の良い例です。私たちのクラウドエージェントハルネスには、コンピューター操作専用のサブエージェントタイプがあり、独自のモデルルーティング、カスタムプロンプト、画面録画を備えています。VNC と Chrome は環境に属しており、親エージェントとサブエージェントの間で共有されています。これにより、親エージェントは Playwright スクリプトを実行するなどして、これらのリソースを直接利用できます。この足場(スキャフォールディング)を使用しているのは、モデルがまだ単独でコンピューター操作を処理する準備が整っていないためですが、それでも呼び出しのタイミングはエージェントが制御します。
クラウドエージェントは、ローカルエージェントとは異なる種類のプロンプトをハネスでも必要とします。ブロックされるコストがはるかに高いため、より自律的な行動を促すよう推奨しています。ローカル環境では、エージェントが停止して許可を待っている状態を把握できますが、クラウド上では数時間放置された後に初めて確認に行くという状況も起こり得ます。
自己修復型エージェント環境
将来を見据え、私たちはエージェントの手を握り続けるか、完全に手を引くかの二択を超えたアプローチに注力しています。より良いパターンは、エージェントが周囲のシステムを理解するためのツールを提供することです。
クラウドエージェントには、機密情報が不足している場合やネットワークアクセスがブロックされている場合、あるいは環境自体が進捗を妨げている場合に報告し、その後自己修復的な方法で行動できる能力を持たせたいと考えています。最近の研究ブログ では、これを達成するための一つの道筋として「autoinstall」と呼ぶアプローチについて言及しました。
クラウドエージェントはここ数ヶ月で劇的に改善され、今後その変化の速度がさらに加速すると予想しています。Cursor のクラウドエージェントを利用すれば、チームは裏側のインフラを構築・維持することなく、この広大な機能面を活用できます。
原文を表示
When we first launched cloud agents a year ago, they seemed like a straightforward extension of local agents. Since then, cloud agent capabilities have expanded considerably.
Cloud agents now run on their own dedicated virtual machines, with their own environments, dependencies, and network access. They can work in parallel, run unattended, and take on longer tasks than a local agent sitting on your laptop.
These capabilities introduce challenges around environment setup, reliability, and orchestration that are less pronounced when an agent is running on your laptop.
In this post, we want to share the biggest lessons we’ve learned building cloud agents, and why the work increasingly looks less like porting a local agent to a server and more like building an operating layer around it.
The development environment is the product
Over the last year we’ve learned that the single biggest factor in cloud agent output quality is ensuring it has a full development environment, like a developer has.
This isn’t something you have to think as much about locally, because local agents inherit your working development environment for free, from your laptop. In the cloud, you have to reconstruct all of that from scratch, and it’s surprisingly hard to tell when you haven’t done it perfectly.
Instead of a crash or an error message, often the only indication is a subtle degradation in output quality. You might not notice it at first, or if you do, you might chalk it up to the model.
But over and over again we've traced it back to the same diagnosis: the cloud agent not having the environment it needs to execute or verify its work. A year ago this mattered less because models couldn't make much use of their environment anyway. But as they've gotten smarter, the environment setup has become the determining factor in whether they execute at their full potential.

Today, getting to "full environment" requires rebuilding a surprising amount of infrastructure:
- Better user tools for building the agent environment
- Methods to efficiently hibernate and resume agent VMs between messages
- Pipelines to quickly and durably checkpoint, restore, and fork VM images
- Tight harness and client integrations so that agents and humans alike can interpret and interact with the environment
And as cloud agents take on more work they need controlled network access to create PRs, pull dependencies, and do research. Over time, we’ve ended up building what is essentially enterprise IT for agents, complete with secret redaction, network policies, and credential management.
Long-running agents need durable execution
Cloud agents present a different kind of reliability challenge than local agents. Instead of competing for local resources on your laptop, cloud agents run in their own isolated VMs. This makes it easier for developers to run many agents in parallel and delegate long-running tasks that often take hours instead of minutes.
But, running in a VM creates exposure to disruptions like inference provider outages, pods needing to be replaced, and EC2 nodes going down.
We started building cloud agents with a work-stealing architecture, where worker nodes could pick up agents and loop them to completion. It transplanted what works locally to a server and it was a fragile setup—our early beta of cloud agents often operated at one 9 of reliability.

As cloud agents matured, we found ourselves on the verge of rebuilding a lot of the durable execution primitives that Temporal already solves (e.g., retry mechanisms, scheduling work across machines, durability across node failures), so instead we migrated there.

Our current agent loop on Temporal can survive blips in inference reliability, pod hibernation and resumption, and runs that stretch across days or even weeks. That migration alone took us past two 9s of reliability and today, Temporal handles more than 50 million actions per day across more than 7 million unique workflows. Internally, more than 40% of our PRs come from cloud agents, and growing.

Over time, we've learned how to better architect our Temporal workflows. We've moved from "eternal" agent workflows to multiple shorter ones that exit after completing a single task, which makes version upgrades easier. We’ve also split out activities to better capture timeouts and retries as async tool calls, subagents, and inference provider outages have changed our underlying assumptions.

Decoupling agents and machines from conversation state
A cloud agent is no longer just one loop running on one machine. Instead, an agent might run on one machine, spawn async subagents across several, or start locally then delegate work to the cloud. A subagent might even outlive its parent, or run on a completely different kind of pod.

To make that work, we've found it valuable to keep the agent loop, the machine state, and the conversation state as decoupled components. Because the agent loop lives in Temporal rather than on the VM itself, we can manage pod lifecycles independently and run agents across different kinds of pods — including optimizations like readonly VMs or prewarmed VMs.
On the conversation side, we separated the storage and streaming layer from the core agent workflow. We built an efficient append-only storage mechanism that streams conversation updates out to web and desktop clients. This layer accounts for retries, so that if a step of the agent loop fails after streaming partial output and then gets retried, the client can detect this, rewind its stream, and show the new data instead of the old.
Knowing how to get out of the way

Building a cloud agent harness means constantly reevaluating how much behavior is deterministic and how much gets handed to the agent.
Early on, we didn't trust the agent very much, so the harness would double-check its work after every task, force a commit, and push. As models got smarter, we started moving logic out of the harness and into tools the agent controls. A year ago, multi-repo setups required hardcoded harness behavior. Now, we can give the agent the repo layout, expose tools for branches and PRs, and let it decide how to do the work.
The same thing happened with CI Autofix, where earlier versions of our cloud agent harness contained logic for grabbing job failure logs and writing them to the VM. Now, we just give the agent access to the GitHub CLI and automatically write large outputs to files it can search through. The notification to the agent got much simpler, and we expect that trend to continue.
The harness isn’t going away so much as what it contains is changing. Computer use is a good example right now. Our cloud agent harness has a dedicated subagent type for computer use, with its own model routing, custom prompting, and screen recording. The VNC and Chrome belong to the environment, which is shared between the parent agent and the subagent. This lets the parent make use of them directly, for example, by running a Playwright script. We use this scaffolding because models aren't quite ready to handle computer use on their own, but the agent still controls when to invoke it.
Cloud agents also need different kinds of prompts in the harness than local agents do. We encourage them to be more autonomous, because the cost of blocking is much higher. Locally, you know when an agent has stopped and is waiting for permission, but in the cloud, it could sit there for hours before you go back and check on it.
Self-healing agent environments
Looking forward, we're focused on moving past the binary choice between holding the agent’s hand and getting out of its way. A better pattern is to give the agent tools for understanding the system around it.
We want cloud agents to be able to report when secrets are missing, network access is blocked, or when their environment is otherwise preventing them from making progress, and to then be able to act in a self-healing way. In a recent research blog we talked about one path for achieving this which we call “autoinstall.”
Cloud agents have improved immensely in just the last few months, and we expect the rate of change to only accelerate from here. Cursor cloud agents let teams take advantage of this expansive surface without having to build or maintain the infrastructure underneath it.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み