---
title: SDKs
description: The TypeScript and Python clients for the Core API — what each one covers, and what it takes to run it.
sidebar:
  order: 3
---

Every `curl` call in these docs is an HTTP request you can make yourself, and nothing here stops you from doing exactly that. The SDKs are the same Core API with the tedious parts already written: a stream that resumes from the sequence number it last saw, a tool client that answers the calls the agent routes to your code, and types for the events that come back.

There are two, and they reach the same API.

**[TypeScript](https://typescript-sdk-docs.subako.ai/)**

`@subako-ai/sdk`, plus React bindings and ready-made tools for a page the
agent drives.

**[Python](https://pypi.org/project/subako/)**

`subako` — an async client for a backend, a job, or a worker.

## TypeScript

```bash
pnpm add @subako-ai/sdk
```

Node 22 or newer on the server, and the same package runs in the browser. It is ESM only and ships no runtime dependencies.

It splits the API in two along the credential: one client for your backend, which holds the API key and creates sessions, and one for the browser, which holds a [session token](/quickstart) and does everything inside a session. The type says which routes each one reaches, so the key cannot end up in page code by accident.

A session connection reads the log, opens the stream, and keeps both. A dropped connection comes back on its own, resuming where it left off — the reconnect logic from [Streaming events](/guides/streaming-events) is already in it. What it hands your renderer is one immutable snapshot: the events, the transcript, and the approvals waiting on someone.

[Client tools](/guides/client-tools) describe their arguments with zod, or any other Standard Schema.

### The packages

`@subako-ai/sdk` covers the whole API on its own. The rest are for building a page the agent drives.

| Package | What it is |
| --- | --- |
| `@subako-ai/sdk` | The client. Sessions, streaming, tools, errors, pagination. |
| `@subako-ai/react` | A provider and four hooks over a session connection. |
| `@subako-ai/tools` | Ready-made tools that drive a page: fill a form, submit it, navigate. |
| `@subako-ai/assistant-ui` | A working chat over a session, or a runtime for your own thread. |
| `@subako-ai/react-hook-form` | react-hook-form as a form-tool spec. |
| `@subako-ai/react-router` | React Router as a navigate-tool spec. |
| `@subako-ai/tanstack-router` | TanStack Router as a navigate-tool spec. |

Every package is Apache-2.0 and versioned together, so they upgrade as a set.

The [TypeScript SDK documentation](https://typescript-sdk-docs.subako.ai/) has the quickstart, the reference, and a worked example of a backend minting a token for a browser.

## Python

**uv**

```bash
uv add subako
```

**pip**

```bash
pip install subako
```

Python 3.12 or newer. The client is async-only — there is no synchronous API — so it belongs in a backend, a job, or a worker, not in a script you expect to read top to bottom.

It covers the same ground: a namespace per resource, typed errors, cursor pagination over the list calls, a session connection that reconnects on its own, and tool clients that serve functions from your process to a session. Idempotency keys and receipts cover the calls you do not want to run twice.

[`subako` on PyPI](https://pypi.org/project/subako/) carries the install, the requirements, and a backend-and-frontend example end to end.

## Neither one

An SDK is a convenience, not a dependency. The API is plain HTTP and SSE, and the CLI does every operator task without either SDK.

**[API reference](/api)**

Every endpoint, with a playground that calls the live server.

**[CLI reference](/cli)**

Every command, grouped by what it acts on.
