Python and JavaScript execution guides
Submit asynchronous Python or JavaScript jobs, choose CPU, memory and timeout limits, and check structured results. Work through inline CSV, JSON and batch-processing examples on your Docker worker.
Getting started
- JavaScript code execution API: run and check a Node.js jobRun a Node.js job through cpuOS. Deduplicate validated events, submit with idempotency, poll with deadlines and check a complete JSON result.10 min read
- What is an AI agent sandbox?Understand the execution boundary for agent tools, what the cpuOS Docker pilot provides and when stronger isolation is required.2 min read
Tutorials
- Use SQLite in memory with PythonValidate inline order data, bind SQL parameters and calculate paid-order totals with Python's sqlite3. Run the same recipe as a cpuOS job.7 min read
- Validate JSONL line by line with PythonValidate each JSONL event with Python's standard library. Reject duplicate keys, invalid types and blank records, then return checked worker totals.6 min read
- Python code execution API: submit, poll and validateRun a Python job through the cpuOS REST API with polling, idempotent retries, cancellation and a checked JSON result. No SDK required.10 min read
- Analyze CSV with Python without pandasParse quoted CSV with Python's standard library, validate expense rows and produce checked category totals. Run the same script as a cpuOS job.6 min read
- Validate and transform JSON with Node.jsCheck JSON syntax, fields, types and bounds with Node 24. Normalize Unicode labels and return an explicit output contract as a cpuOS job.7 min read
- Operate a self-hosted CPU worker: readiness, queues and updatesOperate a cpuOS Linux worker with systemd. Check readiness, diagnose queued jobs, plan resource limits and update or reconnect without exposing tokens.9 min read
- Asynchronous Python jobs: submit, poll, cancel and retryDesign asynchronous Python execution with cpuOS: distinguish HTTP acceptance from success, poll job status, recover idempotent requests and cancel work.5 min read
- CPU job resource limits: memory, timeouts and queue capacityChoose CPU, memory and timeout limits for Python jobs. Profile bounded scripts, distinguish queue time from execution and diagnose worker capacity in cpuOS.5 min read
- Structured Python job output: JSON, stderr and result validationBuild a Python stdout JSON contract for cpuOS jobs. Separate stderr diagnostics, reject truncated output and validate schema, types and business invariants.5 min read
- Batch Python jobs with bounded inline inputs and checked resultsSplit small inline datasets into bounded Python jobs with cpuOS. Plan chunks in your application, control queue pressure and merge only validated results.7 min read
- Build a bounded code tool with open modelsSubmit a small Python job, poll its real result and return bounded evidence to a model. Keep authorization and retries in your application.2 min read
- Browser automation: requirements beyond the CPU pilotIdentify browser, network, session and artifact needs. Browser execution is not available in the current cpuOS Python and Node jobs pilot.2 min read
Security
Comparisons
- Firecracker vs Docker for AI agent jobsCompare guest-kernel and shared-kernel execution boundaries. The current cpuOS pilot uses Docker for trusted team code, not Firecracker.2 min read
- Evaluate a BYO CPU execution pilotUse a requirements checklist to compare job runtimes, hosted data flow, worker location, isolation and commercial terms without assuming feature parity.2 min read
Run one useful CPU task
Create a workspace, connect your Docker worker and submit a small Python or Node job.
gpuOS · where models think
Need the model too? Run it on gpuOS
gpuOS serves open models on your own GPUs behind one OpenAI-compatible API. Your application can submit authorized actions to cpuOS jobs.