---
title: Choose how to integrate
description: Connect your agent or tooling to Prefactor with an SDK, the API, or
  the CLI, and pick the one that fits.
editUrl: true
head: []
template: doc
sidebar:
  hidden: false
  attrs: {}
pagefind: true
draft: false
---

Everything Prefactor records arrives through one platform API. The SDKs and the CLI are both built on it, so you can connect in whichever way suits your code: add an SDK, call the API yourself, or work from the terminal.

| | Use it when | You handle |
| --- | --- | --- |
| [SDKs](/sdks) | Your agent is written in TypeScript or Python, especially on a framework we integrate with, such as LangChain or the Vercel AI SDK. | Very little. The SDK records spans as your agent runs, and retries and rate limits are handled for you. |
| [API](/api) | Your agent is in another language, you don't want another dependency, or you're building your own tooling on top of Prefactor. | Each request, plus retries, rate limits and idempotency keys. The [OpenAPI spec](/api#the-openapi-spec) describes every operation. |
| [CLI](/cli) | You want to set up or inspect Prefactor from a terminal or a script, or let a coding agent do it for you. | Commands, not code. The CLI doesn't record runs for you. |

All three authenticate with an [API token](/platform/concepts/api-token). Use a deployment token in the code that records runs, and an account token for tooling that manages the whole account.

## Start here

- [Quickstart](/quickstart) - run a demo agent with the SDK and see its spans in the web app.
- [Record a run with the API](/api/record-a-run) - send a run with plain HTTP requests, no SDK.
- [Get started with the CLI](/cli/getting-started) - install the CLI and sign in.