@larkxai/react-native/cactus. LarkX does not embed the model. The supported demo checkpoint is qwen3-0.6b. The download and init() happen before agent.start, so they are not replayed as agent steps.
This repository has not executed that download or a completion on a phone. Host tests cover the adapter with a stand-in. Treat the snippet as the supported API, and confirm it on your development build.
Prepare the model
Install the optional peers from the Local inference tab and rebuild the development client. Then download once. The download needs a network. Afterinit() resolves, local steps in this agent do not.
destroy() when that screen closes.
Run the agent
result.finish is "stop" when the model stops without another tool call. Turn on airplane mode after init() if you want to see that this run does not need the network. Airplane mode does not by itself tell the runtime that a remote agent is offline. This agent has no remote agent.
Recover the same run
Force-quit is something you do on the device. The code below is the restart path. It opens a new runtime on the same database. Do not callresume on the runtime you already closed.
resume. The name and version must match the stored run. A committed tool call is not executed again. If the process died during a pure tool, that tool may run again. If it died during a non-idempotent tool, the run is BLOCKED until the application reconciles it. See Crash recovery.
model must already be initialized in the new process. download() and init() are not restored by resume.