Choose how to integrate
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 | 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 | 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 describes every operation. |
| 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. Use a deployment token in the code that records runs, and an account token for tooling that manages the whole account.
Start here
Section titled “Start here”- Quickstart - run a demo agent with the SDK and see its spans in the web app.
- Record a run with the API - send a run with plain HTTP requests, no SDK.
- Get started with the CLI - install the CLI and sign in.