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 AI runtimes and Marona Hub.

Use marona when you are building an application, bot, device, or agent interface that needs to:

  • send messages to a Marona-compatible runtime
  • discover available apps
  • connect approved Hub apps to your own agent framework
  • manage user permissions and service connections
  • receive inbound events
  • create realtime voice or vision sessions

Install

pip install marona

1. Create A Client

Marona Cloud:

from marona import Marona

marona = Marona(
    base_url="https://edge.marona.ai",
    api_key="mrn_live_...",
)

When api_key is provided, hosted Marona Runtime calls are authorized and usage is recorded against that developer account. Use hub.connect(...) when your own agent runtime only needs approved Hub app connection metadata.

Self-hosted runtime:

from marona import Marona

marona = Marona(
    base_url="https://runtime.example.com",
    api_key="mrn_live_...",
)

2. Send A Runtime Message

import asyncio

from marona import Marona


async def main() -> None:
    marona = Marona(api_key="mrn_live_...")
    response = await marona.message(
        "Create a PowerPoint about AI introduction",
        interface="api",
        conversation_id="demo",
    )

    print(response.reply)
    for artifact in response.artifacts:
        print(artifact.get("filename"), artifact.get("url"))


asyncio.run(main())

3. Connect Hub Apps To Your Own Agent

Every Hub app has a unique app ID, also called a slug. Examples:

  • weather-mcp
  • knowledge-mcp
  • company-crm-mcp

Use hub.connect(...) when your own agent framework will execute the model and you only need approved app connections from Marona Hub.

import asyncio

from marona import Marona


async def main() -> None:
    marona = Marona(api_key="mrn_live_...")
    servers = await marona.hub.connect(
        ["weather-mcp", "knowledge-mcp"],
        adapter="openai_mcp",
    )
    print(servers)


asyncio.run(main())

For frameworks that need tool descriptors instead of MCP server configs:

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

4. List Available Apps

apps = await marona.list_apps(limit=20, search="slides")

for app in apps.apps:
    print(app["slug"], app["name"])

5. Pair A User Interface

Pairing lets a web, mobile, desktop, wearable, or other interface attach to the same user identity.

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

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

After the user sends the pairing code from WhatsApp, poll for completion:

status = await marona.pairing_status(pairing.pairing_id)

if status.identity:
    identity_token = status.identity.access_token

Use the identity token on future requests:

response = await marona.message(
    "What is on my calendar today?",
    identity_token=identity_token,
)

6. Connect A User Service Account

Some apps need a user connection, such as Google Calendar, Gmail, or Google Slides.

connection = await marona.connect_app(
    "slides",
    provider="google",
    identity_token=identity_token,
    return_url="https://example.com/connected",
)

print(connection.authorization_url)

Open authorization_url in a browser so the user can authorize the provider.

7. 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],
    identity_token=identity_token,
)

8. Edge Runtime Activation

Device runtimes can activate and sync against Marona Hub with the same package:

from marona import EdgeHubClient

edge = EdgeHubClient(hub_url="https://hub.marona.ai")
activation = await edge.start_activation(
    device_name="Office runtime",
    device_public_key="...",
)

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.1.5

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.1.5.tar.gz (16.8 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.1.5-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for marona-0.1.5.tar.gz
Algorithm Hash digest
SHA256 67b516d4486183b35a0550a82727157d668826ba26218e959240534a811e3e8b
MD5 b1c91e0dd694ff3cc097ed8d5d42ae8e
BLAKE2b-256 02348d078a688c93fbf5e75e7d73d13933a04e444e75e49da2d6a8da8f54f18f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for marona-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5e5d965826c05e9bbf46679a182ed6fc060efc46279722d38db5980ff7cff3ee
MD5 e24c0a56a1a6af7dbd7e8d4c6edea99a
BLAKE2b-256 9ffe59730357fc633c089c62b46d388f49e8a40c0f06a0d471870dd609d2e891

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