Pimpo
Documentation

RFC 0001: A sandbox for running code#

Problem#

Some tasks need a little code: convert a spreadsheet, analyze a CSV, resize photos, run the script a skill comes with. Pimpo's routines are JavaScript with no access to anything but capabilities, and the agent has no way to run code. OpenClaw and Hermes run shell commands on the owner's machine, which is exactly the power that makes them dangerous.

Proposal#

A capability, code.run, that runs a short program in an isolated container and returns what it printed and the files it wrote:

code.run({language, code, files?, stdin?}) → {stdout, stderr, exit_code, files, seconds}

The container runs with no network, a read-only root filesystem (only its working folder and a small /tmp are writable), all Linux capabilities dropped, no-new-privileges, an unprivileged user, and no environment from Pimpo, so no secret can be in it. Each call gets a fresh container that is removed afterwards.

The backend is Docker (or anything with Docker's command line, such as Podman's). The images are pulled the first time they are needed. Without Docker the capability says so and does nothing.

It is a Labs feature, off by default: Settings › Labs › Run code in isolation.

Because nothing inside the container reaches anything outside it, code.run is a read capability: it may run during explorations (which rehearse changes) and inside routines like any read, and its results are recorded in tests like any other capability's.

Safety#

Tests: internal/sandbox checks the flags every run gets (network, read-only, capabilities, user, limits), and a live test runs real programs, including ones that try the network and write outside their folder.

Alternatives#

Migration#

Nothing changes for existing installs: the capability does not exist until the owner turns it on, and turning it off again removes it.

This page is built from the repository's documentation. Improve it on GitHub.