> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bryel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Instrument an app, send a trace, and see it in bryel in under five minutes.

<Steps>
  <Step title="Get an API key">
    Create a project in the [bryel dashboard](https://app.bryel.ai) and copy its API key (`bk_…`). Set it as `BRYEL_KEY` in your environment.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    export BRYEL_KEY=bk_...
    ```
  </Step>

  <Step title="Install the SDK">
    Pick the package for your stack.

    <CodeGroup>
      ```bash Vercel AI SDK theme={"theme":{"light":"github-light","dark":"github-dark"}}
      bun add @bryel/vercel @vercel/otel
      ```

      ```bash Any OTel app theme={"theme":{"light":"github-light","dark":"github-dark"}}
      bun add @bryel/sdk-core @opentelemetry/sdk-trace-base
      ```
    </CodeGroup>
  </Step>

  <Step title="Register the processor">
    Add the bryel span processor where you set up OpenTelemetry.

    <Tabs>
      <Tab title="Vercel AI SDK">
        In `instrumentation.ts`:

        ```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
        import { registerOTel } from "@vercel/otel";
        import { bryelVercelProcessor } from "@bryel/vercel";

        export function register() {
          registerOTel({
            serviceName: "my-app",
            spanProcessors: [bryelVercelProcessor({ apiKey: process.env.BRYEL_KEY! })],
          });
        }
        ```
      </Tab>

      <Tab title="Any OTel app">
        Wire the core processor into your tracer setup. See [Any OpenTelemetry app](/sdk/typescript) for the full configuration.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Enable telemetry per call">
    Turn on `experimental_telemetry` for each generation you want traced.

    ```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
    const result = streamText({
      model: openai("gpt-5"),
      prompt,
      experimental_telemetry: {
        isEnabled: true,
        metadata: { sessionId, userId }, // groups a conversation in bryel
      },
    });
    ```
  </Step>

  <Step title="See it in bryel">
    Run your app, then open the dashboard. You'll see the run: streamed turns, tool calls, tokens, and cost.

    <Tip>A streamed span finalizes only once the stream is fully consumed — always drain it.</Tip>
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Instrumentation" icon="plug" href="/sdk/typescript">
    Set up bryel for your framework — Vercel AI SDK, OpenTelemetry, or anything else.
  </Card>

  <Card title="Concepts" icon="book-open" href="/concepts">
    Understand traces, sessions, and turns, and how bryel models an agent run.
  </Card>
</CardGroup>
