marona 0.2.5
marona: ^0.2.5 copied to clipboard
Official Dart client SDK for Marona-compatible AI runtimes and Hub integrations.
marona #
Official Dart client for Marona-compatible hybrid AI runtimes and Marona Hub.
Use it from Flutter apps, Dart backends, desktop apps, wearable interfaces, or any client that needs one API for cloud, local, and hybrid AI execution.
Install #
dependencies:
marona: ^0.2.4
Create A Client #
import 'package:marona/marona.dart';
final marona = Marona(
apiKey: 'mrn_live_...',
mode: 'hybrid',
);
Modes:
online: use Marona Runtime and online app routes.offline: use only local cache, local models, and installed offline-capable execution targets.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 #
final response = await marona.message(
'Create a PowerPoint about AI introduction',
interfaceName: 'mobile_app',
conversationId: 'demo',
);
print(response.text);
Interface Names #
interfaceName identifies the client surface making the request.
Standard values are:
apiwebmobile_appdesktopwhatsapp
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 And Connect Apps #
await marona.sync();
final tools = await marona.hub.connect(
['billing-mcp', 'network-mcp'],
adapter: 'tools',
);
Marona resolves apps from local cache first. Offline mode uses only installed offline-capable execution targets. Online and hybrid modes can refresh from Hub.
Sync stores app metadata, execution modes, execution targets, permissions, workspace config, and runtime config. If the interface is paired, sync can also cache a safe private context pack for offline use.
Register A Local Or Cloud Model #
await marona.models.register(
name: 'office-model',
endpoint: 'http://localhost:9379',
);
marona.models.use('office-model');
Developers do not need to expose provider or backend details to client interfaces. Marona routes by execution mode and registered runtime resources.
Smart Glasses / Wearables #
final response = await marona.message(
'What am I looking at?',
interfaceName: 'wearable',
clientCapabilities: const ClientCapabilities(
clientType: 'wearable',
supports: {'voice': true, 'camera': true, 'screen': true},
constraints: {'screen_size': 'tiny', 'interaction': 'voice'},
),
);
Package Names #
- Dart client:
marona, importpackage:marona/marona.dart - Python client:
marona, importmarona - TypeScript client:
marona, importMaronafrom"marona" - Developer SDK for building apps:
marona-sdk