Skip to main content
Hosted Connect lets a product built on Runtools ask its own users to connect their own third-party accounts. End users do not create Runtools accounts. Your product keeps its own auth system, passes a stable externalUserId, and Runtools stores credentials scoped to:
Use this when you build an agent product like Atlas and each customer needs to connect their own Stripe, Gmail, Sheets, Slack, or API-key-backed tools.
Create connect sessions from your server. Keep your Runtools API key server-side and only send the returned connectUrl to the browser.

Hosted Connect vs. Connected Apps

Connections are app-scoped by default. A Gmail connection for atlas does not automatically become a Gmail connection for iris or any other product.

Create a product app

Configure one app per product. The appId is your stable product identifier, such as atlas.
oauthAppPolicy controls which OAuth client is used:

Create a connect session

When a signed-in product user clicks “Connect integrations”, create a short-lived hosted connect session from your server.
Open session.connectUrl in the browser. The hosted page shows the requested integrations, starts OAuth where needed, and collects API-key-style credentials for tools that use secrets instead of OAuth.

Run an agent with that user’s connections

When your product runs an agent, pass the same app and user scope.
Tool execution resolves credentials only from that end user’s app-scoped connections. If the required connection is missing, the run returns connect_required instead of falling back to builder or org credentials. Agent-runtime tool calls are capability-scoped internally. The model, sandbox, and managed runtime can request a tool action, but they cannot choose credentialScope, endUser, raw credentials, or org secret overrides. Runtools derives that authority from the agent run and Hosted Connect app/user scope.

Use Hosted Connect from channels

For Telegram, WhatsApp, Slack, Discord, iMessage, or SMS products, the developer connects the channel once and end users only chat with it. The channel credential is the transport, not the customer data identity. Bind the channel to your product app, then link each provider sender id to the same appId + externalUserId you use for Hosted Connect:
When the linked sender messages the channel, Runtools starts the agent with:
Missing product-user connections still return connect_required. The channel worker does not fall back to builder Connected Apps, org defaults, or another product user’s credentials.

Run tools directly

You can also execute Tool Hub actions with end-user scope.
When endUser is present, RunTools enforces credentialScope: 'end_user' even if you omit it. Passing it explicitly makes your intent clear. If the user connected multiple accounts for the same tool, pass a connection selector.

List connections

Show connection status in your product’s settings page.
Each connection includes the tool slug, provider, account label, status, default flag, and timestamps. Raw tokens and secret values are never returned.

API-key-backed tools

Some tools use API keys or secrets instead of OAuth. The hosted connect page can collect those values and store them through the tools service. If you build your own connect UI, post the values through the connect session instead of storing them in your product database.
The credential is write-only to the product and encrypted by Runtools.

Usage and audit

Usage is attributed by app and end user so builders can report, rebill, and debug without exposing credentials.
Audit events include connection IDs, provider/tool labels, app IDs, external user IDs, event types, and timestamps. They never include raw credential values.

Custom OAuth apps

By default, Hosted Connect can use Runtools-managed OAuth. If you want the provider consent screen to show your own app name, configure a custom OAuth app.
You can configure a provider once for the organization, or override it for a single app by passing appId. Hosted Connect resolves app-specific config first, then org-level config, then Runtools-managed OAuth when the app policy allows it.

REST endpoints

The SDK uses the Auth and Tools service URLs internally. If you call REST directly, use these endpoints from your server: Authenticated Auth service calls accept the same Runtools API key as a bearer token:

Production checklist

  • Use a stable externalUserId from your product, not an email address that can change.
  • Create sessions server-side only.
  • Keep allowedRedirectUrls strict.
  • Keep allowedToolSlugs limited to tools your product actually needs.
  • Never use builder credentials for customer-data tool calls.
  • Treat missing end-user credentials as a connect-required state in your product UI.
  • Show connection status and reconnect actions inside your product settings.