Open source packages for building on Reflex, Runloop's platform for background coding agents. Use them to call the Reflex API, stream live agent events, and drop an agent chat pane into your own React app.
Everything here is published from the sdk/ tree of Runloop's Reflex repository. See Repository layout for how that works.
| Package | npm | What it does |
|---|---|---|
@runloop/reflex-client |
Typed API client plus a ReflexSocket for live agent event streams. Framework agnostic, runs in browsers and Node. |
|
@runloop/reflex-chat-kit |
A CLI that copies a customizable React chat pane into your codebase, shadcn style. You own the files after it runs. | |
@runloop/reflex-ui |
The same chat components as an importable library, for when you would rather upgrade than own the source. | |
@runloop/reflex-cli |
Terminal client. Browse and chat with agents, launch new ones, and connect this machine as a workstation. | |
@runloop/reflex-contract |
Schemas and helpers the API cannot express as types: attachments, sandbox options, agent references. | |
@runloop/reflex-workstation |
The wire protocol a machine speaks to be driven as a workstation by an agent. |
Each package carries its own version and changelog. A change to one does not force a release of the others.
Install the client and authenticate with a personal API key, which you create with POST /api/me/api-keys:
npm install @runloop/reflex-clientimport { configureReflex, listAgents, ReflexSocket } from '@runloop/reflex-client';
configureReflex({
baseUrl: 'https://reflex.example.com',
apiKey: process.env.REFLEX_API_KEY,
organizationId: 'my-org',
});
const { data } = await listAgents();Or drive Reflex from a terminal:
npx @runloop/reflex-cliTo scaffold a chat pane into an existing React app:
npx @runloop/reflex-chat-kitA working consumer app that uses both packages lives in sdk/examples/chat-kit-demo.
Packages sit under sdk/ at the same paths they occupy upstream:
sdk/contractis@runloop/reflex-contract, the shared schemas and helpers both the API client and the Reflex server build on.sdk/workstationis@runloop/reflex-workstation, the workstation wire protocol.sdk/clientis the API client. Itssrc/generated/directory is produced from Reflex's public OpenAPI document, so it never drifts from the running API.sdk/chat-kitholds the CLI and the component registry it copies.sdk/uiis compiled from that same registry, so both packages ship identical components.sdk/tuiis@runloop/reflex-cli, the terminal client.sdk/examplesholds runnable example apps.plugins/plugin-workstationis the server and web half of the workstation feature, published here as a reference implementation. It depends on packages that are not published, so it is source visible rather than buildable, and it is not part of this repository's workspace. To write a workstation client you want@runloop/reflex-workstationinstead.
This repository is a read only mirror for source changes: commits are exported from Runloop's Reflex repository, where the SDKs are developed next to the API they talk to. That is what keeps the generated client and the OpenAPI document in sync. Pushes here are overwritten by the next export.
Publishing runs the other way. Every package on npm is published from this repository, using npm trusted publishing, so each release carries a provenance attestation you can trace back to the commit and workflow run that produced it. pnpm install && pnpm check here builds and tests exactly what gets published.
Issues and pull requests are welcome. Maintainers apply accepted changes upstream, and the next export brings them back here under your name in the pull request discussion. CONTRIBUTING.md has the details.
Report vulnerabilities through the security policy, not a public issue.
MIT.