Skip to main content

Overview

The @standardagents/client package provides the core client library for Standard Agents. It’s a framework-agnostic foundation that @standardagents/react and @standardagents/vue build upon.

Key Features

  • HTTP client for all API operations
  • WebSocket connection management with auto-reconnection
  • File upload handling with thumbnail generation
  • Utility functions for workblocks and attachments
  • Zero framework dependencies

Installation

npm
pnpm
yarn
Most users should use @standardagents/react or @standardagents/vue instead, which re-export everything from this package with additional framework-specific features.

AgentBuilderClient

HTTP client for all Standard Agents API operations.

Methods

Configuration

ThreadConnectionManager

Manages WebSocket connections with automatic reconnection and heartbeat.

Connection Features

  • Auto-reconnection: Exponential backoff (1s → 2s → 4s → … → 30s max)
  • Heartbeat: Ping every 30 seconds to keep connection alive
  • Status tracking: connecting, connected, reconnecting, disconnected

Options

FileUploadManager

Handles file uploads with thumbnail generation and progress tracking.

Features

  • Thumbnail generation: Automatic for image files
  • Progress tracking: Callbacks for upload progress
  • Deferred uploads: Returns pending refs before upload completes

Utility Functions

transformToWorkblocks

Groups tool calls with their results for UI rendering.

parseAttachments

Extract attachment references from message content.

Image Processing

File Helpers

Type Exports

The package exports all types needed for building clients:

Key Types

Message:
PendingAttachment:
AttachmentRef:
ConnectionStatus:

Authentication

The client reads auth tokens from localStorage:
You can also pass the token directly to the client:

Building Custom Integrations

Use @standardagents/client directly when:
  • Building for a framework without an official SDK
  • Creating custom tooling or CLI applications
  • Building server-side integrations
  • Needing fine-grained control over connections

Next Steps

React SDK

Full-featured React hooks and components

Vue SDK

Vue 3 composables and components

WebSocket API

WebSocket protocol documentation

REST API

REST API reference