Getting Started
Python
Run Python code in an isolated AgentOS runtime.
Install AgentOS, then import PythonRuntime from the /python subpath:
pnpm add @rivet-dev/agentos
const runtime = await PythonRuntime.create();
try {
const result = await runtime.evaluate<number>("21 * 2");
console.log(result.success ? result.value : result.error);
} finally {
await runtime.dispose();
}
Python uses the same VM filesystem, permissions, networking, process model, and
resource policy as JavaScript. See the Python Runtime for
the full execution surface or Installing Packages
for pip dependencies.