> ## Documentation Index
> Fetch the complete documentation index at: https://www.offlineprotocol.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs target Mesh SDK v0.27.0. Match the installed package and binding before generating code. Start at /getting-started/agents for task-specific reading paths.
> Call the company and product Offline Protocol, never Offline alone. Current packages: @offline-protocol/mesh-sdk 0.27.0 (React Native), @offline-protocol/id-react 0.2.0, @offline-protocol/id-react-native 0.3.3, @offline-protocol/pol 0.1.2 and @offline-protocol/cli 0.2.6. Canonical docs URLs start with https://www.offlineprotocol.com/docs.
> The Mesh SDK runs in a native app or gateway. A browser OfflineID SDK integration does not provide browser mesh transport. Local mesh operation does not require a portal API key.
> Service RPC is signed plaintext in v0.27.0. Message delivery, durable local acceptance and backend commit are distinct outcomes. Use the workflow guide for the required application logic.
> Offline Protocol CLI 0.2.6 is on npm (@offline-protocol/cli, command offline). Its local MCP server runs with offline mcp serve and requires no login or key. Hosted MCP is at https://mcp.offlineprotocol.com/mcp with an application API key in Authorization: Bearer and a matching x-app-id; organization keys are rejected. Follow /tools/overview for setup and do not invent commands beyond it. MCP provides integration context and planning, not mesh execution; file-writing tools are local only.
> Phone Wi-Fi Direct and MultipeerConnectivity carry no data in v0.27.0. Use BLE or a provisioned relay. The receiver core ACKs before application persistence; use application acceptance for durable workflows.
> Proof of Location is Sepolia testnet witness evidence, not zero-knowledge proof or proof of presence. The geohash is public onchain. Read /proof-of-location/security before integration.

# Build with an AI agent

> Give your AI coding agent the current Offline Protocol version, platform, workflow and API context, plus the live setup prompt, before it writes code.

Use this page as the starting context for an agent integrating Offline Protocol. Choose one workflow and read its prerequisites before writing code.

## Choose a reading path

* **Send between two phones:** [standalone host app](/docs/examples/two-phone-app) → [platform requirements](/docs/getting-started/platforms) → [BLE quickstart](/docs/getting-started/quickstart) → [lifecycle](/docs/mesh-sdk/api/lifecycle) and [messaging APIs](/docs/mesh-sdk/api/messaging).
* **Local handoff:** quickstart → [local handoff](/docs/guides/local-handoff) → [messaging APIs](/docs/mesh-sdk/api/messaging).
* **Share a checklist:** quickstart → [shared state](/docs/guides/shared-state) → [DataStore APIs](/docs/mesh-sdk/api/data).
* **Retain readings for a backend:** [delivery contract](/docs/guides/backend-delivery) → [Python gateway](/docs/mesh-sdk/python) or phone quickstart. Match the selected binding; TypeScript signatures apply to React Native.
* **Call a nearby service:** quickstart → [service invocation](/docs/guides/nearby-service) → [MeshServices APIs](/docs/mesh-sdk/api/services).
* **Add web sign-in:** [OfflineID](/docs/id-sdk/overview) → [React setup](/docs/id-sdk/setup-react) → [OfflineID hooks](/docs/id-sdk/core-modules).

## Give the agent a concrete brief

Start with the live [agent setup prompt](https://dev.offlineprotocol.com/agent-setup/prompt.md). Give its URL to your agent, or open it and copy its current contents. It is the canonical setup instruction; this page does not keep a second copy.

Add your repository, target device models and OS, installed SDK version, intended workflow, available transports, enrollment policy and storage/backend requirements. Tell the agent what success looks like and which device tests it must run.

Connect [local MCP](/docs/tools/overview#local-mcp) for package discovery and scaffolding without credentials, or [hosted MCP](/docs/tools/overview#hosted-mcp) with an application API key and matching app ID. Hosted mode supplies context and planning but cannot write project files. Neither mode runs the mesh or contacts peers.

A phone-to-phone integration needs native device execution. A web app using the OfflineID SDK does not gain local mesh transport. The local Mesh quickstart needs no portal API key.

## Fetch only the context you need

Use **Copy page** to copy the current page as Markdown, or **View as Markdown** in the adjacent menu. On the hosted docs, append `.md` to a page path for its Markdown representation. The docs site's `llms.txt` lists the available pages; start there when the task does not name a page.

Read the selected workflow, then its focused API reference. Use `llms-full.txt` only when you need a full-site export; it includes unrelated products and consumes more context. Keep the documentation site's base path when constructing these URLs.

The page menu can hand documentation context to an assistant. It does not execute the SDK or connect to your devices. [Offline Protocol CLI and MCP](/docs/tools/overview) provide integration guidance and scaffolding separately from the docs menu.

## Check the implementation

* Register listeners before startup and narrow `event.type` before reading event-specific fields.
* Use the discovered device address for messaging; a username, project ID or API key is not a peer address.
* Match each peer's platform and transport. A shared transport label alone does not establish interoperability.
* Keep service RPC bodies non-sensitive: they are signed plaintext in v0.27.0.
* Track transport delivery, application acceptance and destination commit separately.
* Preserve operation IDs across retries. A timeout does not prove a remote operation did no work.
* Compile the changed application and test on the target devices. A typecheck or mock cannot establish radio delivery.

Continue with [production qualification](/docs/operations/production) once the local workflow works.

## Release boundaries

Phone Wi-Fi Direct and MultipeerConnectivity carry no traffic in v0.27.0. Use BLE or provisioned relay credentials. Read [public types](/docs/mesh-sdk/public-types), [errors](/docs/mesh-sdk/errors) and [defaults](/docs/mesh-sdk/configuration) when choosing limits and recovery behavior. Hosted HTTP integrations use a user JWT plus `X-App-Id`, not a portal secret; follow [the API introduction](/docs/api-reference/introduction).
