Skip to content
ABTO Guide

Integration guide

Get started

The actual integration steps, from creating a project to the first request and the first event.

Once you have decided to adopt, start here. If you first want to know what ABTO is, read What ABTO solves.

  1. Create a project in the dashboard and generate API keys.
  2. Point the code that calls AI at the gateway. A server, a worker, a batch job: wherever the model is called, it is the same change. Put the feature ID in the official SDK’s featureId / feature_id field. The SDK carries it in the x-abto-feature-id header; set that header yourself only when calling the Gateway directly. This alone starts capturing per-feature cost and latency.
  3. Add the client SDK to your web or mobile app to collect user behavior.
  4. Send the browser’s device_id along with your server calls, so user behavior and AI calls connect.
  5. Confirm in the dashboard that cost, quality, and outcomes are all coming in.

When you get to the actual integration, following the dashboard’s Install screen is fastest. It shows examples already filled in with your project’s keys at every step, ready to copy as they are. This guide carries no keys, so read the code here to understand the overall structure.

You can install the ABTO SDK Agent Skill globally so that Codex or Claude Code analyzes your repository, selects only the SDKs you need, and completes the integration. Node.js 22.20 or later is required.

Codex:

Terminal window
npx --yes skills@latest add https://github.com/greedy-co/abto-sdk/tree/main/abto --skill abto --global --agent codex --copy --yes

Claude Code:

Terminal window
npx --yes skills@latest add https://github.com/greedy-co/abto-sdk/tree/main/abto --skill abto --global --agent claude-code --copy --yes

To let the agent handle the SDK installation too, paste this prompt:

Install the ABTO SDK Agent Skill globally for this agent, then integrate the ABTO SDK into this repository.
1. Confirm that Node.js 22.20 or later and npx are available.
2. Use npx --yes skills@latest add to install the abto skill from the official skill path at https://github.com/greedy-co/abto-sdk/tree/main/abto with --global --copy --yes and the correct --agent value for the current agent.
3. Verify the installation with npx --yes skills@latest list --global --agent <current-agent>, then read the newly installed abto skill. If this session cannot refresh its skill catalog, give me the exact prompt to continue in a new session.
4. Inspect this repository's runtimes and package managers, then install and integrate only the required Browser, App, or Server SDKs.
5. Keep Event Keys on the client and Calling Keys and provider credentials on the server only. Never commit any credentials.
6. Run the build and tests, verify that data reaches ABTO when possible, and report the changes and any remaining user action.
If a required key or permission is missing, complete everything that is safe first, then ask for the exact missing input.

See the Agent Skill installation guide for verification, removal, and troubleshooting commands.

Calling Key ck-abto-…
  • Server-only — authenticates every gateway call
  • Keep it in server environment variables only
  • Never expose it in a browser bundle, a URL, or your repository
Event Key ek-abto-…
  • Behavior collection in browsers and apps only
  • Grants no management permissions, so it is safe even if exposed

The key the server receives alone decides which project the data lands in. Values a client sends alongside are analytics context, never a basis for authorization.

When an unfamiliar concept comes up during integration, see Core concepts; for per-language installation status, see SDK availability.