ReferenceAsk
Remy Reference/Architecture/Architecture/Clients and SDKs
28Architecture

Clients and SDKs

The three clients that talk to the platform (the browser editor, the CLI, and the app's own SDKs), what each calls, how it authenticates, and where the call lands.

Three clients talk to the platform on a builder's behalf: the editor in the browser, the CLI on a laptop, and the SDKs the app's own code is written against. This chapter describes them from the platform's side: what each calls, how it authenticates, and where the call lands.


#The Editor

The editor is the Remy console's development surface, served as a Cloudflare Worker and authenticated with the builder's platform session. It talks to four places:

ChannelWhereWhat
Management APIThe HTTP role, management routesReleases, secrets, custom domains, files, data sources, audit, settings, the dashboard (including the live visitor count, polled)
Develop APIThe HTTP role, develop routesThe coding agent, dev sessions, attachments, voice recordings, wireframes, workspace snapshots
Control channelThe sandbox-proxy role, authenticated originThe dev box's files, shell, search, and agent actions over a WebSocket; the language server over a second WebSocket; logs and agent state
RealtimeThe WS role; the HTTP role for live viewsBuild progress and dev-session events over the socket; the app-events tail as Server-Sent Events

The editor also loads the app's preview from the dev box's public preview host, which is a different origin from the control channel by design. See Dev Boxes.

The coding agent runs inside the platform. The editor sends the conversation; the platform runs the agent loop, with the model service and the dev box as its tools, and streams back the result. Every agent call renews the dev session's lease.

The app's methods run in development from the dev box itself. The tunnel in the box drains a queue to which the platform routes that person's dev invocations. It runs them against their dev database, through the same SDK, with a hook token whose environment is dev. External requests the tunnel proxies in, such as a webhook from a payment provider, carry a validated dev-session header so they land in the same environment.


#The CLI

The CLI authenticates with a workspace API key and offers what the browser cannot.

Git. The app's repository is a standard git remote on the platform's git host, authenticated with the same key. Any git client works. See Git Hosting.

The CLI also publishes files to an app's stores at build time and manages secrets.


#The SDKs

App code is written against two SDKs, one for methods and one for the web interface.

The backend SDK runs inside the sandbox. It exposes the app's tables, auth, files, events, models, data sources, and platform actions as functions. Every one of those is a call back to the platform on the callback origin, carrying the execution's hook token:

SDK callPlatform endpointHandled by
Table reads and writesThe database query pathThe app-db role, via the DB socket role (or the HTTP role)
Role checks and user lookupsThe auth context on the hook token, and the app-user routesThe HTTP role
File put, get, head, list, delete; upload grantsThe brokered file and upload routesThe HTTP role, then S3
Model calls: chat, embeddings, images, speechThe model serviceThe HTTP role, then the provider
Data source search and ingestThe data source serve routesThe HTTP role, then Qdrant
Realtime publish and grantThe app events routesThe HTTP role, then the event stream
Platform actions: scrape a URL, search, analyze an image, generate an image or chart, rehost a resource, concatenate audio, unzipThe step executor, and its async and batch formsThe HTTP role, through the counterparty registry
Outbound email, SMS, voice callsThe email, notification, and voice routesThe HTTP role, then SES, the telephony provider, LiveKit
Tasks, progress, background stdoutThe task and method routesThe HTTP role
SecretsAlready present as environment inside the sandboxNothing to call

The SDK holds no vendor key and no platform credential. What it has is the hook token, and every endpoint it calls resolves that token to an app, a release, an environment, a user, and their roles before doing anything. That is why a sandbox can be denied every internal address and still have the whole platform available to it.

The frontend SDK runs in the browser inside the web interface. It calls the app's own origin under the internal prefix: methods, sign-in and session, file URLs, the event stream, agent chat. It never holds a credential beyond the app's session cookie.

Where they come from. Both SDKs are npm packages, declared in the app's own package manifest and published to npm on the release tag. A sandbox's npm resolves the platform's own two scopes through the platform's npm registry, which passes npm's releases through. A deployment that publishes its own builds there, as a laptop's watchers do, gets those instead, because they are numbered above npm's newest release. A new app is stamped with the registry's latest version of each SDK when the scaffold is copied into its repo.


#Build Services

Two more clients call the platform without a human. The job runners post build logs, completion callbacks, and upload requests to internal build endpoints, using short-lived build credentials. The voice worker registers with a standing token, then authenticates each session with a per-session credential.

What This Gives a Builder
A browser editor with a real machine behind it, and a CLI for the terminal and for git.
An SDK whose every capability is a governed platform call rather than a bundled vendor key.
Standard tooling: git, HTTP, WebSockets, MCP.