// the find
lmstudio-ai/lmstudio-js
LM Studio TypeScript SDK
Official TypeScript/JavaScript client SDK for LM Studio, letting developers load and control local LLMs, run chat/completion requests, build local tool-using agents, and generate embeddings against models hosted by the LM Studio app or its headless server. Aimed at Node/browser developers who want more control over local inference than LM Studio's OpenAI-compatible REST endpoint gives them.
Genuinely modular monorepo (lerna, ~15 packages) that splits transport, communication, shared types, and isomorphic browser/Node code into separate packages instead of one client blob. Supports both WebSocket and authenticated IPC transports with real isomorphic handling for browser vs Node environments (lms-isomorphic). Exposes model-lifecycle controls the OpenAI SDK genuinely lacks - explicit load/unload, load-time config like context length and GPU offload, speculative decoding - and these are backed by real modules (RuntimeNamespace, ModelNamespace), not just claimed in the README. Reasonable test coverage, including heavy.test.ts suites for respond/complete/act/vision/speculative-decoding plus unit tests for its core reactive primitives.
This is purely a client - it requires a running LM Studio desktop app or headless server over IPC/WebSocket, and the README doesn't lead with that dependency, so it's easy to install and be confused why nothing works. It ships a custom in-house reactive state system (Signal, LazySignal, OWLSignal, SlicedSignal) rather than anything standard, and that shape leaks into the public API, adding a concept to learn beyond the LLM calls themselves. All the 'heavy' tests appear to require a live model/LM Studio instance, so there's no obvious lightweight test path for contributors without the full app installed. The repo's own README is thin on real usage depth - the OpenAI SDK comparison section reads more like positioning than documentation - and the actual docs live entirely offsite, so the repo isn't self-contained for evaluating the API surface.