# Adapter SDK

> Build an adapter that teaches DSUI to connect to a service, read its data, run its commands, and show it in the workspace.

An adapter is a TypeScript package that teaches DSUI to work with one kind of service. You describe how to connect, what to read, what to run, and what to show. DSUI builds your package from source, runs it in a separate process, and renders your pages in the workspace.

You write the adapter with the `@northgraindata/dsui-adapter-sdk` package. Pin its exact version. The SDK works with DSUI through an API marker, described in [versions and compatibility](/docs/build/compatibility).

## Start here

<Cards>
<Card title="Build your first adapter" href="/docs/adapter-sdk/tutorial">
Write, load, and run a small adapter in a few steps.
</Card>
<Card title="Choose adapter or plugin" href="/docs/build/overview">
Check that an adapter is the right kind of extension.
</Card>
</Cards>

## What an adapter is made of

| Part | What it does | Page |
| --- | --- | --- |
| Connection and context | Defines how people connect, and holds the clients that your code shares | [Connections and context](/docs/adapter-sdk/connections-and-context) |
| Health | Reports whether the service is healthy. Required | [Health checks](/docs/adapter-sdk/health) |
| Resources | Read data, with a refresh policy | [Resources](/docs/adapter-sdk/resources) |
| Actions | Run commands that change something | [Actions](/docs/adapter-sdk/actions) |
| Jobs | Run background work for each service | [Jobs](/docs/adapter-sdk/jobs) |
| Routes | Publish HTTP endpoints for each service | [Routes](/docs/adapter-sdk/routes) |
| Signals | Publish typed events | [Signals](/docs/adapter-sdk/signals) |
| Pages | Compose components into screens | [Pages](/docs/adapter-sdk/pages) |
| Stores | Keep state for an adapter or a page | [Stores](/docs/adapter-sdk/stores) |
| Components | Use [33 builtin components](/docs/build/components), or add your own | [Custom components](/docs/build/custom-components) |

Keep reads in resources and changes in actions. DSUI can then refresh, cache, and authorize them correctly.

## How DSUI runs your adapter

DSUI doesn't run your adapter in its own process. See the [runtime model](/docs/adapter-sdk/runtime-model) for how processes are created and reused, and [image dependencies](/docs/adapter-sdk/image-dependencies) if your adapter needs a program such as `dbt` in the Docker image.

## Share your adapter

DSUI loads an adapter from a GitHub repository with `source: git`, or from a directory with `source: local`. See [release](/docs/adapter-sdk/release).
