Remote Agent Gateway Providers

Connects Dots conversations to remote agent platforms over authenticated, streaming WebSocket gateways.

Overview

Description

Remote Agent Gateway Providers let a Dots conversation use an agent platform running elsewhere rather than a local CLI or direct model API. The first shipped adapter connects to an OpenClaw protocol-v3 gateway over WebSocket, performs token authentication, sends an agent request with session and idempotency keys, waits for accepted asynchronous runs when necessary, and maps the final text and usage into the same LLM provider contract used by chat.

The connection also observes assistant events for live streaming, enforces abort and deadline boundaries, validates inbound and outbound protocol frames, and closes the socket on every terminal path. A separate availability probe reports reachability and authentication state without throwing or leaking the token. URL, auth material, headers, and socket construction are injected, keeping transport configuration outside the package and supporting both native Node and browser-compatible WebSocket implementations.

Selling Points

  • Users can bring an always-on remote agent platform into the same conversation picker as local and direct providers.
  • Streaming gateway events provide responsive answers even when the remote run is asynchronous.
  • Session and idempotency keys support continued conversations without accidentally launching duplicate work.
  • Typed auth and availability results distinguish bad credentials from an unreachable gateway.
  • Guaranteed socket cleanup, token-free diagnostics, and validated frames reduce the operational risk of long-lived remote connections.

User Story

A user selects their configured OpenClaw gateway for a conversation while away from the machine that hosts their coding environment. Dots authenticates to the gateway, submits the request, shows streamed assistant progress, and polls an accepted run until it completes. The final answer and usage land in the normal conversation transcript, and a later turn resumes through the same remote session instead of creating an unrelated run.

Extension Surface

This feature is pluggable. packages/agent-platform-adapters/src/openclaw/llm-provider.ts implements the shared LLMProvider contract, and packages/agent-platform-adapters/src/socket.ts exposes an injectable socket factory. Additional gateway adapters can implement the same provider interface and enter the existing provider registry without changing chat core, which is the formal provider plug-in axis.

Capabilities & Limits

  • It authenticates, dispatches, streams, waits for asynchronous completion, resumes sessions, and maps usage.
  • It probes gateway reachability and auth status through the same protocol connection.
  • It honors cancellation and timeouts and guarantees socket closure.
  • Limit: OpenClaw is the first shipped gateway; device pairing is unsupported, and this adapter does not expose provider tools through the gateway contract.

Implementation Map

  • packages/agent-platform-adapters/src/openclaw/llm-provider.ts
  • packages/agent-platform-adapters/src/openclaw/connection.ts
  • packages/agent-platform-adapters/src/openclaw/probe.ts
  • packages/agent-platform-adapters/src/protocol.ts
  • packages/agent-platform-adapters/src/socket.ts

Properties

Property
Value
product
dots-platform
extensibility
pluggable
module
Chat, Conversations
packages
agent-platform-adapters
status
shipped
surface
ui
summary
Connects Dots conversations to remote agent platforms over authenticated, streaming WebSocket gateways.

Connections

Remote Agent Gateway Providers · Explore connections

  • extendstoReliable Chat Turn Dispatch
  • complementstoLocal Coding Agent Providers
  • implementstoDS_Conversations — Conversations Foundational Dotabase (Sub-Phase 7.1)
  • implemented bytopackages/agent-platform-adapters/src/socket.ts
  • implemented bytopackages/agent-platform-adapters/src/openclaw/connection.ts
  • implemented bytopackages/agent-platform-adapters/src/openclaw/llm-provider.ts
  • implemented bytopackages/agent-platform-adapters/src/protocol.ts
  • implemented bytopackages/agent-platform-adapters/src/openclaw/probe.ts

Connected Records8

Complements
Extends
Implemented by
packages/agent-platform-adapters/src/openclaw/connection.ts
packages/agent-platform-adapters/src/openclaw/llm-provider.ts
packages/agent-platform-adapters/src/openclaw/probe.ts
packages/agent-platform-adapters/src/protocol.ts
packages/agent-platform-adapters/src/socket.ts
Implements
DS_Conversations — Conversations Foundational Dotabase (Sub-Phase 7.1)
8 connections.