Skip to main content

What is Offline Protocol?

Offline Protocol is an offline-first mesh networking SDK and a set of hosted services. The Mesh SDK (v0.31.0) runs inside your application on each device and provides discovery, device identity, encrypted messaging, replicated documents and service invocation over Bluetooth LE, local IP networks or a relay. OfflineID adds hosted account sign-in, and the CLI and MCP server help coding agents integrate it. Start with Build with Offline Protocol.

Which platforms and versions are supported?

React Native on native iOS and Android apps (@offline-protocol/mesh-sdk 0.31.0), Python gateways on macOS, Linux and Windows (offline-protocol-sdk 0.31.0 on PyPI), Java on desktop and server (com.offlineprotocol:offline-protocol-java 0.31.0 on Maven Central), C and any language that calls C (the header and library in the GitHub release), Ruby on desktop and server (offline_protocol 0.31.0 on RubyGems), the browser (an experimental binding built from the SDK repository over the offline-protocol-web crate), and Rust full peers (offline-protocol 0.31.0 on crates.io) or constrained leaves (offline-protocol-leaf 0.31.0). A Swift package, Android bindings and a Flutter plugin ship as previews. OfflineID ships as @offline-protocol/id-react 0.2.0 and @offline-protocol/id-react-native 0.3.3, Proof of Location as @offline-protocol/pol 0.1.2, and the CLI as @offline-protocol/cli 0.2.9. See platforms and transports for the transport matrix.

Does the Mesh SDK run in a browser or Expo Go?

In a browser, yes, from v0.31.0, through the experimental browser binding: the engine runs as a full node in a Web Worker, links devices over WebRTC and, in Chromium, phones and boards over Web Bluetooth. Build it from the SDK repository; the JavaScript package is not on npm yet. In Expo Go, no: the React Native package is a native module, so it runs in native iOS and Android apps, including Expo projects with a development build. The React OfflineID SDK provides hosted sign-in in a browser and no mesh transport. See React Native installation.

Is this Bluetooth SIG Mesh?

No. Offline Protocol runs its own application protocol over BLE between devices running the SDK, with its own routing, MLS encryption and identity, so it works on ordinary phones with no mesh-profile hardware. Bluetooth SIG Mesh devices form a separate network. See transport and routing.

Does local operation require internet or an API key?

No. Devices discover, verify and message each other over local transports with no internet and no API key; they need a supported local path, the platform permissions and their identity and session state. Hosted OfflineID, relay, telemetry and Proof of Location use the network and your application’s credentials. See applications and API keys.

Must I replace my database?

No. Use messages for events, documents for selected shared state, and an adapter to reconcile the records your backend owns. The document store does not replace your backend’s query engine or business rules.

Does delivery mean my workflow finished?

No. SDK delivery, application acceptance and backend commit are separate states. Track them using the local handoff pattern.

Can any two devices communicate?

They need a compatible transport and implementation. Phone Wi-Fi peer streams work between Android phones over Wi-Fi Direct, between iPhones over Network framework, and from v0.29.0 between iPhones, Android phones and Python hosts on a shared Wi-Fi network that allows multicast; BLE and the relay work across platforms with no shared network. A constrained leaf needs a full peer for session establishment. Check platforms and transports.

Are service requests encrypted?

From v0.29.0, once a session exists. A request or response body is sealed inside the MLS session with the other device when that device runs 0.29.0 or later and the session is confirmed, and the event says encrypted: true. Discovery, the first request to a provider a device has never met, and requests to older peers are control messages signed with the sender’s Ed25519 identity key: attributable and tamper-evident, and readable by the devices that carry them. See service invocation.

Can a program that does not use the SDK call a service on another device?

Yes, from v0.29.0, through the HTTP front. A host runs offline-protocol-service --http 127.0.0.1:8080 from the Python package with the http extra; a provider registers an HTTP endpoint with one PUT, and a program on another host calls it with a plain HTTP request to <service>.<device>.offline.protocol.internal. The call travels inside an end-to-end encrypted message, and the provider sees the caller’s authenticated address in X-Offline-Protocol-Sender. See HTTP front.

Can I use the CLI or MCP server now?

Yes. Install @offline-protocol/cli (0.2.9) from npm and use its local MCP server, or connect to the hosted MCP with an app API key. Both provide integration context; local mode also writes scaffolds. Neither runs the mesh or talks to peers. See CLI and MCP.

Are the SDKs free to use in production?

Yes. The Offline Protocol mesh SDK is AGPL-3.0-only, with a commercial license available, and AGPL use is free in production and for a business as long as you meet its obligations, such as offering your users the corresponding source. The OfflineID and Proof of Location client packages are MIT or ISC. The licensing FAQ covers app-store distribution and the network-use clause.

How do I ship a proprietary application?

Email legal@offlineprotocol.com for a commercial mesh SDK license, with a brief description of your product, its distribution model and expected scale. See licensing and hosted services. For Apple App Store distribution, the commercial license is the supported option. AGPL-compliant use and hosted subscriptions are separate from commercial mesh SDK distribution rights. See licensing.

Does phone Wi-Fi Direct work in v0.31.0?

Yes, from v0.28.0, with limits. Android carries authenticated streams over Wi-Fi Direct and, with autoAccept: true on Android 10 and later, forms the group itself with no system dialog. iOS has no Wi-Fi Direct API; the same transport slot uses Network framework over the local network or AWDL, and reaches other iPhones and Python hosts on the same LAN. From v0.29.0 Android also joins the Wi-Fi network it is on, so an iPhone and an Android phone on a shared network that allows multicast meet over this slot; an iPhone cannot join a Wi-Fi Direct group. An iPhone on 0.28.0 or later does not see one on 0.27 or earlier. With no shared network, use BLE or a relay between platforms. See phone Wi-Fi peer streams.

Can I use the SDK from Python, Java, C, Ruby, Flutter, Swift or Kotlin?

Python: yes, pip install offline-protocol-sdk installs 0.31.0 wheels for macOS on Apple silicon, Linux x86_64 and aarch64 (glibc 2.34 or later) and Windows x86_64, for Python 3.10 to 3.13. Swift and Kotlin: since v0.28.0 there is a Swift package for iOS and Android bindings with native libraries, as previews. The Android library is on Maven Central as com.offlineprotocol:offline-protocol-sdk from 0.29.0 (Android 7+). Java: yes, from v0.30.0, on JDK 22 or later, from Maven Central as com.offlineprotocol:offline-protocol-java with the native library from the GitHub release. C: yes, from v0.30.0, with the header and library in the GitHub release, and from any language that calls C. Ruby: yes, from v0.31.0, on Ruby 3.3 or later, from RubyGems as offline_protocol with the native library from the GitHub release. Flutter: a preview plugin from v0.30.0, used as a path dependency on the SDK repository; it is not on pub.dev. From v0.31.0 its MeshSdk carries the React Native module’s native surface. See Python, Java, C, Ruby, Flutter and Swift and Android packages.

How do I get an API key?

Sign in with an email code at dev.offlineprotocol.com, create an organization and an application, and create a key in the application’s API keys tab. The secret is shown once. Local mesh sessions need no key. See applications and API keys.

What do the hosted plans include?

Free is $0, Pro $99 a month and Scale $499 a month, with monthly quotas of 1,000, 10,000 and 50,000 monthly active users; 10,000, 100,000 and 1 million hosted relay deliveries; 250,000, 2 million and 10 million telemetry events; and 250, 2,500 and 10,000 Proof of Location verifications. Seats are 3, 10 and unlimited, and analytics history is 7, 30 and 90 days. Enterprise is an annual agreement with contracted volumes, production support, an SLA, SCIM and audit logs. Overage is $0.02 per monthly active user, $0.50 per 1,000 hosted relay deliveries, $0.05 per 1,000 telemetry events and $0.03 per verification. See plans, quotas and rates.

What does telemetry collect?

Nothing until your app calls enableTelemetry with a key and App ID. Then the SDK uploads a fixed inventory of fourteen event types, such as deliveries, relaying, routing decisions, transport changes and MLS session health, with no message content and no identifier fields, to one Offline Protocol endpoint over TLS. From v0.30.0 the uploader trusts only the certificate roots that issue that endpoint’s certificate; apps that call enableTelemetry on 0.26.0 to 0.29.0 should update. onEvent gives your app every protocol event locally with no key. See telemetry.

Is Proof of Location available?

Yes, on Ethereum Sepolia testnet. Enable it in the portal and install @offline-protocol/pol 0.1.2: it submits a claim with an OfflineID session, commits a coarse geohash to an EigenLayer AVS contract and returns operator witness attestations for your backend to verify. See Proof of Location.

How do I report a security issue or get support?

Email security vulnerabilities to security@offlineprotocol.com, not a public issue; reports are acknowledged within 48 hours with an assessment and remediation timeline within 7 days. For SDK, portal, deployment and billing questions, email support@offlineprotocol.com. For Enterprise plans, email sales@offlineprotocol.com. Licensing and privacy questions go to legal@offlineprotocol.com. See support.

How do billing and usage limits work?

Upgrade from the portal’s Billing tab, or email sales@offlineprotocol.com for Enterprise. You get an email and a portal banner when a meter reaches 80% and 100% of its monthly quota. With a card on file, usage beyond the quota is billed at the published overage rates at the end of the month and is never paused for quota; if you set a billing limit for a meter, charges stop at the limit and that meter’s service pauses until you raise or remove it, or the next billing period starts. A Free organization without a card has all metered hosted services paused when a quota runs out, until it adds a card, chooses a plan or the next billing period starts. A payment that still fails after Stripe’s retries pauses all metered hosted services until the card is updated. Enterprise contracts are never paused. Local peer-to-peer traffic is never metered or paused. See usage warnings, billing limits and pauses.