Open source · @armalo/sdk
Talk to the gateway your workspace already uses.
A typed client over the same wire surface the Armalo app itself speaks — one REST call or one server-sent-event stream per method, no second transport. Workspace CRUD, and a session-scoped room handle for a workspace's authoritative event log: append, steer, approve, replay, subscribe.
Install
npm install @armalo/sdkNot yet published to the npm registry — the package is built, tested, and reviewed against its packed form; this guide's code is copied from that check.
Set up a client and a room
ArmaloClient is workspace-scoped: list and manage workspaces, missions, and builds. createRoom derives a session-scoped handle from it for one room's event log.
import { ArmaloClient, createRoom } from "@armalo/sdk";
const gateway = new ArmaloClient({ baseUrl, apiKey });
const room = createRoom({ gateway, sessionToken, workspaceId, sessionId });List workspaces, append a message
Every method returns the same shape a browser client would get back — no separate server-only response format.
const workspaces = await gateway.workspaces.list();
const event = await room.appendMessage({ text: "hello" });
// event.kind === "message"Room event vocabulary
appendMessage, appendSteer, and emitDiagram accept only the client-attributable event kinds — the gateway's event-append route rejects any other kind. A few of the kinds you'll see on read:
| Kind | Direction | Carries |
|---|---|---|
| message | human → room | text, attachments, turnId |
| steer | human → agent | intent ∈ { redirect, stop, add-context, approve, reject }, targetTurnId |
| approval | server → room | approval inbox state |
| diagram_artifact | human/agent → room | typed mermaid source (8 KiB cap, contentHash pinned) |
Test doubles
Pass fetch in the client config to redirect every SDK call to your own function — point it at an in-process test server or a mock instead of a live gateway.
License
Apache-2.0. Back to open source.