AIニュース最前線
最新ニュースAI日報Hacker日報週報動画AIツールトレンド企業

AIニュース最前線

世界中のAI最新情報を日本語で毎時更新

最新ニュース日報トレンド企業プレミアムRSS
© 2026 ainew.jp特定商取引法に基づく表記
ニュース一覧元記事を開く
Cloudflare Blog·2026年4月13日 22:08·約5分で読める

エージェントが独自のコンピュータをサンドボックスで利用可能に

#AIエージェント#インフラストラクチャ#サンドボックス環境#Cloudflare#コード実行環境
TL;DR

CloudflareはAIエージェントの開発・実行環境「Sandboxes」および基盤となる「Cloudflare Containers」の一般提供を開始し、セキュリティ、状態復元、コスト最適化などの課題を解決するインフラを提供した。

AI深層分析2026年4月13日 23:43
4
重要/ 5段階
深度40%
4
関連度30%
4
実用性20%
3
革新性10%
3

キーポイント

1

AIエージェント専用実行環境のGA

Cloudflare SandboxesとCloudflare Containersが一般提供され、エージェントが安全にコード開発・実行できる専用基盤として利用可能になった。

2

エージェント運用の5大課題を技術解決

バースト対応、クイック状態復元、資格情報分離によるセキュリティ、プログラム制御、使いやすさの課題をインフラレベルで解決した。

3

エージェント開発体験を強化する新機能

安全な資格情報注入、PTYターミナルサポート、永続コードインタプリタ、スナップショット、Active CPU価格設定などを搭載し実用性を大幅に向上させた。

4

主要パートナーの実践事例を公開

Figmaが「Figma Make」で信頼性とスケーラビリティを確保するため、Cloudflare Containersを採用している事例を明かした。

5

持続可能かつオンデマンドの動作

同じIDでアクセスすれば世界中から同一のサンドボックスに接続可能。アイドル時に自動スリープし、リクエストで自動起動する。

6

ネットワーク層での安全な認証情報注入

エージェントが生の認証情報を直接取得しないよう、egress proxy経由でネットワーク層に認証情報を注入し、カスタム認証ロジックを柔軟に設定可能。

7

WebSocketを介したリアルターミナル(PTY)サポート

擬似端末セッションをWebSocketで提供し、xterm.jsと互換性があるため、出力のストリーミング表示や中断・再接続など実際の開発者向けのターミナル操作をエージェントに提供可能。

影響分析・編集コメントを表示

影響分析

CloudflareのSandboxes GAは、AIエージェントが自律的にコードを開発・実行するための標準インフラ基盤を確立する。セキュリティとコスト効率を両立させた設計は、エージェント開発プラットフォームの競争を激化させ、実務レベルでのエージェント活用を加速させる要因となる。

編集コメント

エージェントの実行環境を従来のコンテナラッパーから「エージェントネイティブなインフラ」へ進化させる重要な一歩であり、今後はセキュリティとコスト制御を内蔵した標準基盤として市場が収束していくだろう。

これは、エージェントの可能性を静かに変えるプリミティブの一つです。ファイルシステムの変更をリアルタイムで監視できるエージェントは、人間の開発者と同じフィードバックループに参加できるようになります。

スナップショットによる高速起動

ノートパソコンで作業する(人間の)開発者を想像してみてください。彼らはgit cloneでリポジトリをクローンし、npm installを実行し、コードを書き、PRをプッシュし、コードレビューを待つ間にノートパソコンを閉じます。作業を再開する時が来たら、ノートパソコンを開き、中断したところから続けるだけです。

エージェントがこのワークフローを単純なコンテナプラットフォームで再現しようとすると、問題に直面します。どうやって中断したところから迅速に再開するのでしょうか?サンドボックスを実行し続けることもできますが、そうするとアイドル状態のコンピュートリソースに対して料金を支払うことになります。コンテナイメージから新規に開始することもできますが、その場合は長いgit cloneとnpm installを待たなければなりません。

私たちの答えはスナップショットです。これは今後数週間で展開される予定です。

スナップショットは、コンテナの完全なディスク状態、OS設定、インストール済みの依存関係、変更されたファイル、データファイルなどを保存します。そして後でそれを迅速に復元できるようにします。

サンドボックスがスリープ状態になる時に自動的にスナップショットを取得するように設定できます。

class AgentDevEnvironment extends Sandbox {

sleepAfter = "5m";

persistAcrossSessions = {type: "disk"}; // 個々のディレクトリを指定することもできます

}

プログラムでスナップショットを取得し、手動で復元することもできます。これは作業のチェックポイント作成やセッションのフォークに便利です。例えば、エージェントの4つのインスタンスを並列で実行したい場合、同じ状態から4つのサンドボックスを簡単に起動できます。

class AgentDevEnvironment extends Sandbox {}

async forkDevEnvironment(baseId, numberOfForks) {

const baseInstance = await getSandbox(baseId);

const snapshotId = await baseInstance.snapshot();

const forks = Array.from({ length: numberOfForks }, async (_, i) => {

const newInstance = await getSandbox(${baseId}-fork-${i});

return newInstance.start({ snapshot: snapshotId });

});

await Promise.all(forks);

}

スナップショットはあなたのアカウント内のR2に保存され、耐久性と場所の独立性を提供します。R2の階層型キャッシュシステムにより、Region: Earth全体で高速な復元が可能です。

将来のリリースでは、ライブメモリ状態もキャプチャされ、実行中のプロセスが中断した正確な場所から再開できるようになります。ターミナルとエディタは、最後に閉じられた時の正確な状態で再び開かれます。

スナップショットが公開される前にセッション状態を復元することに興味がある場合は、今日からバックアップと復元メソッドを使用できます。これらもR2を使用してディレクトリを永続化および復元しますが、真のVMレベルのスナップショットほど高性能ではありません。ただし、セッション状態を一から再作成するよりも、かなりの速度向上をもたらすことができます。

imageimage

サンドボックスの起動、'axios'のクローン、npm installの実行には30秒かかります。バックアップからの復元には2秒かかります。

公式のスナップショットリリースにご期待ください。

より高い制限とアクティブCPUプライシング

初期リリース以来、私たちは着実に容量を増やしてきました。標準料金プランのユーザーは、現在liteインスタンスタイプで15,000同時インスタンス、basicで6,000インスタンス、そして1,000以上のより大きな同時インスタンスを実行できます。さらに多くの実行が必要な場合はお問い合わせください!

また、大規模な実行によりコスト効率の良い料金モデルに変更しました。サンドボックスは現在、アクティブに使用されたCPUサイクルのみに対して課金されます。これは、エージェントがLLMの応答を待っている間のアイドルCPUに対して支払う必要がないことを意味します。

これがコンピュータの姿です

9ヶ月前、私たちはコマンドを実行しファイルシステムにアクセスできるサンドボックスをリリースしました。それはコンセプトを証明するのに十分でした。

今私たちが持っているものは種類が異なります。今日のSandboxは完全な開発環境です:ブラウザを接続できるターミナル、永続的な状態を持つコードインタプリタ、ライブプレビューURLを持つバックグラウンドプロセス、リアルタイムで変更イベントを発するファイルシステム、安全な認証情報注入のためのエグレスプロキシ、そしてウォームスタートをほぼ瞬時に実現するスナップショットメカニズム。

これを基に構築すると、満足のいくパターンが現れます:実際のエンジニアリング作業を行うエージェントです。リポジトリをクローンし、インストールし、テストを実行し、失敗を読み、コードを編集し、再びテストを実行します。人間のエンジニアを効果的にするようなタイトなフィードバックループを、今やエージェントも得るのです。

私たちはSDKのバージョン0.8.9にいます。今日から始められます:

npm i @cloudflare/sandbox@latest

原文を表示

When we launched Cloudflare Sandboxes last June, the premise was simple: AI agents need to develop and run code, and they need to do it somewhere safe.

If an agent is acting like a developer, this means cloning repositories, building code in many languages, running development servers, etc. To do these things effectively, they will often need a full computer (and if they don’t, they can reach for something lightweight!).

Many developers are stitching together solutions using VMs or existing container solutions, but there are lots of hard problems to solve:

Burstiness - With each session needing its own sandbox, you often need to spin up many sandboxes quickly, but you don’t want to pay for idle compute on standby.

Quick state restoration - Each session should start quickly and re-start quickly, resuming past state.

Security - Agents need to access services securely, but can’t be trusted with credentials.

Control - It needs to be simple to programmatically control sandbox lifecycle, execute commands, handle files, and more.

Ergonomics - You need to give a simple interface for both humans and agents to do common operations.

We’ve spent time solving these issues so you don’t have to. Since our initial launch we’ve made Sandboxes an even better place to run agents at scale. We’ve worked with our initial partners such as Figma, who run agents in containers with Figma Make:

“Figma Make is built to help builders and makers of all backgrounds go from idea to production, faster. To deliver on that goal, we needed an infrastructure solution that could provide reliable, highly-scalable sandboxes where we could run untrusted agent- and user-authored code. Cloudflare Containers is that solution.”

  • Alex Mullans, AI and Developer Platforms at Figma

We want to bring Sandboxes to even more great organizations, so today we are excited to announce that Sandboxes and Cloudflare Containers are both generally available.

Let’s take a look at some of the recent changes to Sandboxes:

Secure credential injection lets you make authenticated calls without the agent ever having credential access

PTY support gives you and your agent a real terminal

Persistent code interpreters give your agent a place to execute stateful Python, JavaScript, and TypeScript out of the box

Background processes and live preview URLs provide a simple way to interact with development servers and verify in-flight changes

Filesystem watching improves iteration speed as agents make changes

Snapshots let you quickly recover an agent's coding session

Higher limits and Active CPU Pricing let you deploy a fleet of agents at scale without paying for unused CPU cycles

Sandboxes 101

Before getting into some of the recent changes, let’s quickly look at the basics.

A Cloudflare Sandbox is a persistent, isolated environment powered by Cloudflare Containers. You ask for a sandbox by name. If it's running, you get it. If it's not, it starts. When it's idle, it sleeps automatically and wakes when it receives a request. It’s easy to programmatically interact with the sandbox using methods like exec, gitClone, writeFile and more.

import { getSandbox } from "@cloudflare/sandbox";

export { Sandbox } from "@cloudflare/sandbox";

export default {

async fetch(request: Request, env: Env) {

// Ask for a sandbox by name. It starts on demand.

const sandbox = getSandbox(env.Sandbox, "agent-session-47");

// Clone a repository into it.

await sandbox.gitCheckout("https://github.com/org/repo", {

targetDir: "/workspace",

depth: 1,

});

// Run the test suite. Stream output back in real time.

return sandbox.exec("npm", ["test"], { stream: true });

},

};

As long as you provide the same ID, subsequent requests can get to this same sandbox from anywhere in the world.

Secure credential injection

One of the hardest problems in agentic workloads is authentication. You often need agents to access private services, but you can't fully trust them with raw credentials.

Sandboxes solve this by injecting credentials at the network layer using a programmable egress proxy. This means that sandbox agents never have access to credentials and you can fully customize auth logic as you see fit:

class OpenCodeInABox extends Sandbox {

static outboundByHost = {

"my-internal-vcs.dev": (request, env, ctx) => {

const headersWithAuth = new Headers(request.headers);

headersWithAuth.set("x-auth-token", env.SECRET);

return fetch(request, { headers: headersWithAuth });

}

}

}

For a deep dive into how this works — including identity-aware credential injection, dynamically modifying rules, and integrating with Workers bindings — read our recent blog post on Sandbox auth.

A real terminal, not a simulation

Early agent systems often modeled shell access as a request-response loop: run a command, wait for output, stuff the transcript back into the prompt, repeat. It works, but it is not how developers actually use a terminal.

Humans run something, watch output stream in, interrupt it, reconnect later, and keep going. Agents benefit from that same feedback loop.

In February, we shipped PTY support. A pseudo-terminal session in a Sandbox, proxied over WebSocket, compatible with xterm.js.

Just call sandbox.terminal to serve the backend:

// Worker: upgrade a WebSocket connection into a live terminal session

export default {

async fetch(request: Request, env: Env) {

const url = new URL(request.url);

if (url.pathname === "/terminal") {

const sandbox = getSandbox(env.Sandbox, "my-session");

return sandbox.terminal(request, { cols: 80, rows: 24 });

}

return new Response("Not found", { status: 404 });

},

};

And use xterm addon to call it from the client:

// Browser: connect xterm.js to the sandbox shell

import { Terminal } from "xterm";

import { SandboxAddon } from "@cloudflare/sandbox/xterm";

const term = new Terminal();

const addon = new SandboxAddon({

getWebSocketUrl: ({ origin }) => ${origin}/terminal,

});

term.loadAddon(addon);

term.open(document.getElementById("terminal-container")!);

addon.connect({ sandboxId: "my-session" });

This allows agents and developers to use a full PTY to debug those sessions live.

imageimage

Each terminal session gets its own isolated shell, its own working directory, its own environment. Open as many as you need, just like you would on your own machine. Output is buffered server-side, so reconnecting replays what you missed.

A code interpreter that remembers

For data analysis, scripting, and exploratory workflows, we also ship a higher-level abstraction: a persistent code execution context.

The key word is “persistent.” Many code interpreter implementations run each snippet in isolation, so state disappears between calls. You can't set a variable in one step and read it in the next.

Sandboxes allow you to create “contexts” that persist state. Variables and imports persist across calls the same way they would in a Jupyter notebook:

// Create a Python context. State persists for its lifetime.

const ctx = await sandbox.createCodeContext({ language: "python" });

// First execution: load data

await sandbox.runCode(`

import pandas as pd

df = pd.read_csv('/workspace/sales.csv')

df['margin'] = (df['revenue'] - df['cost']) / df['revenue']

`, { context: ctx });

// Second execution: df is still there

const result = await sandbox.runCode(`

df.groupby('region')['margin'].mean().sort_values(ascending=False)

`, { context: ctx, onStdout: (line) => console.log(line.text) });

// result contains matplotlib charts, structured json output, and Pandas tables in HTML

Start a server. Get a URL. Ship it.

Agents are more useful when they can build something and show it to the user immediately. Sandboxes support background processes, readiness checks, and preview URLs. This lets an agent start a development server and share a live link without leaving the conversation.

// Start a dev server as a background process

const server = await sandbox.startProcess("npm run dev", {

cwd: "/workspace",

});

// Wait until the server is actually ready — don't just sleep and hope

await server.waitForLog(/Local:.*localhost:(\d+)/);

// Expose the running service with a public URL

const { url } = await sandbox.exposePort(3000);

// url is a live public URL the agent can share with the user

console.log(Preview: ${url});

With waitForPort() and waitForLog(), agents can sequence work based on real signals from the running program instead of guesswork. This is much nicer than a common alternative, which is usually some version of sleep(2000) followed by hope.

Watch the file system and reach immediately

Modern development loops are event-driven. Save a file, rerun the build. Edit a config, restart the server. Change a test, rerun the suite.

We shipped sandbox.watch() in March. It returns an SSE stream backed by native inotify, the kernel mechanism Linux uses for filesystem events.

import { parseSSEStream, type FileWatchSSEEvent } from '@cloudflare/sandbox';

const stream = await sandbox.watch('/workspace/src', {

recursive: true,

include: ['*.ts', '*.tsx']

});

for await (const event of parseSSEStream<FileWatchSSEEvent>(stream)) {

if (event.type === 'modify' && event.path.endsWith('.ts')) {

await sandbox.exec('npx tsc --noEmit', { cwd: '/workspace' });

}

}

This is one of those primitives that quietly changes what agents can do. An agent that can observe the filesystem in real time can participate in the same feedback loops as a human developer.

Waking up quickly with snapshots

Imagine a (human) developer working on their laptop. They git clone a repo, run npm install, write code, push a PR, then close their laptop while waiting for code review. When it’s time to resume work, they just re-open the laptop and continue where they left off.

If an agent wants to replicate this workflow on a naive container platform, you run into a snag. How do you resume where you left off quickly? You could keep a sandbox running, but then you pay for idle compute. You could start fresh from the container image, but then you have to wait for a long git clone and npm install.

Our answer is snapshots, which will be rolling out in the coming weeks.

A snapshot preserves a container's full disk state, OS config, installed dependencies, modified files, data files and more. Then it lets you quickly restore it later.

You can configure a Sandbox to automatically snapshot when it goes to sleep.

class AgentDevEnvironment extends Sandbox {

sleepAfter = "5m";

persistAcrossSessions = {type: "disk"}; // you can also specify individual directories

}

You can also programmatically take a snapshot and manually restore it. This is useful for checkpointing work or forking sessions. For instance, if you wanted to run four instances of an agent in parallel, you could easily boot four sandboxes from the same state.

class AgentDevEnvironment extends Sandbox {}

async forkDevEnvironment(baseId, numberOfForks) {

const baseInstance = await getSandbox(baseId);

const snapshotId = await baseInstance.snapshot();

const forks = Array.from({ length: numberOfForks }, async (_, i) => {

const newInstance = await getSandbox(${baseId}-fork-${i});

return newInstance.start({ snapshot: snapshotId });

});

await Promise.all(forks);

}

Snapshots are stored in R2 within your account, giving you durability and location-independence. R2's tiered caching system allows for fast restores across all of Region: Earth.

In future releases, live memory state will also be captured, allowing running processes to resume exactly where they left off. A terminal and an editor will reopen in the exact state they were in when last closed.

If you are interested in restoring session state before snapshots go live, you can use the backup and restore methods today. These also persist and restore directories using R2, but are not as performant as true VM-level snapshots. Though they still can lead to considerable speed improvements over naively recreating session state.

imageimage

Booting a sandbox, cloning  ‘axios’, and npm installing takes 30 seconds. Restoring from a backup takes two seconds.

Stay tuned for the official snapshot release.

Higher limits and Active CPU Pricing

Since our initial launch, we’ve been steadily increasing capacity. Users on our standard pricing plan can now run 15,000 concurrent instances of the lite instance type, 6,000 instances of basic, and over 1,000 concurrent larger instances. Reach out to run even more!

We also changed our pricing model to be more cost effective running at scale. Sandboxes now only charge for actively used CPU cycles. This means that you aren’t paying for idle CPU while your agent is waiting for an LLM to respond.

This is what a computer looks like

Nine months ago, we shipped a sandbox that could run commands and access a filesystem. That was enough to prove the concept.

What we have now is different in kind. A Sandbox today is a full development environment: a terminal you can connect a browser to, a code interpreter with persistent state, background processes with live preview URLs, a filesystem that emits change events in real time, egress proxies for secure credential injection, and a snapshot mechanism that makes warm starts nearly instant.

When you build on this, a satisfying pattern emerges: agents that do real engineering work. Clone a repo, install it, run the tests, read the failures, edit the code, run the tests again. The kind of tight feedback loop that makes a human engineer effective — now the agent gets it too.

We're at version 0.8.9 of the SDK. You can get started today:

npm i @cloudflare/sandbox@latest

この記事をシェア

関連記事

InfoQ★42026年4月22日 19:00

Cloudflareサンドボックスが一般提供開始、AIエージェントに永続的な隔離環境を提供

CloudflareはAIエージェント向けにSandboxesを一般提供開始し、永続的な隔離Linux環境を提供した。資格情報注入やセッション復元機能も実装された。

Cloudflare Blog★42026年6月4日 02:00

BGP AS_PATH の最初の AS を強制する仕組みの導入

Cloudflare は、Spamhaus が報告したルート乗っ取り事案を踏まえ、不正なアクターが未使用の自律システム番号(ASN)を利用して偽の AS_PATH を作成しトラフィックを誤誘導する手口に対処するため、BGP の経路情報において最初の AS 番号の検証を強化する措置を発表した。

Vercel Blog★42026年6月1日 09:00

Vercel Blob が OIDC 認証をサポートし、新規プロジェクト接続時のデフォルト設定に

Vercel は Vercel Blob の新機能として OIDC 認証のサポートを開始しました。これにより、新しいプロジェクト接続時に OIDC がデフォルトとなり、短期間で自動回転するトークンが利用可能になります。その結果、従来の長期有効な BLOB_READ_WRITE_TOKEN を不要とし、セキュリティを強化します。

ニュース一覧に戻る元記事を読む