Sandboxed container jobs over HTTP

Run code you cannot fully trust in a sandbox of its own.

RunFlow starts each run in its own Docker container, which by default has a read-only root filesystem and no Linux capabilities. You submit the job, follow its logs, pause it and collect the result through a REST API, or through 66 MCP tools when the caller is an agent.

Connect an agent

Register the MCP server once with your API key. In Claude Code that takes one command.

Then ask the agent to read https://runflow.rodmena.co.uk/api.html and set itself up. Agents that prefer plain text can start from llms.txt.

claude mcp add --transport http --scope user runflow \
  https://runflow.rodmena.co.uk/mcp \
  --header "Authorization: Bearer <YOUR_API_KEY>"

What a run gets

A run is a container started from the image you name. Unless the operator has pinned that image as trusted, it starts with these settings.

  • The root filesystem is read-only.
  • All Linux capabilities are dropped and no-new-privileges is set.
  • The process runs as the unprivileged user nobody (uid 65534).
  • CPU, memory and the number of processes are limited.
  • Outbound access to the public internet. The firewall refuses connections to private address ranges and to RODMENA's own hosts, and drops connections from the internet into the container.
  • Environment variables encrypted at rest under a key held for your tenant. When you read a run back, values whose names look like secrets are redacted.

The free tier runs images from a short allowlist. Paid tiers can run any public image.

Running a job

A submit returns a track_id straight away. The run starts now, at a time you give, or at the next opening in your tenant's working hours if it has a calendar. If you are at your concurrency limit, the run waits in a queue. The submit response then gives its place in the queue and, once there is enough history, an estimated start time.

Pausing freezes the container's processes with their memory intact. When you resume the run, they carry on from where they stopped. While it is live you can stream its logs and read samples of its CPU, memory and network use.

# Submit a run
curl -X POST https://runflow.rodmena.co.uk/api/v1/runs \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"image":"python:3.12-slim","command":["python","-c","print(1)"]}'

# Pause it, resume it, collect the result
curl -X POST $BASE/api/v1/runs/$TID/pause  -H "Authorization: Bearer $KEY"
curl -X POST $BASE/api/v1/runs/$TID/resume -H "Authorization: Bearer $KEY"
curl $BASE/api/v1/runs/$TID/result -H "Authorization: Bearer $KEY"

Workflows

A workflow is a graph of runs sent in one request. Each node is one run with its own track_id.

  • An on_success edge starts its target only when the source succeeds. An on_failure edge does the opposite, and an always edge starts it in either case.
  • A node can retry with backoff up to 10 times before the workflow counts it as failed.
  • The last line a node prints reaches the nodes after it in RUNFLOW_INPUT_<REF>. If that line is not JSON, they get the last kilobyte of output as text.
  • An approval node holds its branch until someone approves or rejects it.
  • A workflow saved as a template can be started by a cron trigger.
curl -X POST $BASE/api/v1/workflows \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "ci",
  "nodes": [
    {"ref": "build",  "image": "node:20", "command": ["npm", "run", "build"]},
    {"ref": "test",   "image": "node:20", "command": ["npm", "test"], "retries": 1},
    {"ref": "deploy", "image": "alpine",  "command": ["sh", "-c", "echo deploying"]},
    {"ref": "alert",  "image": "alpine",  "command": ["sh", "-c", "echo paging"]}
  ],
  "edges": [
    {"from": "build", "to": "test",   "condition": "on_success"},
    {"from": "test",  "to": "deploy", "condition": "on_success"},
    {"from": "test",  "to": "alert",  "condition": "on_failure"}
  ]
}'

Timers, schedules and webhooks

A timer sends a signed webhook at a time you set. A schedule sends one for each occurrence of a cron expression until you disable or delete it. Neither starts a container or counts against your run quota.

Runs and workflows also send signed webhooks to the endpoints you register when their state changes.

When to use something else

  • RunFlow is a poor fit for an inner loop where latency matters, because every run starts a container.
  • It cannot host a long-lived service. A run is a job, and it ends with an exit code.
  • If all you need is an alarm clock inside your own process, and you already have a database and a clock tick, you can do without it.