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

# SDKs

export const LinkNewTab = ({href, children}) => <a href={href} target="_blank" rel="noopener noreferrer">
    {children}
  </a>;

Miru provides SDKs to help you build local applications and on-device tooling on top of the Device API.

The SDKs provide typed request and response models, handle Unix socket access to the local agent, and offer both sync and async clients so integrations are faster to build and easier to maintain.

## Versioning

Each SDK release is built against a specific Device API version. For example, Python SDK `v0.3.0` targets Device API `v0.2.0`.

We recommend using an SDK for the API version it was built against. However, SDKs may be used with newer API versions as long as the API changes are backward-compatible (see [API Versioning](/developers/device-api/versions)).

For example, an SDK released for Device API `v0.2.0` can safely be used with Device API `v0.2.x` since it is guaranteed to be backward-compatible.

Of course, older SDKs may not contain all the features of the latest API version. To use features introduced in a newer API version, upgrade to an SDK version built for that API version.

To see which SDK versions are available for a given API version, you can find a compatibility matrix for each language below.

## Python

The Python [Device SDK](https://github.com/mirurobotics/python-device-sdk) provides convenient access to the Device API from any Python application.

Below are the SDK versions released for a given API version.

| API Version | SDK Versions      |
| ----------- | ----------------- |
| `v0.2.1`    | `v0.4.x`          |
| `v0.2.0`    | `v0.3.x`          |
| `v0.1.0`    | `v0.1.x - v0.2.x` |

<Warning>
  The `v0.1.0` API version uses the legacy [python-agent-sdk](https://github.com/mirurobotics/python-agent-sdk) repository and the `miru_agent_sdk` import path. See <LinkNewTab href="/changelog/device-api#v0-1-0">changelog</LinkNewTab>.
</Warning>

For detailed documentation, examples, and advanced usage, visit the Python Device SDK [repository](https://github.com/mirurobotics/python-device-sdk).

<Card title="python-device-sdk" icon="python" href="https://github.com/mirurobotics/python-device-sdk">
  Official Python SDK for the Miru Device API.
</Card>

## SSE support

The Device API SDKs do NOT support Server-Sent Events natively.

While the SDKs do generate the event types from the OpenAPI specification, a dedicated SDK method for streaming events is not yet available.

To consume the SSE stream, use a standard SSE client library for your language. Then, parse the `data` field of the event data object by discriminating on the `type` field in the event envelope (see [Event Data](/developers/device-api/events#event-data)).

<Info>
  Support for SSE will be added to the Device API SDKs in a future release.
</Info>

## OpenAPI specifications

If you're using a language not yet supported by an official SDK, you can still generate client code from the OpenAPI specification. All OpenAPI specifications are available for download from the <LinkNewTab href="/changelog/device-api">Device API Changelog</LinkNewTab> page.
