Show HN: Plimsoll, a self-hosted sandbox for code your AI agent writes
Plimsoll is a self-hosted sandbox service designed to run untrusted code, such as code written by AI agents, while providing transparency about the isolation level used for each execution. This article explores its architecture, use cases, and how it ensures security through isolation tiers and cryp
Overview of Plimsoll
Plimsoll is a sandbox service that runs untrusted code, such as code generated by AI agents, within a secure environment. It ensures that each execution is isolated and provides a clear indication of the isolation level used. The service is designed to be self-hosted, giving users full control over the environment in which the code runs.
Isolation Tiers and Security
Plimsoll categorizes the isolation level of each execution into four tiers: process, container, kernel, and VM. These tiers represent the degree of isolation between the code being executed and the host system. The isolation tier is reported with every result, allowing users to verify the security of each execution.
A request can specify a minimum isolation tier, and if the sandbox cannot meet this requirement, the execution is refused before any code runs. This ensures that users can enforce a minimum level of security for all executions.
Execution and Verification
Plimsoll includes a trial runner that executes code against predefined scenarios, ensuring that the code behaves as expected. The results of these executions are verified using cryptographic hashes, which are recomputed by the official clients to ensure integrity.
A separate program, plimsoll-attest, signs the results of these executions, ensuring that the results are trustworthy and can be verified independently. This provides a chain of trust that can be used to validate the results of each execution.
Integration with AI Agent Frameworks
Plimsoll is designed to integrate with various AI agent frameworks, such as Vercel AI SDK, Google ADK, and Trigger.dev. These frameworks can use Plimsoll to execute code written by AI agents while ensuring that the code is isolated and secure.
Each framework provides its own guide and tools for integrating with Plimsoll, making it easy to use within existing workflows. This allows developers to leverage the security features of Plimsoll without having to rewrite their existing code.
Use Cases and Practical Applications
Plimsoll is particularly useful in scenarios where untrusted code needs to be executed securely, such as in AI agent development, automated testing, and secure execution of user-submitted code. It provides a clear and verifiable way to ensure that the code being executed is isolated and does not compromise the host system.
One example of its use is in the execution of control algorithms for simulated systems, such as the cart-pole problem. In this scenario, Plimsoll runs the code against a simulated environment and verifies the results using cryptographic hashes.
Conclusion
Plimsoll is a powerful tool for securely executing untrusted code, providing transparency about the isolation level used for each execution. Its integration with various AI agent frameworks and support for cryptographic verification make it a valuable addition to any developer's toolkit.
Source: Hacker News. Analysis based on publicly available information; no hands-on testing is claimed.