The Python Agent SDK provides convenient access to the Agent API from any Python 3.8+ application. The SDK offers the following features:
  • Type Safety: Full type hints and Pydantic models
  • Async Support: Both synchronous and asynchronous clients
  • Automatic Retries: Built-in retry logic for transient failures
  • Unix Socket: Native support for local Unix socket communication
For detailed documentation, examples, and advanced usage, visit the Python Agent SDK repository.

Install

pip install miru_agent_sdk

Quick Start

from miru_agent_sdk import Miru

# Initialize the client (automatically connects to /run/miru/miru.sock)
client = Miru()

# Check agent health
health = client.agent.health()
print(health.to_json())

device = client.device.retrieve()
print(device.to_json())

sync_resp = client.device.sync()
print(sync_resp.to_json())

Async Usage

The SDK also provides full async support:
import asyncio
from miru_agent_sdk import AsyncMiru

client = AsyncMiru()


async def main() -> None:
    device = await client.device.retrieve()
    print(device.id)


asyncio.run(main())