Skip to main content

Python client for the Menlo Robot Control Service (RCS) control plane.

Project description

menlo-robot-sdk

Python client for the Menlo Robot Control Service (RCS): robot CRUD, session lifecycle, and runtime skill calls through RCS.

Alpha: this package is in active development and may introduce breaking API changes between minor versions.

Install

uv add menlo-robot-sdk

The base package covers the RCS HTTP control plane. Runtime skills, state, and camera capture use LiveKit SFU RPC (runtime.*) when join_livekit=True. Install the LiveKit extra for that path:

uv add "menlo-robot-sdk[livekit]"

Configure

Local development against RCS uses an unsigned development identity:

from menlo_robot_sdk import DevIdentity, MenloSettings

settings = MenloSettings(
    rcs_url="http://localhost:8002",
    identity=DevIdentity(
        sub="user_dev",
        organization_id="org_dev",
        team_id="team_dev",
    ).to_header(),
)

You can also load settings from environment variables:

export MENLO_RCS_URL=http://localhost:8002
export MENLO_IDENTITY='{"sub":"user_dev","organization_id":"org_dev","team_id":"team_dev","roles":[],"scopes":[]}'

Alternatively set MENLO_API_KEY (an sk_live_… key from the console) and point MENLO_RCS_URL at the platform-auth edge (https://platform-auth.menlo.ai/rcs) — no identity needed; the edge mints it.

Full per-function API reference (generated, agent-readable) ships inside the package — after install:

python -c "import menlo_robot_sdk, pathlib; print(pathlib.Path(menlo_robot_sdk.__file__).parent / 'llms-full.txt')"

Quick Example

import asyncio

from menlo_robot_sdk import AsyncClient, ConnectCallbacks, DevIdentity, MenloSettings, connect


async def main() -> None:
    settings = MenloSettings(
        rcs_url="http://localhost:8002",
        identity=DevIdentity(
            sub="user_dev",
            organization_id="org_dev",
            team_id="team_dev",
        ).to_header(),
    )

    events = []

    def on_action_result(event) -> None:
        events.append(event)

    async with AsyncClient(settings=settings) as client:
        created = await client.robots.create(name="sdk-demo", model="asimov-v0")
        session = None
        try:
            session = await connect(
                client,
                created.robot.id,
                worker_names=["sim-worker"],
                join_livekit=False,
                callbacks=ConnectCallbacks(on_action_result=on_action_result),
            )

            skills = await session.discover_skills()
            status = await session.state.get("robot_status")
            # On-demand JPEG from rcw (requires join_livekit=True and a viewer in the room):
            # jpeg = await session.get_vision("pov")
            result = await session.invoke(
                "set_velocity",
                {"wz": 0.8, "duration_s": 2.0},
            )

            print([skill.name for skill in skills], status.runtime.status, result.status)
        finally:
            if session is not None:
                await session.disconnect()
            await client.robots.delete(created.robot.id)


asyncio.run(main())

The runtime skill calls above require a running local RCS stack and browser viewer.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

menlo_robot_sdk-0.2.2.tar.gz (54.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

menlo_robot_sdk-0.2.2-py3-none-any.whl (49.7 kB view details)

Uploaded Python 3

File details

Details for the file menlo_robot_sdk-0.2.2.tar.gz.

File metadata

  • Download URL: menlo_robot_sdk-0.2.2.tar.gz
  • Upload date:
  • Size: 54.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for menlo_robot_sdk-0.2.2.tar.gz
Algorithm Hash digest
SHA256 283758d9d2879d8bb6e7abc549a58036ddbe433d7447a3155956d5eb55af1b25
MD5 3c28ec25b85a9a521d1bdc44063a3480
BLAKE2b-256 12ca4d932d9bd7a1fd04d8a70dea03afef864de89d828c434bba3b3718ac4c46

See more details on using hashes here.

Provenance

The following attestation bundles were made for menlo_robot_sdk-0.2.2.tar.gz:

Publisher: menlo-robot-sdk-publish.yml on menloresearch/mono

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file menlo_robot_sdk-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: menlo_robot_sdk-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 49.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for menlo_robot_sdk-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cecc735d36769359d6476454632a1a4bb6b132b9ecbed75dd47361811f4dc2e2
MD5 45fc498dafe97e027cd8d1b50d03f2e7
BLAKE2b-256 5ec1db961a6528e116ed60992967f81501a79ead5b595f50e2ceb01e6f59f8fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for menlo_robot_sdk-0.2.2-py3-none-any.whl:

Publisher: menlo-robot-sdk-publish.yml on menloresearch/mono

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page