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

# Getting Started

> Clone, run in the webview, and get a chat answering on a simulator.

The shortest path from clone to a running chat.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
git clone https://github.com/MervinPraison/PraisonAI
cd PraisonAI/src/praisonai-mobile
npm install && npm run check
```

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    Clone[📦 Clone] --> Install[⚙️ npm install]
    Install --> Check[✅ npm run check]
    Check --> Build[🪟 npm run build]
    Build --> Device[📱 Simulator]

    classDef step fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef start fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef done fill:#10B981,stroke:#7C90A0,color:#fff

    class Clone start
    class Install,Check,Build step
    class Device done
```

## Quick Start

<Steps>
  <Step title="Install">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    cd PraisonAI/src/praisonai-mobile
    npm install
    ```

    The package is private and needs Node `>=22.18`. Runtime dependencies load through adapters, so there is no runtime `dependencies` block.
  </Step>

  <Step title="Run the gates">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    npm run typecheck
    npm run test
    npm run check
    ```

    `check` chains `typecheck`, `boundaries`, and `test`.
  </Step>

  <Step title="Build the webview bundle">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    npm run build
    ```
  </Step>
</Steps>

***

## Package Scripts

Every script the package ships, from `package.json`.

| Script           | What it does                                      |
| ---------------- | ------------------------------------------------- |
| `typecheck`      | `tsc -p tsconfig.json`.                           |
| `test`           | Runs the `node --test` suite across every layer.  |
| `boundaries`     | Fails the build if an import crosses a seam.      |
| `build`          | Builds the webview bundle.                        |
| `test:bundle`    | Runs the bundle-gate's own suite.                 |
| `check`          | `typecheck` + `boundaries` + `test`.              |
| `check:upstream` | Checks the real `Agent` still satisfies the port. |
| `build:webview`  | Same as `build`.                                  |

***

## Swap the Engine

Which engine answers is a setting, read at boot in `app/src/main.ts`. Change one value.

```ts theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
const booted = await createApp({
  storage: platform.storage,
  secrets: platform.secrets,
  time: platform.time,
  shell: platform.shell,
  engines: enginesFor({ settings, http: platform.http }),
  settingDefs: SETTING_DEFS,
  engineId: "remote-http",
  onPublish: publish,
  now: () => Date.now(),
  newChatId: () => globalThis.crypto.randomUUID(),
});
```

Set `engineId: "praisonai-ts"` to run the agent loop in-process instead of over HTTP. The in-process engine is offered only when its factory is passed to `enginesFor`.

<Note>
  The device build is blocked on PraisonAI PR #4438: `crypto` and `events` are static imports on the Agent graph and die at webview import time. The app runs today with `remote-http`; it becomes runnable on device with `praisonai-ts` once #4438 lands.
</Note>

***

## Best Practices

<AccordionGroup>
  <Accordion title="Run npm run check before every commit">
    The bundle gate catches Node builtins and top-level `process.env` that pass in Node but blank the webview on device.
  </Accordion>

  <Accordion title="Start with remote-http">
    It speaks the full 11-event vocabulary against a running desktop engine, so you see tool rows and approvals while iterating.
  </Accordion>

  <Accordion title="Keep the engine choice in settings">
    `engineId` is read from settings at boot, so users switch runtimes without a rebuild.
  </Accordion>
</AccordionGroup>

***

## Related

<CardGroup cols={2}>
  <Card title="Agent Engine Port" icon="plug" href="/docs/features/mobile/engines">
    The three shipped engines and the conformance harness.
  </Card>

  <Card title="The Two Seams" icon="layer-group" href="/docs/features/mobile/architecture">
    Why the boundaries are enforced by build.
  </Card>
</CardGroup>
