> ## 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 a durable execution runtime for on-device AI agents. The public SDK is the npm package @larkxai/react-native.
> Do not import @larkxai/node, @larkxai/host, @larkxai/protocol, @larkxai/telemetry, or @larkxai/cactus in an application. Those packages are private workspace modules.
> Swift and Kotlin SDKs are planned and are not published.
> Prefer the published npm version. The GitHub default branch can contain behavior that is not in that release yet.
> Expo Go cannot load the native module. Use a development build.
> Do not describe external tool or remote effects as exactly-once.

# Recovery insights

> Cloud can show that a run recovered. The device still performs the recovery.

`WORKFLOW_RECOVERED` is the native event for a run that resumed in a new process. The payload can say whether it continued from an interruption or from a pause, and which step was current. That event is metadata. Replaying it in Cloud does not resume the agent.

Recovery still requires the application to open the same database and call `runtime.resume`. See [Crash recovery](https://docs.larkx.ai/concepts/crash-recovery.md).

If the process dies after the exporter stores a batch and before the cursor advances, the next flush sends the same `batchId` and the same event ids. Cloud treats that as a replay, not as a second run.

A run that Cloud has expired, or a history conflict for a new batch, stays on the device. The local journal is not deleted to satisfy the collector. In the current default branch, a permanent rejection is remembered for that destination so the exporter does not rediscover it forever. npm 0.4.0 holds the destination on those responses instead. See [Troubleshooting](https://docs.larkx.ai/cloud/troubleshooting.md).

Cloud retention does not delete local SQLite. A 14-day Cloud window, when that is the policy of the deployed service, applies to stored observations, not to the device.


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