Ephemora Cell: a capability-based WASM sandbox for untrusted AI code

The rapid proliferation of AI agents has fundamentally altered the landscape of software engineering, shifting the paradigm from static execution to dynamic, autonomous tool orchestration. As these agents gain the ability to write code, invoke external APIs, and load third-party plugins, the primary security concern has shifted from simple permission management—determining whether a program is authorized to run—to the more complex challenge of enforcing strict boundary constraints on what that code can do during its lifecycle. Addressing this critical gap in runtime security, the open-source project Ephemora Cell has emerged as a lightweight, capability-limited WebAssembly (WASM) execution layer designed specifically for untrusted AI workloads.
The Problem of Autonomous Execution
Historically, security models in computing have relied on user-level permissions. Traditional operating systems and containerization technologies, such as Docker, operate primarily on the principle of access control. When an application launches, it is typically granted a set of permissions based on the user identity or container configuration. However, AI agents operate differently. By design, they are intended to interact with unpredictable environments and execute arbitrary code generated in real-time.
Current security stacks often fail to answer the question, "How far may it run?" Once an agent is granted the ability to call a tool or run a script, the process often remains vulnerable to lateral movement, unauthorized socket connections, or filesystem tampering. Ephemora Cell introduces a granular execution layer that sits beneath the standard AI agent stack, ensuring that the "guest" code is restricted to a strictly defined set of capabilities. By default, every action is blocked, requiring explicit permission for any resource interaction.
Chronology of Runtime Security Evolution
The evolution of execution isolation has progressed through several distinct phases, each responding to the increasing complexity of software distribution.
- Early Era (Pre-2000s): Security was largely managed through static analysis and user-space privilege levels.
- Virtualization Era (2000s): Hardware-level virtualization (VMs) provided strong isolation but carried heavy performance overhead, making them impractical for granular, per-call execution.
- Containerization Era (2010s): Technologies like Docker revolutionized deployment by utilizing OS-level namespaces and cgroups. While highly efficient for service deployment, containers are frequently criticized for their large attack surface, particularly regarding kernel exploits and filesystem escapes.
- WASM/Capability Era (2020s–Present): The rise of WebAssembly has enabled a new frontier in security. By providing a platform-independent, sandboxed environment, WASM allows for execution that is both performant and isolated from the host system. Projects like Ephemora Cell represent the maturity of this era, focusing on "warm" isolation for high-frequency, low-latency AI tool execution.
Empirical Benchmarking and Security Analysis
In a recent technical evaluation, the developers of Ephemora Cell conducted a comparative security assessment against a standard Python 3.12-slim container. The test suite involved eight distinct attack primitives designed to simulate common malicious behaviors in AI agents.

The results demonstrated a clear divergence in defensive efficacy. The standard Python container, lacking specific hardening against malicious runtime behavior, proved vulnerable to all eight attack vectors. Conversely, the Ephemora Cell runtime successfully blocked all eight attempts. The tested vectors included:
- Unauthorized Shell Access: Attempts to spawn interactive command-line interfaces.
- Process Forking: Attempts to create child processes to exhaust system resources.
- Socket Connections: Unauthorized attempts to establish network communication with external command-and-control servers.
- Host Filesystem Access: Attempts to traverse directories and access sensitive host configuration files.
- Symlink Escapes: Exploits designed to trick the runtime into reading files outside of the designated sandbox.
These findings highlight that while containerization is effective for packaging software, it is not inherently designed for the hostile, unpredictable execution environments created by modern AI agents.
Performance and the "Warm Start" Advantage
A significant hurdle in implementing robust security for AI agents is the latency cost. Security solutions that require spawning a fresh virtual machine or container for every tool call introduce unacceptable performance delays, often measured in seconds. This latency makes real-time AI responsiveness impossible.
Ephemora Cell distinguishes itself through its approach to "warm" isolation. Because WASM modules are lightweight, the runtime can maintain initialized environments that respond in the sub-millisecond range. This efficiency allows developers to wrap every individual tool call—rather than just the entire agent session—in a protective sandbox. By minimizing the performance overhead, the project encourages a "security-by-default" approach that does not compromise the user experience.
Integration with the Model Context Protocol (MCP)
As the industry moves toward standardized interfaces for AI tools, the Model Context Protocol (MCP) has gained traction. However, an MCP tool is essentially a piece of code that must be executed, and simply providing a JSON schema for interaction is insufficient if the underlying execution environment is compromised.
Ephemora Cell addresses this by providing a dependency-free MCP stdio server. This allows developers to execute tools as WASM modules within a hardened boundary while attaching execution metadata to the response. This metadata—which includes data points such as computational cost (fuel), execution time (ms), and policy compliance—ensures that the agent’s decision-making process is informed not just by the tool’s output, but by the safety context in which that output was generated.

Implications for the AI Ecosystem
The implications of this technology are far-reaching. As AI agents move from experimental "chat-bots" to enterprise-grade autonomous systems, the risk of "prompt injection" and "agentic misuse" grows exponentially.
While Ephemora Cell does not claim to solve the fundamental problems of prompt injection or the inherent risks associated with Large Language Models (LLMs), it provides a necessary safety net. It operates on the philosophy that developers must assume the guest code might be malicious. By enforcing a narrow boundary and providing measurable budgets, Ephemora Cell shifts the burden of trust from the code itself to the verifiable constraints placed upon it.
Future Outlook and Community Engagement
The project, currently licensed under Apache-2.0, is designed for extensibility. Any programming language that compiles to the WebAssembly System Interface (WASI) standard can be utilized as a guest, providing developers with flexibility in their technology stack. Furthermore, the inclusion of a GitHub Action for CI integration suggests that the project is aimed at integrating security into the software development lifecycle, rather than treating it as an afterthought.
The maintainers have invited technical scrutiny from the security community, specifically requesting analysis of the WASI surface area and the existing vector suite. By fostering an open-source model, Ephemora Cell aims to build a library of attack primitives that can help standardize what "safe execution" means in an age where AI agents are granted increasing control over digital systems.
As organizations continue to scale their use of autonomous agents, the ability to enforce "how far" an agent can run will become as critical as the ability to provide it with the tools to perform its task. Through its use of WASM-based isolation and capability-limited execution, Ephemora Cell offers a robust, performant, and transparent solution for the next generation of AI-driven software architecture. Whether in CI/CD pipelines or real-time agentic tool-use, the shift toward verifiable, budget-based execution represents a vital step forward in securing the future of artificial intelligence.







