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

推荐订阅源

Cyberwarzone
Cyberwarzone
Jina AI
Jina AI
WordPress大学
WordPress大学
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
宝玉的分享
宝玉的分享
C
Check Point Blog
有赞技术团队
有赞技术团队
小众软件
小众软件
IT之家
IT之家
Vercel News
Vercel News
V2EX - 技术
V2EX - 技术
雷峰网
雷峰网
L
Lohrmann on Cybersecurity
Cloudbric
Cloudbric
Engineering at Meta
Engineering at Meta
Schneier on Security
Schneier on Security
P
Privacy International News Feed
Apple Machine Learning Research
Apple Machine Learning Research
W
WeLiveSecurity
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
J
Java Code Geeks
T
Threatpost
S
Secure Thoughts
T
Tailwind CSS Blog
V
V2EX
Attack and Defense Labs
Attack and Defense Labs
P
Palo Alto Networks Blog
S
Security @ Cisco Blogs
The GitHub Blog
The GitHub Blog
Simon Willison's Weblog
Simon Willison's Weblog
The Register - Security
The Register - Security
AWS News Blog
AWS News Blog
罗磊的独立博客
GbyAI
GbyAI
Blog — PlanetScale
Blog — PlanetScale
Microsoft Azure Blog
Microsoft Azure Blog
Forbes - Security
Forbes - Security
N
News | PayPal Newsroom
博客园 - 叶小钗
Hugging Face - Blog
Hugging Face - Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Webroot Blog
Webroot Blog
爱范儿
爱范儿

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 Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
BoxAgnts Runtime (3) — WebAssembly: A Better Sandbox for AI Agents
Guyoung Studio · 2026-06-03 · via DEV Community

AI agents are increasingly moving beyond text generation. Modern agent systems can execute code, manipulate files, browse the web, call APIs, manage infrastructure, and coordinate distributed tasks. Once agents begin interacting with real environments, execution safety shifts from a prompt problem to a systems-level problem.

Most current implementations rely on Python subprocesses, shell commands, and container isolation—approaches designed for human-controlled software, unsuitable for LLM-driven probabilistic execution systems.

WebAssembly is emerging as the strongest candidate. Not because it's trendy, but because its execution semantics align remarkably well with the security requirements of AI infrastructure.


The Problem with Traditional Agent Execution

Most agent runtimes eventually converge on a familiar architecture:

LLM → Tool Call → Python Runtime → Shell / Filesystem / Network

Enter fullscreen mode Exit fullscreen mode

Traditional tool execution introduces persistent problems: unrestricted host interaction, dependency conflicts, environmental inconsistency, weak isolation boundaries, difficult resource governance. When execution decisions originate from an LLM, the situation becomes worse—LLMs are sensitive to prompt manipulation, execution paths are probabilistic, and external context can alter behavior.

BoxAgnts abandons this architecture entirely. Look at boxagnts/wasm-tools/src/wasm_tool.rs—each tool is an independent WASM module:

pub struct WasmTool {
    name: String,
    wasm_file: String,      // WASM binary path
    description: "String,"
    permission_level: PermissionLevel,
    input_schema: Value,
}

Enter fullscreen mode Exit fullscreen mode

This isn't "call Shell from Python"—it's "execute a self-contained binary module in a controlled sandbox." The security boundary difference is vast.


Containers Help, but Aren't Enough

Containers provide filesystem separation, process namespaces, network isolation, and reproducible deployment. But they still expose relatively broad execution surfaces—even inside a container, agents can still misuse tools, access unintended resources, leak data, and recursively invoke dangerous operations.

Containers answer: "Which environment does this process run inside?"

An AI runtime must answer: "Which exact operations is this agent allowed to perform?"

BoxAgnts' WASM sandbox is designed to answer the second question. It doesn't rely on OS-level process isolation—it builds boundaries at the Wasmtime virtual machine layer, finer-grained than processes, lighter than containers.


WebAssembly's Security Model

By default, a WASM module:

  • Cannot access arbitrary memory
  • Cannot access the filesystem
  • Cannot open network connections
  • Cannot spawn processes
  • Cannot interact with the host system directly

Every interaction with the outside world must be explicitly granted by the runtime.

This "default-deny" model aligns naturally with AI agent security requirements. BoxAgnts' RunOption struct is the code embodiment of this philosophy:

// boxagnts/wasm-sandbox/src/run.rs
pub struct RunOption {
    pub work_dir: Option<String>,
    pub map_dirs: Option<Vec<(String, String)>>,
    pub env_vars: Option<Vec<(String, Option<String>)>>,
    pub allowed_outbound_hosts: Option<Vec<String>>,
    pub block_url: Option<String>,
    pub block_networks: Option<Vec<String>>,
    pub wasm_timeout: Option<u32>,
    pub wasm_max_memory_size: Option<u32>,
    pub wasm_max_wasm_stack: Option<u32>,
    pub wasm_fuel: Option<u32>,
    pub wasm_cache_dir: Option<String>,
}

Enter fullscreen mode Exit fullscreen mode

Everything is explicitly granted. No work_dir configured? The WASM module sees no files. No allowed_outbound_hosts? All network requests are blocked. No wasm_timeout? Long-running execution is terminated.


Capability Injection: The Real Killer Feature

The most important property of modern WASM runtimes isn't portability—it's capability injection.

The runtime can selectively provide filesystem access, network access, environment variables, persistent storage—with fine-grained control:

read:/workspace/docs
write:/workspace/tmp
fetch:https://api.example.com

Enter fullscreen mode Exit fullscreen mode

Each WASM tool in BoxAgnts has its own independent capability set. In WasmTool::execute, the configuration provided by ToolContext is precisely mapped to RunOption:

let work_dir = ctx.get_work_dir().await;           // Expose only the work directory
let allowed_outbound_hosts = ctx.get_allowed_outbound_hosts();  // Network allowlist
let cache_dir = ctx.get_app_cache_dir().await;      // Cache directory

Enter fullscreen mode Exit fullscreen mode

A module cannot exceed the capabilities it receives. This differs fundamentally from traditional subprocess execution—subprocesses inherit permissions from the parent; WASM modules start from zero.


Deterministic Execution

Modern agents frequently install dependencies dynamically, modify runtime state, and generate temporary code—making reproducibility nearly impossible.

WebAssembly modules are self-contained, platform-independent, runtime-constrained, and explicitly authorized. This means the same WASM tool behaves identically everywhere—local dev machines, cloud servers, edge devices, even browsers.

BoxAgnts ships 7 built-in WASM tools in app/extensions/tools/:

file-read-component.wasm     ← File reading (supports pagination for large files)
file-write-component.wasm    ← File writing
file-edit-component.wasm     ← Exact string replacement editing
file-glob-component.wasm     ← Filename pattern matching
bash-component.wasm          ← Shell command execution
web-fetch-component.wasm     ← HTTP requests
boxedjs-execute-component.wasm ← JavaScript code execution

Enter fullscreen mode Exit fullscreen mode

Each tool compiles once, runs everywhere, behaves consistently—critical for auditing, debugging, replay, and governance in AI infrastructure.


WASI: From Execution Format to Practical Runtime

WASM alone is just a binary format. WASI (WebAssembly System Interface) extends it into a practical runtime, introducing standardized interfaces for filesystems, networking, clocks, randomness, streams, and environment variables.

More importantly, WASI is designed around capability-oriented principles—resources are not globally accessible by default; they must be explicitly provided. BoxAgnts' WASM runtime enables WASI support in the RunCommon configuration:

// boxagnts/wasm-sandbox/src/run.rs
run_common.common.wasi.cli = Some(true);
run_common.common.wasi.http = Some(true);
run_common.common.wasi.inherit_network = Some(true);
run_common.common.wasi.allow_ip_name_lookup = Some(true);

Enter fullscreen mode Exit fullscreen mode

HTTP isn't enabled by default—it requires explicit wasi.http = Some(true). Even when enabled, outbound connections remain constrained by allowed_outbound_hosts and block_networks.

Traditional operating systems evolved around trusted human users. AI agents are not human users; LLMs cannot reliably distinguish sensitive files, privileged APIs, and production infrastructure. AI systems require stricter, finer-grained execution boundaries than traditional software.


Resource Governance

Modern agents can generate surprisingly unstable workloads—recursive loops, excessive tasks, excessive memory, runaway API traffic. BoxAgnts provides multi-layer resource governance through the WASM runtime:

wasm_timeout        → Prevents long-running execution
wasm_max_memory_size → Prevents memory bloat
wasm_max_wasm_stack → Prevents stack overflow
wasm_fuel           → Instruction count limit (similar to gas)

Enter fullscreen mode Exit fullscreen mode

wasm_fuel is a particularly elegant design—each WASM instruction consumes 1 unit of fuel; when depleted, execution is trapped and terminated. This operates on the same principle as blockchain gas mechanics, effectively preventing infinite loops and DoS attacks.


Multi-Agent Isolation

BoxAgnts' Managed Agent mode supports multiple Executors running in parallel—each in its own WASM sandbox, with independent memory, independent capabilities, independent lifecycles.

This isolation isn't an afterthought—it's built into the architecture at RunOption creation time. Like OS process isolation, one Executor's crash or privilege violation doesn't cascade to others.


Conclusion

WebAssembly is a better sandbox for AI agents not because it's "novel," but because of its security model—default zero permissions, explicit capability injection, hard resource constraints, deterministic behavior.

BoxAgnts' architectural practice proves the feasibility of this path: all tools register through a unified Tool trait, all WASM tools execute under unified RunOption constraints, all runtime risks are intercepted at the sandbox boundary.

Resources