Platform primitives
Project Layout
runtools init creates a deployable TypeScript project:
sandboxes/, tools/, and agents/ in that order, because agents can reference project sandboxes and deployed tools:
--prune.
Sandboxes
Sandboxes provide a Linux environment with root access, a workspace directory, optional persistent workspace mounts, public dev URLs, SSH, and optional browser desktop access.
Common templates:
Workspaces
Workspaces are persistent storage outside the sandbox lifecycle. When you mount a workspace into a sandbox, it appears as a filesystem at/workspace or a subpath such as /workspace/data.
Sandbox-backed agents use the same mounted path as their persistent filesystem memory. The agent can edit files, create task notes, keep repo state, and produce artifacts inside /workspace; those files remain available for later runs even if the sandbox is paused, destroyed, or recreated with the same mount.
Threads preserve conversation history. Workspaces preserve files.
Agents
Agents are created in the dashboard, viaPOST /v1/agents, or by deploying agents/*.ts files that call defineAgent().
Threads are shared across those modes. A run started from the dashboard, CLI, SDK, iOS, or desktop app writes the same durable thread events and live frames.
Threads
Thread history is canonical JSONL under workspace-backed storage.agent_threads and thread_rollouts are projections used for fast reads, compaction, and live status. Runtime-local caches are not authoritative.
Durable frames include user messages, assistant messages, tool calls/results, run lifecycle, and compaction lifecycle. Token, reasoning, source, and tool-output deltas are transient WebSocket frames and are not written as JSONL.
RunMesh
RunMesh registers private devices and sandboxes as org-scoped nodes. Local device agents bind to a RunMesh device, so any client can start the agent while the work runs on that device.Models
Agents can use Platform models or BYOK models. Platform model usage is billed by tokens through Runtools-managed capacity. BYOK usage uses customer-provided provider keys and is not charged as Platform inference.Tools
Tools run on the Tools service and return structured results to agents or direct API callers. The public SDK surface is:defineTool() and are deployed with runtools deploy.
Product Apps
Product apps are for SaaS-style products built on Runtools. Your app keeps its own users and auth. Runtools receives a stableappId and externalUserId, then scopes tool credentials, agent runs, channel identities, usage, and audit to that product user.
Use Hosted Connect when your product’s users need to connect their own Gmail, Stripe, Slack, HubSpot, Google Sheets, API-key tools, or other integrations.
Credentials
Runtools separates credentials by purpose:
OAuth-enabled tools resolve tokens server-side from the caller’s connected account. Manual API-key tools can use per-request credentials, stored tool credentials, or named secrets.
Next Steps
Sandboxes
Lifecycle, SSH, dev URLs, mounts, and monitoring.
Workspaces
Persistent storage, sandbox mounts, and agent filesystem memory.
Agents
Agent definitions, running, threading, and attachments.
Product Apps
End-user integrations, product-scoped tool calls, usage, audit, and channels.
Hosted Connect
Let customers connect their own accounts to products built on Runtools.
RunMesh
Private device mesh and local device agent dispatch.
Tool Hub
Marketplace and custom tools.