Skip to main content

Official Python client SDK for Marona-compatible AI runtimes and Hub integrations.

Project description

marona

Official Python client for Marona-compatible hybrid AI runtimes and Marona Hub.

Use marona to build web apps, mobile backends, WhatsApp bots, smart glasses, desktop apps, devices, and agents that need one interface for cloud, local, and hybrid AI execution.

Install

pip install marona

Create A Client

from marona import Marona

marona = Marona(
    api_key="mrn_live_...",
    mode="hybrid",
)

Modes:

  • online: use Marona Runtime and online app routes. The hosted runtime can route between configured cloud and private LiteRT-LM/Gemma providers.
  • offline: use only local cache, local models, and local app routes.
  • hybrid: try a registered local/LAN model first, then fall back to Marona Runtime when local execution fails and online access is allowed.

Send A Message

response = await marona.message(
    "Create a PowerPoint about AI introduction",
    interface="api",
    conversation_id="demo",
)

print(response.text)

Interface Names

interface identifies the client surface making the request.

Standard values are:

  • api
  • web
  • mobile_app
  • desktop
  • whatsapp

Future devices can use custom lowercase slugs such as smart_glasses, vehicle_console, or kiosk. Interface names must match ^[a-z][a-z0-9_-]{0,63}$.

Sync Hub Metadata

await marona.sync()

Sync stores app IDs, app routes, permissions, workspace config, runtime config, and local/remote app endpoints in the local Marona cache.

Sync does not copy cloud-only private user data into offline mode. Offline messages use recent local conversation context plus local/private MCP app endpoints from the cache.

Connect Apps By ID

tools = await marona.hub.connect(
    ["billing-mcp", "network-mcp"],
    adapter="tools",
)

Marona resolves apps from local cache first. Offline mode uses only local app routes. Online and hybrid modes can refresh from Hub.

Register A Local Or Cloud Model

marona.models.register(
    name="office-model",
    endpoint="http://localhost:9379",
)

marona.models.use("office-model")

Developers do not need to specify provider, backend type, or capabilities. Marona detects model features internally and routes by execution mode.

Smart Glasses / Wearables

response = await marona.message(
    "What am I looking at?",
    interface="wearable",
    client_capabilities={
        "client_type": "wearable",
        "supports": {"voice": True, "camera": True, "screen": True},
        "constraints": {"screen_size": "tiny", "interaction": "voice"},
    },
)

The interface does not need to know model names, providers, or app endpoints.

Pair A User Interface

pairing = await marona.start_pairing(
    interface="web",
    device_name="My web app",
)

print(pairing.display_code)
print(pairing.whatsapp_url)

Use the returned identity token on future requests.

Send Files

from marona import RuntimeAttachment

attachment = RuntimeAttachment.from_bytes(
    b"hello",
    filename="note.txt",
    mime_type="text/plain",
    kind="document",
)

response = await marona.message("Summarize this file", attachments=[attachment])

Package Names

  • Python client: marona, import marona
  • Dart client: marona, import package:marona/marona.dart
  • TypeScript client: marona, import Marona from "marona"
  • Developer SDK for building apps: marona-sdk, import marona_sdk

Project details


Release history Release notifications | RSS feed

This version

0.2.3

Download files

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

Source Distribution

marona-0.2.3.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

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

marona-0.2.3-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file marona-0.2.3.tar.gz.

File metadata

  • Download URL: marona-0.2.3.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for marona-0.2.3.tar.gz
Algorithm Hash digest
SHA256 f55994445fa6446180e39d7417abf3069ae2a8c7103fa7028580f8c230ae132a
MD5 13304d551fd4fb538ee02a2e6ad8daa6
BLAKE2b-256 ce676bbcf2d608d03fd8d5b90e704e98ca0f2d746b19a1afd8bc1e600feaf3f0

See more details on using hashes here.

File details

Details for the file marona-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: marona-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for marona-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f57870f7e301883ff82df62dd52635a6e9d3cbc53a73b25eb92062e03e913f65
MD5 b578099e122a79c2ef6770658c08c7aa
BLAKE2b-256 96e508f4ead2c67940be8f835ac6a8babbbc09bf84206c0460219b423c68f8ee

See more details on using hashes here.

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