Skip to main content
The SDK has two jobs in code:

Run a published Method from an app

method connect writes METHOD_API_KEY to the app’s .env and prints the install line and the code for Node or Python. Then:
The first method.run starts a worker in the app’s process. See Production runs for questions, webhooks, and separate workers.

Run a Method file from code

loadMethod parses and validates a YAML or JSON string. runMethod(file, config, options) is the bare runtime. It runs scripts and local agents. It does not sign in, save versions, or send runs to the dashboard, and it has no hosted models: use method run for that. Options include inputs, state, runDir, resume, retry, human, signal, and onEvent.

Python

Python 3.9 or later, with Node.js 22 or later and the JavaScript SDK:
load_method and run_method work as in Node. Python calls the same Node runtime; it is not a separate executor. withmethod on the command line forwards to method.

Versions

method --version shows the SDK, runtime, and format. The download manifest lists package names and SHA-256 hashes. The latest URL can change; use an exact version URL for a fixed release. See Source and downloads.