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

> ## Agent Instructions
> LarkX is open-source execution infrastructure for on-device AI agents. It is not an inference engine, an LLM wrapper, a cloud-only agent framework, or a replacement for LangGraph or Cactus.
> Install the public SDK with npm install @larkxai/react-native. The published version is the sdkVersion variable on the Installation page. Import createRuntime, defineTool, scriptedModel, sqlite, remoteAgent, and larkxCloud from @larkxai/react-native. Import cactusModel from @larkxai/react-native/cactus only when the app uses local inference.
> Do not import @larkxai/node, @larkxai/host, @larkxai/protocol, @larkxai/telemetry, or @larkxai/cactus. Those packages are private. Swift and Kotlin SDKs are not published.
> Hello World uses scriptedModel and does not download a model or need Cloud. A Cactus agent needs cactus-react-native 1.13.1, react-native-nitro-modules 0.33.9 or newer, download(), and init() before start. Expo Go cannot load the native module.
> Recovery opens a new createRuntime on the same SQLite file, registers the same agent name and version, then calls resume. Do not call resume on a runtime that has already been closed. Do not describe external effects as exactly-once. A killed process does not keep running.
> Cloud telemetry is optional. Pass larkxCloud({ projectId, apiKey }) only after a local run already works. The key must start with lkx_ing_.

# Offline execution

> Local steps do not wait for the network. Remote steps wait until the device can send them.

A run with only local tools and a local model does not open a socket. `createRuntime` without `telemetry` does not create an export cursor and does not contact Cloud.

When the device is offline:

* Local model and tool steps continue as long as the process is running and the model is already on the device.
* A remote delegation stays in SQLite until the host can send it. It is not dropped to keep the local run moving.
* Cloud telemetry, if enabled, keeps the unsent batch and retries later. The agent does not wait for that upload.

`runtime` checks reachability for remote work and for telemetry. A failed collector does not fail the run.

## What offline does not mean

Offline execution is implemented in the runtime and covered by host tests. A physical device with the radio off, a force-quit, and a later resume is still on the device-validation checklist. Do not treat a green Node suite as that phone run.

Remote capabilities you did not declare are not assumed. An HTTP peer without `dedupe` and `lookup` cannot be safely retried after a lost acknowledgement. The run blocks instead of sending a second copy.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.