TypeScript SDK

Drive Ellipsis agent sessions from TypeScript. Every /v1 operation, typed from the same OpenAPI spec the API is published from, with no runtime dependencies.

The TypeScript SDK is a typed client for the Ellipsis API. Every /v1 operation is generated from the platform's committed OpenAPI spec, so the method list and the API reference can never disagree. Nothing it imports at runtime is a third-party package, which is what lets the Agent CLI compile it into a single binary.

import { Ellipsis } from '@ellipsis-dev/sdk';

const client = new Ellipsis({
  apiKey: process.env.ELLIPSIS_API_TOKEN!,
});

const handle = await client.sessions.run({
  prompt: 'Fix the flaky test in ci/',
});
const session = await handle.wait();
console.log(session.status);

Three entry points

The package has three subpath exports, so a browser bundle pulls in only what it uses:

ImportWhat it is
@ellipsis-dev/sdkThe REST client, its types, and the session handle.
@ellipsis-dev/sdk/streamThe session stream WebSocket client: reconnect, resume, protocol negotiation.
@ellipsis-dev/sdk/storeA transcript store that turns a stream of frames into renderable session state.

What the SDK adds over raw HTTP

  • A session handle. sessions.run() starts a session and returns an object that polls, messages, and stops it. See Sessions.
  • Transparent pagination. A list method returns a page that iterates every page with for await. See Pagination.
  • Typed errors by status. NotFoundError, RateLimitError, and siblings, each carrying the API's code and requestId. See Errors.
  • Live streaming with a transport you choose, so the same machinery runs in a browser, a terminal, and a server. See Streaming.

Where to look for a specific call

This section covers the client's shape: installing it, the session lifecycle, streaming, pagination, errors, and types. For the per-operation detail (every route, its parameters, and its response) read the API reference, which shows each operation's TypeScript call beside the request it sends.