Getting Started

Quickstart

From sign-up to your first trace in Buzo — a handful of minutes of setup.

The Buzo SDK wraps your existing retriever (and, optionally, your LLM call) and fire-and-forget mirrors every event to Buzo. It never sits on your request path, never throws to your code, and never blocks.

  1. Get an API key

    Sign in at app.buzoai.com and create a key under Settings → SDK Keys. The key starts with ak_live_… and carries the sdk scope by default, which grants both the retrieval-traces and generation-traces ingest paths.

  2. Install the SDK

    npm install buzo-sdk
    # Optional — only if you use the LangChain integration:
    npm install @langchain/core
  3. Ship your first retrieval trace

    Construct a Buzo client once at module load, then wrap your LangChain retriever. The original retrieval path is unchanged — every call is also mirrored to Buzo.

    import { Buzo } from 'buzo-sdk'
    import { createBuzoCallbackHandler } from 'buzo-sdk/langchain'
    
    export const buzo = new Buzo({ apiKey: process.env.BUZO_API_KEY! })
    
    const handler = await createBuzoCallbackHandler(buzo, {
      collectionId: 'prod-support-kb',
      agentId: 'support-v3',
    })
    
    const docs = await retriever.invoke('how do I reset my password?', {
      callbacks: [handler],
    })
  4. (Optional) Capture LLM outputs

    Opt in to CITED_FLAGGED attribution by enabling output capture. The same LangChain handler now also fires on the chat model step in your chain — Buzo correlates retrieval and generation server-side via LangChain runId.

    Opt-in on purpose. LLM outputs frequently echo back user PII. Use outputCapture: 'redacted' with explicit patterns before enabling in production, or stay on 'off' (the default).
    LangChain
    const buzo = new Buzo({
      apiKey: process.env.BUZO_API_KEY!,
      outputCapture: 'redacted',
      outputRedactPatterns: [
        { pattern: /[\w.-]+@[\w.-]+\.\w+/g, replacement: '<EMAIL>' },
        { pattern: /\b\d{3}-\d{2}-\d{4}\b/g, replacement: '<SSN>' },
      ],
    })
    
    // Same handler, same one line.
    const answer = await chain.invoke(question, { callbacks: [handler] })

What next

  • Read How it works to understand what gets captured, how correlation works, and what the server does with it.
  • Pick your framework under Framework Integrations for end-to-end examples.
  • Use REST API directly if the SDK doesn't fit your stack.