Docs
Installation
Installation
Add the Captar SDK, prepare environment variables, and set up the base project shape.
Installation
Use Captar when you want runtime controls inside your application rather than a proxy or gateway layer.
The install footprint is intentionally small: the SDK, your provider client, and whatever exporter configuration you choose for traces.
pnpm add @captar/sdk openaiEnvironment
your-app
.env
src
captar.ts
OPENAI_API_KEY=...
CAPTAR_INGEST_URL=http://localhost:3000/api/ingest
CAPTAR_INGEST_API_KEY=Base runtime
import { createCaptar } from "@captar/sdk";
export const captar = createCaptar({
project: "support-bot",
exporter: {
url: process.env.CAPTAR_INGEST_URL!,
apiKey: process.env.CAPTAR_INGEST_API_KEY,
},
});After install
- Create a runtime module you can import anywhere in your app.
- Store project defaults in one place, not inline in every request handler.
- Decide whether exporter settings come from environment variables or code.
- Start with one session path, then add policies and tool tracking.
OpenAI-compatible v1
Captar v1 is intentionally optimized for OpenAI and OpenAI-compatible request flows. Other provider integrations should stay out of scope for now.