@cybernetyx1/atlasflow-sdk
v0.1.8
Published
Typed HTTP client for invoking AtlasFlow agents, streams, runs, and events.
Downloads
1,041
Readme
@cybernetyx1/atlasflow-sdk
Typed HTTP client SDK for AtlasFlow agent servers — prompt agents, dispatch durable runs, stream events, and work with public streams.
Install
npm install @cybernetyx1/atlasflow-sdkPart of the AtlasFlow monorepo. Proprietary.
Usage
createAtlasFlowClient(options) builds a client grouped into agents, runs, workflows, and streams.
import { createAtlasFlowClient } from "@cybernetyx1/atlasflow-sdk";
const client = createAtlasFlowClient({
baseUrl: "https://agent.example",
apiKey: process.env.ATLASFLOW_API_KEY, // server-side only
});
// Interactive prompt.
const reply = await client.agents.prompt("hello", "user-123", { message: "hi" });
console.log(reply.text);
// Durable run, then wait for completion.
const admission = await client.runs.dispatch("hello", { message: "do work" });
const record = await client.runs.wait(admission.runId);// Stream run events as they happen.
for await (const event of client.agents.stream("hello", "user-123", { message: "hi" })) {
console.log(event.type);
}Browser code must not use ATLASFLOW_API_KEY; mint a short-lived scoped token on your server and pass it as apiKey. Also exported: the AtlasFlowError class, the AtlasFlowClient type, and the request/response types (AgentResult, RunRecord, RunWatchOptions, stream option types, etc.).
License
Proprietary. © 2026 Cybernetyx. See LICENSE.
