Use with AI agents
Point Lovable, Cursor, Replit, and other AI coding tools at the SDK so they generate correct, secure code.
Built for AI agents
The SDK is designed for AI coding tools (Lovable, Cursor, Replit, and the like). Every helper is fully typed, so the agent infers the right call straight from the types — and the docs are published as machine-readable text it can pull in directly.
- Index: docs.native.thebdk.com/llms.txt — a short map of every page.
- Full text: docs.native.thebdk.com/llms-full.txt — the entire reference in one file.
Point your agent at those URLs, or paste the starter prompt below, and it has what it needs.
Prime your agent
Drop this into your agent's context before you ask it to build a native feature.
The patterns to follow
A handful of rules keep generated code correct.
- Subscribe before you call. Interactive features (camera, pickers, biometrics, purchases) deliver their result on an event, not the returned promise.
- Branch on
!result.triggered. Outside the native app a call doesn't run — handle that path so your web build keeps working. - Keep server code on the server.
@bdk/native/server/*runs on your backend with your credentials; never import it into a browser bundle.
Keys stay in the environment
Agents copy your examples closely, so every example here reads credentials from the environment. Follow the same rule: pass keys from env (or a secrets manager), never in client code or source.
Server helpers read their credentials from arguments or environment variables. Don't hardcode API keys, and never ship a server import to the browser.