Skip to main content
@runtools-ai/sdk is two things in one package: a typed client for driving the platform (RunTools), and a set of definition helpersdefineTool(), defineAgent(), defineSandbox(), defineConfig() — for authoring things you deploy. Most projects use both.

Client

The constructor also accepts accessToken, apiUrl, authUrl, toolsUrl, and billingUrl. Environment variables with the same purpose are supported:

Managers

The client exposes one manager per resource. Each gets calls right with the caller’s auth and the correct service URL.

Example

Error Handling

HTTP failures throw RunToolsApiError:

Definition Helpers

Use helpers inside deployable projects:
runtools deploy reads runtools.config.ts, sandboxes/*.ts, tools/*.ts, and agents/*.ts.

Next Steps

Installation

Install and configure the client.

Sandboxes

Spin up and drive sandboxes with rt.sandbox.

Agents

Define and run agents with defineAgent() and rt.agent.

Tools

Build and call tools with defineTool() and rt.tools.

Hosted Connect

Let customers connect their own integrations to your Runtools-built products.

Workspaces

Persistent storage and files with rt.workspaces.

Threads

Conversation history and live streams with rt.threads.