惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
Y
Y Combinator Blog
博客园 - Franky
D
Docker
B
Blog RSS Feed
M
MIT News - Artificial intelligence
雷峰网
雷峰网
博客园 - 司徒正美
人人都是产品经理
人人都是产品经理
宝玉的分享
宝玉的分享
S
SegmentFault 最新的问题
GbyAI
GbyAI
Recent Announcements
Recent Announcements
Martin Fowler
Martin Fowler
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
B
Blog
H
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
Vercel News
Vercel News
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Run Claude Code in Any Sandbox with One API: AgentBox SDK
gentic news · 2026-04-24 · via DEV Community

gentic news

Swap coding agents and sandbox providers without changing code. Preserves full interactive capabilities (approval flows, streaming).

Key Takeaways

  • Swap coding agents and sandbox providers without changing code.
  • Preserves full interactive capabilities (approval flows, streaming).

What Changed

Making Claude Code more secure and autonomous with sandboxing \ Anthropic

AgentBox is a new SDK that abstracts the runtime for coding agents. Instead of wrapping claude --print (non-interactive mode), it launches each agent as a server process inside a sandbox and communicates over WebSocket or HTTP. This preserves approval flows, tool-use control, and streaming events.

Key abstraction: One API for any agent + any sandbox provider.

import { Agent, Sandbox } from "agentbox-sdk";

const sandbox = new Sandbox("local-docker", {
  workingDir: "/workspace",
  image: process.env.IMAGE_ID!,
  env: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY! },
});

const agent = new Agent("claude-code", {
  sandbox,
  cwd: "/workspace",
  approvalMode: "auto",
});

const result = await agent.run({
  model: "sonnet",
  input: "Create a hello world Express server in /workspace/server.ts",
});

await sandbox.delete();

Enter fullscreen mode Exit fullscreen mode

What It Means For You

If you're building multi-agent workflows or need to run Claude Code in a CI/CD pipeline, this matters. Most existing solutions call agents in non-interactive mode (claude --print), which strips away approval flows and tool-use control. AgentBox preserves the full interactive session.

Supported agents:

  • claude-code
  • opencode
  • codex

Supported sandboxes:

  • local-docker
  • e2b
  • modal
  • daytona
  • vercel

Swap either — your app code stays the same. This is particularly useful for:

  • Running untrusted agent code in isolated environments
  • Parallelizing agent runs across multiple sandboxes
  • Testing different agents on the same task without refactoring

Try It Now

  1. Install: npm install agentbox-sdk (requires Node >= 20)

  2. Build a sandbox image:

   npx agentbox image build --provider local-docker --preset browser-agent

Enter fullscreen mode Exit fullscreen mode

This prints an image reference. Set it as IMAGE_ID.

  1. Stream events in real-time:
   const run = agent.stream({
     model: "sonnet",
     input: "Write a fizzbuzz in Python",
   });

   for await (const event of run) {
     if (event.type === "text.delta") {
       process.stdout.write(event.delta);
     }
   }

   const result = await run.finished;

Enter fullscreen mode Exit fullscreen mode

  1. Key methods on sandbox: run(), runAsync(), gitClone(), openPort(), getPreviewLink(), snapshot(), stop(), delete()

gentic.news Analysis

AgentBox arrives at a time when Claude Code usage is surging — it appeared in 58 articles this week alone (total: 634 across our coverage). The trend toward running agents in sandboxed environments aligns with the recent CVE-2026-35022 security disclosure for Claude Code, which highlighted the risks of running agents without isolation.

This SDK directly addresses a pain point we've seen in our coverage: developers want to use Claude Code in CI/CD but need proper sandboxing. Previously, they had to choose between non-interactive mode (losing approval flows) or custom scripting. AgentBox provides a standardized abstraction similar to what the Vercel AI SDK did for LLM calls — but for agent + runtime.

The ability to swap between Claude Code, Codex, and OpenCode without changing code is particularly valuable as the agent ecosystem fragments. With Claude Opus 4.6 scoring 94.1% on ThermoQA and Codex 5.3 competing on SWE-Bench, having a provider-agnostic runtime lets you benchmark agents on your actual tasks.

What you should do differently: If you're currently running Claude Code with claude --print in CI, migrate to AgentBox for sandboxed, interactive sessions. If you're building multi-agent architectures, use AgentBox as your runtime abstraction layer — it'll save you from rewriting integration code when you switch sandbox providers or agents.


Originally published on gentic.news