@runloop/api-client - v1.18.0
    Preparing search index...

    Class RunloopSDK

    Runloop SDK - The recommended way to interact with Runloop. Provides both low-level API access and high-level object-oriented interfaces.

    const runloop = new RunloopSDK(); // export RUNLOOP_API_KEY will automatically be used.
    const devbox = await runloop.devbox.create({ name: 'my-devbox' });
    const result = await devbox.cmd.exec('echo "Hello, World!"');
    console.log(result.exitCode);

    See the documentation for each Operations class for more details.

    Index

    Constructors

    Properties

    api: Runloop

    Low-level API client providing direct access to all Runloop API endpoints. Use this when you need fine-grained control or access to features not yet exposed through the high-level interfaces. Most users should prefer the specialized interfaces (devbox, blueprint, etc.) for a more convenient API.

    devbox: DevboxOps

    Devbox Operations - DevboxOps for creating and accessing Devbox class instances.

    Devboxes are isolated development environments running in Runloop's cloud - the core resource that provides you with a fully configured development environment. Use these operations to create new devboxes or get existing ones by ID.

    blueprint: BlueprintOps

    Blueprint Operations - BlueprintOps for creating and accessing Blueprint class instances.

    Blueprints are reusable templates that define the base configuration for devboxes, built from Dockerfiles. They can be used to create multiple devboxes with consistent environments. Use these operations to create new blueprints or get existing ones by ID.

    snapshot: SnapshotOps

    Snapshot Operations - SnapshotOps for creating and accessing Snapshot class instances.

    Snapshots are point-in-time copies of a devbox's disk state, allowing you to save the complete state of a devbox and restore it later or create new devboxes from saved states. Use these operations to list snapshots or get existing ones by ID.

    storageObject: StorageObjectOps

    Storage Object Operations - StorageObjectOps for creating and accessing StorageObject class instances.

    Storage objects are files stored in Runloop's object storage system. They can be uploaded, downloaded, and managed with metadata, useful for storing configuration files, data files, or any other content you need to persist or share between devboxes. Use these operations to create new storage objects or get existing ones by ID.

    agent: AgentOps

    Agent Operations - AgentOps for creating and accessing Agent class instances.

    Agents are registered AI agent entities that can be mounted into devboxes. Agents can be sourced from npm, pip, git repositories, or object storage, and provide reusable agent code that can be shared across multiple devboxes. Use these operations to create new agents or get existing ones by ID.

    axon: AxonOps

    Axon Operations - AxonOps for creating and accessing Axon class instances.

    [Beta] Axons are event communication channels that support publishing events and subscribing to event streams via server-sent events (SSE). Use these operations to create new axons, get existing ones by ID, or list all active axons.

    scorer: ScorerOps

    Scorer Operations - ScorerOps for creating and accessing Scorer class instances.

    Scorers are custom scoring functions that evaluate scenario outputs. They define scripts that produce a score in the range [0.0, 1.0] for scenario runs.

    networkPolicy: NetworkPolicyOps

    Network Policy Operations - NetworkPolicyOps for creating and accessing NetworkPolicy class instances.

    Network policies define egress network access rules for devboxes. Policies can be applied to blueprints, devboxes, and snapshot resumes to control network access.

    gatewayConfig: GatewayConfigOps

    Gateway Config Operations - GatewayConfigOps for creating and accessing GatewayConfig class instances.

    Gateway configs define how to proxy API requests through the credential gateway. They specify the target endpoint and how credentials should be applied. Use with devboxes to securely proxy requests to external APIs without exposing API keys.

    mcpConfig: McpConfigOps

    MCP Config Operations - McpConfigOps for creating and accessing McpConfig class instances.

    MCP configs define how to connect to upstream MCP (Model Context Protocol) servers. They specify the target endpoint and which tools are allowed. Use with devboxes to securely connect to MCP servers.

    scenario: ScenarioOps

    Scenario Operations - ScenarioOps for accessing Scenario class instances.

    Scenarios define repeatable AI coding evaluation tests with starting environments and success criteria. Use these operations to get existing scenarios by ID or list all scenarios.

    secret: SecretOps

    Secret Operations - SecretOps for managing secrets.

    Secrets are encrypted key-value pairs that can be injected into devboxes as environment variables. Use these operations to create, update, list, and delete secrets.