Skip to main content

Refrain

The Refrain class runs runbooks in a local browser instance.

Configuration

The constructor accepts an RefrainConfig object:

AI model configuration

Provider-specific properties

Model overrides

Override the model used for specific tasks (Business+ plan):

Proxy configuration

execute()

ExecuteOptions

ExecutionReport

The execute() method returns an ExecutionReport:
See Types for the full StepExecutionResult reference.

loadRunbook()

Load and parse a YAML file:

dispose()

Clean up resources:
Always call dispose() when you’re done to ensure the browser process is properly terminated.