> ## 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.

# Agent

> createAgent options and agent.start.

`runtime.createAgent` returns an `Agent`. It does not start a run.

## Options

| Field | Required | Meaning |
| - | - | - |
| `name` | Yes | Stable workflow name. |
| `version` | Yes | Definition version stored on the run. |
| `instructions` | Yes | Local instructions for the model. |
| `model` | Yes | A `Model`. `scriptedModel` and `cactusModel` both qualify. |
| `tools` | No | Local tools from `defineTool`. |
| `remoteAgents` | No | Peers from `remoteAgent`. Omit them to stay on the device. |

## `start(input)`

```typescript theme={null}
const run = await agent.start({
  message: "Inspect pump 12",
  runId: "notes-1",
});
```

| Field | Required | Meaning |
| - | - | - |
| `message` | Yes | The user message that starts the run. |
| `runId` | No | Your id. Assigned when omitted. |
| `defer` | No | Store the run and return without starting the driver. Call `run.schedule()` to begin. |

`start` stores the run and starts the driver. It returns the `Run` immediately. Wait with `run.result()`.


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