isolated-function
What is isolated-function?
isolated-function is a Node.js library for running JavaScript from AI agents, plugins, customer workflows, and automation rules in a separate process with explicit safety limits.
Node.js sandbox for untrusted code
Use it when you need to execute code you did not write without giving it full access to your server.
What security controls does isolated-function provide?
- Minimal privilege execution through the Node.js permission model.
- Memory, wall-clock timeout, and CPU time limits for each isolated function.
- Dependency detection, installation, bundling, shared cache, and optional package allowlists.
- Execution profiling for compile, spawn, run, and total timings.
Install isolated-function from npm or view the source on GitHub.