method CLI. Python uses a separate wheel and calls the same Node runtime.
The full SDK source is public at method-ai-hq/method-sdk, including JavaScript, Python, the CLI, examples, tests, and build instructions. The separate method-spec repo contains the format, validator, and executor dependency. See Source and downloads for the package contents and source locations.
JavaScript
Use Node.js 22 or later. Install the full SDK in your project:loadMethod parses and validates a YAML/JSON string or object. runMethod(file, config, options) runs a current Method. Pass an explicit configuration object; {allow_local_processes: true} enables the default local Codex path. A script needs its runtime profile. Direct SDK calls do not perform the CLI’s automatic runtime.json discovery or account sync.
Options include inputs, state, runDir, sourceRoot, resume, retry, human, signal, onStart, and onEvent. sourceRoot selects the helper folder. human is an object in JavaScript; the CLI reads that object from a file. Use the original inputs and configuration when resuming.
The package also exports methodSchema and configSchema. SDK 0.7.0 removes runWorkflow, Executor/Verifier callbacks, and execution of method/2 and workflow/2. These calls fail; there is no compatibility executor. Use method migrate to convert an old document, then review and validate the result.
Python
Python 3.11+ is required, along with Node.js 22+ and the full JavaScript SDK:withmethod forwards CLI commands; run_method accepts resume, retry, state, and human for recovery. The wheel is served by Method; do not assume a PyPI release exists.
Source and version checks
The full SDK archive includes MIT source undersource/, compiled code, and public examples. Its current runtime comes from a pinned Git commit of method-spec. The hosted application repository is private.
Use method --version to identify the SDK, runtime, and format. Use the download manifest to check package names and SHA-256 hashes. The latest alias can change. Use an exact version URL when a project needs a fixed release.