Skip to content
Lovelace

Build with an agent

Hand your coding agent a ready-made prompt, or install the Lovelace developer skills, to add Lattice Cloud as your app's AI back end.

Copy this prompt into your agent

Paste it into Claude Code, Codex, Cursor, or any coding agent working in your repo. The agent creates your API key with the Lovelace CLI, which writes it to your env file without showing it, wires Lattice Cloud into your existing AI code, and checks that a real completion comes back. Your only step is approving the Lovelace sign-in in your browser.

Add AI to this app with Lovelace Lattice Cloud as the model back end. Use developer-pays: one Lovelace API key that the app owns, so my users need no Lovelace account.

If you support plugins, install the Lovelace developer skills and use the add-ai-backend skill:
  Claude Code:
    /plugin marketplace add reasonabletech/lovelace-marketplace
    /plugin install lovelace-developers@lovelace
  Codex:
    codex plugin marketplace add reasonabletech/lovelace-marketplace
    codex plugin add lovelace-developers@lovelace

Otherwise, do it directly:
1. Detect this project's stack and find where it calls a model today.
2. Install the Lovelace CLI if `ada` is missing: `curl -fsSL https://d.uselovelace.com/install | sh`.
3. Run `ada developer api-key create --name "<app name> development" --scope lattice:compute:inference --scope lattice:compute:catalog:read --env-file <the env file this app loads> --format json`. It signs me in through my browser and writes LOVELACE_API_KEY into the env file without printing it. Never print, paste, or commit the key.
4. Wire it in on the server: keep an existing OpenAI client and change only its base URL to https://lattice.uselovelace.com/v1 and its key to LOVELACE_API_KEY, or for new TypeScript code use @reasonabletech/lattice-client with `credential: { kind: "apiKey", apiKey: process.env.LOVELACE_API_KEY }`.
5. Verify by running the app's own model call and confirming it returns a real completion.

Only if I ask for each end user to use their own Lovelace compute: add Sign in with Lovelace with `ada developer app create --redirect-uri <callback URL>` and call Lattice with each user's OAuth token (`credential: { kind: "oauth", accessToken }`) instead of the API key.

Install the Lovelace developer skills

Install the lovelace-developers plugin, then ask your agent for what you want, for example “Add AI to my app”. In Claude Code you can also run /lovelace-developers:add-ai-backend directly.

Claude Code

/plugin marketplace add reasonabletech/lovelace-marketplace
/plugin install lovelace-developers@lovelace

Codex

codex plugin marketplace add reasonabletech/lovelace-marketplace
codex plugin add lovelace-developers@lovelace
  • add-ai-backend “Add AI to my app”. Creates the API key with the CLI, wires Lattice Cloud into your existing AI code, and verifies a real completion. Developer-pays unless you ask otherwise.
  • add-sign-in “Add Sign in with Lovelace”. Creates the OAuth client with the CLI and wires OpenID Connect with PKCE into your auth setup.
  • use-local-ai “Use my own GPU while I develop”. Points development config at a model on your machine through Lattice, with no account.
  • add-skills “Give my app a reusable Skill”. Reuses or generates a Lovelace Skill, pins a version, and calls it from your server.
  • add-keyless-ci “Call Lattice from CI without a key”. Creates a trust policy for your repository with the CLI, gives the job its platform identity, and verifies a real completion from a run, with no stored secret.