> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deepslate.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Deepslate SDKs

> Official Python and Node.js SDKs for integrating Deepslate voice AI into your agent framework

Deepslate provides **official Python and Node.js/TypeScript SDKs** for connecting your voice AI application to the Deepslate Realtime API. All SDKs live in a single [open-source monorepo](https://github.com/deepslate-labs/deepslate-sdks) and share a common core within each language, giving you a consistent configuration model and feature set regardless of which agent framework or language you use.

## What Deepslate provides

Every SDK gives your application access to Deepslate's unified voice AI stack over a single WebSocket connection:

<CardGroup cols={2}>
  <Card title="Speech-to-Speech Streaming" icon="waveform-lines">
    Send raw PCM audio in, receive synthesized PCM audio out — all in real time
  </Card>

  <Card title="Server-side VAD" icon="microphone">
    Voice Activity Detection runs on the server, so you don't need a client-side VAD pipeline
  </Card>

  <Card title="LLM Inference" icon="brain">
    Deepslate manages the inference lifecycle, including tool calling, context management, and interruption handling
  </Card>

  <Card title="ElevenLabs TTS" icon="volume-high">
    Optional server-side text-to-speech with configurable voice, model, and regional endpoint
  </Card>

  <Card title="Deepslate Hosted TTS" icon="waveform">
    Server-side text-to-speech using Deepslate-hosted cloned voices — no external TTS provider credentials required.
  </Card>
</CardGroup>

## Packages

The monorepo publishes framework plugins for two languages. The **LiveKit** plugin is available in both Python and Node.js/TypeScript; the **Pipecat** plugin is Python-only. Each plugin pulls in its language's `core` package automatically — install only the plugin you need.

<CardGroup cols={2}>
  <Card title="deepslate-livekit (Python)" icon="tower-broadcast" href="livekit">
    `RealtimeModel` plugin for [LiveKit Agents](https://github.com/livekit/agents). Drop into any Python LiveKit Agents project with a one-line model swap.
  </Card>

  <Card title="@deepslate-labs/livekit (Node.js)" icon="tower-broadcast" href="livekit-node">
    `RealtimeModel` plugin for the [LiveKit Agents](https://github.com/livekit/agents) Node framework. Same configuration model, written against the TypeScript API.
  </Card>

  <Card title="deepslate-pipecat (Python)" icon="pipe-valve" href="pipecat">
    `LLMService` plugin for [Pipecat](https://github.com/pipecat-ai/pipecat). Integrates with any Pipecat transport and the full frame-based pipeline architecture.
  </Card>
</CardGroup>

<CodeGroup>
  ```bash LiveKit (Python) theme={null}
  pip install deepslate-livekit
  ```

  ```bash LiveKit (Node.js) theme={null}
  npm install @deepslate-labs/livekit
  ```

  ```bash Pipecat (Python) theme={null}
  pip install deepslate-pipecat
  ```
</CodeGroup>

View source on GitHub: [livekit (Python)](https://github.com/deepslate-labs/deepslate-sdks/tree/main/python/packages/livekit) · [livekit (Node.js)](https://github.com/deepslate-labs/deepslate-sdks/tree/main/node/packages/livekit) · [pipecat (Python)](https://github.com/deepslate-labs/deepslate-sdks/tree/main/python/packages/pipecat)

## Credentials

All packages read credentials from the same three environment variables:

```bash theme={null}
DEEPSLATE_VENDOR_ID=your_vendor_id
DEEPSLATE_ORGANIZATION_ID=your_organization_id
DEEPSLATE_API_KEY=your_api_key
```

Each configuration class (`DeepslateOptions`, `RealtimeModel`, etc.) accepts these as constructor arguments too, but environment variables are the recommended approach for keeping secrets out of your code.

<Warning>
  Never expose these credentials to clients. All SDK packages are designed for **server-side use** only.
</Warning>

## Core packages

Each language has a shared foundation that its plugins are built on — `deepslate-core` (Python) and `@deepslate-labs/core` (Node.js). It handles WebSocket connectivity, protobuf framing, session lifecycle, and exponential-backoff reconnection.

<Note>
  You **don't need to install the core package directly** when using the LiveKit or Pipecat plugins — they include it as a dependency. Install it only if you're building a **custom integration** outside of these frameworks.
</Note>

<CodeGroup>
  ```bash Python theme={null}
  pip install deepslate-core
  ```

  ```bash Node.js theme={null}
  npm install @deepslate-labs/core
  ```
</CodeGroup>

The central building block is `DeepslateSession`, which manages the full protocol lifecycle. In Python it delivers events to a `DeepslateSessionListener` you subclass; in Node.js it is an event emitter you subscribe to with `session.on(...)`. The Python version:

```python theme={null}
from deepslate.core import (
    DeepslateOptions,
    DeepslateSession,
    DeepslateSessionListener,
)

class MyListener(DeepslateSessionListener):
    async def on_text_fragment(self, text: str) -> None:
        print(text, end="", flush=True)

    async def on_audio_chunk(
        self, pcm_bytes: bytes, sample_rate: int, channels: int, transcript: str | None
    ) -> None:
        # Forward audio to your output device or transport
        ...

    async def on_tool_call(self, call_id: str, name: str, params: dict) -> None:
        result = await dispatch_tool(name, params)
        await self.session.send_tool_response(call_id, result)

listener = MyListener()
session = DeepslateSession.create(
    DeepslateOptions.from_env(),
    listener=listener,
)
listener.session = session
session.start()
```

For the full `DeepslateSession` API — including all send methods and event callbacks — see the core source: [Python](https://github.com/deepslate-labs/deepslate-sdks/tree/main/python/packages/core) · [Node.js](https://github.com/deepslate-labs/deepslate-sdks/tree/main/node/packages/core).

## Repository

All packages are maintained in a single polyglot monorepo, split by language. The Python workspace is managed with [`uv`](https://docs.astral.sh/uv/); the Node.js workspace with [`pnpm`](https://pnpm.io/):

```
deepslate-sdks/
├── python/
│   ├── packages/
│   │   ├── core/      # deepslate-core — shared WebSocket client and session logic
│   │   ├── livekit/   # deepslate-livekit — LiveKit Agents plugin
│   │   └── pipecat/   # deepslate-pipecat — Pipecat plugin
│   └── pyproject.toml # uv workspace root
└── node/
    ├── packages/
    │   ├── core/      # @deepslate-labs/core — shared WebSocket client and session logic
    │   └── livekit/   # @deepslate-labs/livekit — LiveKit Agents plugin
    └── pnpm-workspace.yaml
```

Contributions are welcome. Before setting up a local development environment, make sure you have:

* [Git](https://git-scm.com/)
* [`uv`](https://docs.astral.sh/uv/) for the Python workspace
* [`pnpm`](https://pnpm.io/) and Node.js 18+ for the Node.js workspace

Then clone the repository and install dependencies for the workspace you want:

<CodeGroup>
  ```bash Python theme={null}
  git clone https://github.com/deepslate-labs/deepslate-sdks.git
  cd deepslate-sdks/python
  uv sync --all-packages
  ```

  ```bash Node.js theme={null}
  git clone https://github.com/deepslate-labs/deepslate-sdks.git
  cd deepslate-sdks/node
  pnpm install
  ```
</CodeGroup>

<CardGroup cols={2}>
  <Card title="LiveKit Plugin (Python)" icon="tower-broadcast" href="livekit">
    Full configuration reference, features, and examples
  </Card>

  <Card title="LiveKit Plugin (Node.js)" icon="tower-broadcast" href="livekit-node">
    TypeScript configuration reference, features, and examples
  </Card>

  <Card title="Pipecat Plugin (Python)" icon="pipe-valve" href="pipecat">
    Full configuration reference, features, and frame reference
  </Card>

  <Card title="GitHub Repository" icon="github" href="https://github.com/deepslate-labs/deepslate-sdks">
    Source code, issues, and contributions
  </Card>

  <Card title="API Reference" icon="code" href="api-reference/realtime">
    WebSocket message schemas and protocol documentation
  </Card>
</CardGroup>
