@runplex/client
v0.1.6
Published
Browser-safe client for Runplex agent streams — SSE parser, stream accumulator, AI SDK transport, React hooks
Readme
@runplex/client
Browser-safe client for Runplex agent streams. Works with both chat paths:
- AI SDK path (
/api/chat) —createRunplexTransport()foruseChat - SSE path (
/api/chat/stream) —parseAgentEventStream()+StreamAccumulator - React hooks —
useThreads()for thread management with active thread + message loading
Zero Node.js APIs. Works in browsers, Vite, Next.js, Deno, Cloudflare Workers.
Part of the Runplex framework.
Installation
npm install @runplex/clientUsage
// AI SDK path
import { createRunplexTransport } from "@runplex/client/ai-sdk";
import { useThreads } from "@runplex/client/react";
// SSE path
import { parseAgentEventStream, StreamAccumulator } from "@runplex/client/stream";
// Types (both paths)
import { createThreadClient } from "@runplex/client";Documentation
See the Chat Persistence guide for production patterns.
License
Apache-2.0
