# AI Coding Agents



AI Coding Agents [#ai-coding-agents]

If you build with an AI coding agent, it will guess at the starti.app API unless you tell it where the documentation is. Every page on this site is published as plain markdown for exactly that reason.

This guide shows you what to point your agent at, and what to tell it once so you never have to repeat yourself.

Machine-readable documentation [#machine-readable-documentation]

Three endpoints cover every use case:

| URL                                                       | What it is                                                              | Rough size   |
| --------------------------------------------------------- | ----------------------------------------------------------------------- | ------------ |
| [`/llms.txt`](https://docs.starti.app/llms.txt)           | An index of every page — title, description, and a link to its markdown | \~4k tokens  |
| [`/llms-full.txt`](https://docs.starti.app/llms-full.txt) | Every page concatenated into one file                                   | \~92k tokens |
| `<any page URL>.mdx`                                      | The raw markdown of a single page                                       | 1–5k tokens  |

The `.mdx` suffix works on any page. For example, this page is at [`/sdk/ai-coding-agents.mdx`](https://docs.starti.app/sdk/ai-coding-agents.mdx), and the biometrics reference is at [`/sdk/reference/biometrics.mdx`](https://docs.starti.app/sdk/reference/biometrics.mdx).

<Callout type="info">
  Start with `/llms.txt` and let the agent fetch individual pages on demand. That keeps the context window free for your own code. Reach for `/llms-full.txt` only when the model has a large context window and you want the whole API available at once.
</Callout>

Tell your agent once [#tell-your-agent-once]

For a single session, this is enough:

```text
Use https://docs.starti.app/llms.txt as the index for the starti.app SDK.
Before writing any SDK code, fetch the .mdx URL of the relevant page and
follow it — do not guess method names or option shapes.
```

Make it permanent [#make-it-permanent]

Most agents read a project file on every run. Drop the block below into the right file for your tool and the instruction sticks.

<Tabs items={['Claude Code', 'Codex & others', 'Cursor']}>
  <Tab value="Claude Code">
    Add it to `CLAUDE.md` in your project root.
  </Tab>

  <Tab value="Codex & others">
    Add it to `AGENTS.md` in your project root. This is the convention used by OpenAI Codex, Gemini CLI, Kimi, and a growing number of other agents — several of them also read `CLAUDE.md` as a fallback.
  </Tab>

  <Tab value="Cursor">
    Add it to `.cursor/rules/starti-app.mdc` in your project root.
  </Tab>
</Tabs>

```markdown
## starti.app SDK

This project runs inside a starti.app container — a native iOS/Android app that
wraps our web application and exposes device features to JavaScript.

Documentation:

- Index of every page: https://docs.starti.app/llms.txt
- Any page as raw markdown: append `.mdx` to its URL, e.g.
  https://docs.starti.app/sdk/reference/biometrics.mdx
- Read the reference page for a module before calling its methods. Do not
  guess method names, parameters, or option shapes.

Rules for SDK code:

- The SDK is loaded from the CDN with a `<script>` tag and exposes a global
  `startiapp` object on `window`. Never `import` or `require` it.
- Call `startiapp.initialize()` exactly once, early in the app lifecycle — not
  on every route change in a single-page app.
- Native features only exist inside the container. Guard calls with
  `startiapp.isRunningInApp()`, or wrap `initialize()` in try/catch, so the
  site still works in a normal browser.
- Type definitions come from the `starti.app` npm package. Prefer the types
  over assumptions about a signature.
```

Those four rules cover the mistakes agents make most often with this SDK.

Install the type definitions [#install-the-type-definitions]

The single highest-leverage step. The SDK ships full TypeScript types, and an agent with access to them stops inventing method signatures:

```bash
npm install --save-dev starti.app
```

The package is types only — the SDK itself still loads from the CDN at runtime. Once installed, the global `startiapp` object is typed everywhere, and your agent can read the exact shape of every module from `node_modules`. See [TypeScript Support](/sdk/explanation/typescript-support) for details.

Send a single page to a chat [#send-a-single-page-to-a-chat]

Every page on this site has a **Copy Markdown** button and a **View Options** menu at the top. Use them when you want to hand one page to a chat assistant rather than wire up a whole project:

* **Copy Markdown** — copies the raw markdown of the page to your clipboard
* **View as Markdown** — opens the `.mdx` file directly
* **Open in Claude / ChatGPT / Cursor** — opens a new conversation prompted to read the current page

Context7 [#context7]

The documentation is also indexed by [Context7](https://context7.com), which several agents can query through an MCP server. The most complete entry is:

```text
/llmstxt/docs-v2_starti_app_llms_txt
```

Context7 snapshots the docs periodically, so it can lag behind this site. When accuracy matters, fetch the `.mdx` URL directly.

Keep it current [#keep-it-current]

`/llms.txt` and every `.mdx` file are regenerated on each deployment, so they always match what you see on this site. Tell your agent to fetch them rather than rely on what it remembers about starti.app — the SDK gains modules regularly, and a model's training data will be behind.

Next steps [#next-steps]

<Cards>
  <Card href="/sdk/getting-started/setup-and-the-basics" title="Setup and the Basics">
    Add the SDK to your page and initialize it
  </Card>

  <Card href="/sdk/explanation/typescript-support" title="TypeScript Support">
    Install the types package and get autocompletion for every module
  </Card>
</Cards>
