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

# Quick Start

> Instrument an app with OpenTelemetry for full trace visibility and cost tracking in Orq.ai. Framework-specific guides are in the Integrations section.

**Orq.ai** observability captures every LLM call, agent step, and tool use as searchable traces with latency, token counts, and cost. **OpenTelemetry** is the standard, framework-agnostic way to instrument it.

<Info>
  * Set the **Orq.ai** OTLP endpoint and authenticate with an API key
  * Configure the OpenTelemetry SDK in an existing application
  * See every LLM call, agent step, and tool use in **Traces**
  * For framework-specific setup, see the [Frameworks in Integrations](/ai-studio/integrations/frameworks/overview)
</Info>

<Steps titleSize="h3">
  <Step title="Create an Orq.ai account">
    [Sign up](https://my.orq.ai/auth/signup) for a free **Orq.ai** account and set up a workspace.
  </Step>

  <Step title="Set up Orq.ai">
    <Tabs>
      <Tab title="API key only" icon="key">
        Open **Settings > Organization > [API Keys](/ai-studio/organization/api-keys)** in the [AI Studio](https://my.orq.ai). Click <kbd className="key">Create API Key</kbd>, give it a name, and copy it.

        Then open a terminal and run the command below, replacing `your-api-key-here` with the copied key. The code samples in the next steps read it from this environment variable.

        <CodeGroup>
          ```bash macOS / Linux theme={"theme":{"light":"github-light","dark":"github-dark"}}
          export ORQ_API_KEY="your-api-key-here"
          ```

          ```powershell Windows theme={"theme":{"light":"github-light","dark":"github-dark"}}
          $env:ORQ_API_KEY = "your-api-key-here"
          ```
        </CodeGroup>
      </Tab>

      <Tab title="Coding agent" icon="robot">
        Paste this prompt into the coding agent to add tracing to the app:

        ```prompt wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
        Install the Orq.ai CLI, run `orq setup`, and add Orq.ai tracing to my app.
        ```

        Or install the CLI directly:

        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        curl -fsSL https://cli.orq.ai/install.sh | sh
        ```

        `orq setup` signs in, creates a project-scoped API key, and connects the coding agents already on the machine to **Orq.ai**, including the **Orq MCP** server and **Orq Skills**.

        <Tip>
          Connecting a coding assistant directly? See [Orq Skills](/ai-studio/integrations/code-assistants/orq-skills) and [Orq MCP](/ai-studio/integrations/code-assistants/orq-mcp).

          Full command list: [CLI reference](/reference/cli).
        </Tip>

        `orq setup` writes the key to `~/.orq/env` as a POSIX shell export. Source it from bash or zsh so the code samples in the next steps can read it:

        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        source ~/.orq/env
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Instrument with OpenTelemetry">
    Install the OpenTelemetry SDK and the OTLP HTTP exporter:

    <CodeGroup>
      ```bash Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
      pip install opentelemetry-sdk opentelemetry-exporter-otlp-proto-http
      ```

      ```bash Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
      npm install @opentelemetry/sdk-node @opentelemetry/exporter-trace-otlp-http
      ```
    </CodeGroup>

    Set the environment variables that point the OpenTelemetry SDK at the **Orq.ai** collector:

    <CodeGroup>
      ```bash macOS / Linux theme={"theme":{"light":"github-light","dark":"github-dark"}}
      export OTEL_EXPORTER_OTLP_ENDPOINT="https://my.orq.ai/v2/otel"
      export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer $ORQ_API_KEY"
      export OTEL_RESOURCE_ATTRIBUTES="service.name=my-agent,service.version=1.0.0"
      ```

      ```powershell Windows theme={"theme":{"light":"github-light","dark":"github-dark"}}
      $env:OTEL_EXPORTER_OTLP_ENDPOINT = "https://my.orq.ai/v2/otel"
      $env:OTEL_EXPORTER_OTLP_HEADERS = "Authorization=Bearer $env:ORQ_API_KEY"
      $env:OTEL_RESOURCE_ATTRIBUTES = "service.name=my-agent,service.version=1.0.0"
      ```
    </CodeGroup>

    Initialize the tracer provider once at application startup. The exporter reads the endpoint, headers, and resource from the environment variables above:

    <CodeGroup>
      ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
      from opentelemetry import trace
      from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
      from opentelemetry.sdk.trace import TracerProvider
      from opentelemetry.sdk.trace.export import BatchSpanProcessor

      provider = TracerProvider()
      provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
      trace.set_tracer_provider(provider)
      ```

      ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
      import { NodeSDK } from '@opentelemetry/sdk-node';
      import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';

      const sdk = new NodeSDK({
        traceExporter: new OTLPTraceExporter(),
      });
      sdk.start();
      ```
    </CodeGroup>

    <Info>
      The exporter accepts both `https://my.orq.ai/v2/otel` and the full path `https://my.orq.ai/v2/otel/v1/traces`. Spans from any OpenTelemetry-instrumented code are exported automatically.

      Self-hosted and on-premise deployments serve `/v2/otel` under their own hostname. See [Base URLs](/reference/base-urls).
    </Info>
  </Step>

  <Step title="Connect a framework">
    Using a framework? Instrument the framework with its own setup instead of manual span creation. Each page in **Integrations** shows the exact installation, environment variables, and instrumentation call:

    <CardGroup cols={2}>
      <Card title="LangGraph" icon="https://mintcdn.com/orqai/E6QxcuOkIZbPb-u-/images/logos/langgraph.svg?fit=max&auto=format&n=E6QxcuOkIZbPb-u-&q=85&s=9c52eaf63d57fd22fb2875b4488e607b" href="/ai-studio/integrations/frameworks/langgraph#observability" width="24" height="24" data-path="images/logos/langgraph.svg">
        One `setup()` call instruments the graph, tools, and every LLM step.
      </Card>

      <Card title="Vercel AI SDK" icon="https://mintcdn.com/orqai/gORBxDuy-IDX4qWx/images/logos/vercel-ai.svg?fit=max&auto=format&n=gORBxDuy-IDX4qWx&q=85&s=9de0a5d831aebeabdb8aec32bf339fa2" href="/ai-studio/integrations/frameworks/vercel-ai#observability" width="256" height="222" data-path="images/logos/vercel-ai.svg">
        Python and TypeScript SDKs with experimental OpenTelemetry telemetry.
      </Card>

      <Card title="Pydantic AI" icon="https://mintcdn.com/orqai/gORBxDuy-IDX4qWx/images/logos/pydantic-ai.svg?fit=max&auto=format&n=gORBxDuy-IDX4qWx&q=85&s=dc6e243246e5e6656100fd7c9b92d1cd" href="/ai-studio/integrations/frameworks/pydantic-ai#observability" width="16" height="16" data-path="images/logos/pydantic-ai.svg">
        Logfire-based instrumentation for agents, tools, and streaming.
      </Card>

      <Card title="OpenAI Agents" icon="https://mintcdn.com/orqai/gORBxDuy-IDX4qWx/images/logos/openai-agents.svg?fit=max&auto=format&n=gORBxDuy-IDX4qWx&q=85&s=80c5bbfc82323c7822f52b0038f1ff83" href="/ai-studio/integrations/frameworks/openai-agents#observability" width="256" height="260" data-path="images/logos/openai-agents.svg">
        Automatic tracing via `OpenAIAgentsInstrumentor`.
      </Card>

      <Card title="Agno" icon="https://mintcdn.com/orqai/E6QxcuOkIZbPb-u-/images/logos/agno.svg?fit=max&auto=format&n=E6QxcuOkIZbPb-u-&q=85&s=0027a342fb30841f340e1cce2bf8d483" href="/ai-studio/integrations/frameworks/agno#observability" width="16" height="16" data-path="images/logos/agno.svg">
        OpenInference instrumentation for agents and tools.
      </Card>

      <Card title="Google ADK" icon="https://mintcdn.com/orqai/E6QxcuOkIZbPb-u-/images/logos/google.svg?fit=max&auto=format&n=E6QxcuOkIZbPb-u-&q=85&s=e97a53044a01ca8a995bc2ef947c0328" href="/ai-studio/integrations/frameworks/google-ai#observability" width="48" height="48" data-path="images/logos/google.svg">
        Trace agent workflows, tool calls, and Gemini model interactions.
      </Card>

      <Card title="Mastra" icon="https://mintcdn.com/orqai/E6QxcuOkIZbPb-u-/images/logos/mastra.svg?fit=max&auto=format&n=E6QxcuOkIZbPb-u-&q=85&s=7192669957a442ca35dd3a08aa09abc8" href="/ai-studio/integrations/frameworks/mastra#observability" width="683" height="683" data-path="images/logos/mastra.svg">
        TypeScript agents and workflows with OpenTelemetry tracing.
      </Card>

      <Card title="Claude Agent SDK" icon="https://mintcdn.com/orqai/E6QxcuOkIZbPb-u-/images/logos/anthropic.svg?fit=max&auto=format&n=E6QxcuOkIZbPb-u-&q=85&s=b443dfd330fdacba898eed9a9d3f82c4" href="/ai-studio/integrations/frameworks/claude-agent-sdk#observability" width="61" height="43" data-path="images/logos/anthropic.svg">
        Hooks-based instrumentation for agent turns and tool use.
      </Card>

      <Card title="See all frameworks" icon="plug" href="/ai-studio/integrations/frameworks/overview">
        Full list of supported frameworks and setup guides.
      </Card>
    </CardGroup>
  </Step>

  <Step title="View traces">
    Run the agent and open [**Traces**](https://my.orq.ai) in the **AI Studio**. Every request appears with model, latency, token counts, and cost. For agentic frameworks, individual tool calls and steps appear as child spans.
  </Step>

  <Step title="Analyze traces with MCP">
    If the [**Orq MCP** server](/ai-studio/integrations/code-assistants/orq-mcp) is not connected yet, install it in the editor or AI assistant, then ask the coding assistant:

    ```prompt wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
    Show me the 10 slowest traces from the last 24 hours and explain what might be causing the latency
    ```

    The assistant queries the **Orq MCP** and returns an analysis like this:

    <Frame caption="Orq MCP trace analysis output">
      <img src="https://mintcdn.com/orqai/bhQw0kXY4gf3CTsS/images/quickstart-traces-agents.png?fit=max&auto=format&n=bhQw0kXY4gf3CTsS&q=85&s=ec432877500481fa0921aa0bd638b25e" alt="Orq MCP trace analysis output showing slowest traces and latency causes" width="1370" height="550" data-path="images/quickstart-traces-agents.png" />
    </Frame>

    <Tip>
      For structured failure analysis, the [**analyze-traces** Orq Skill](/ai-studio/integrations/code-assistants/orq-skills) reads production traces, builds a failure taxonomy, and categorizes issues.
    </Tip>
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Authentication error: 401 Unauthorized">
    1. Confirm the variable is set: `echo $ORQ_API_KEY`
    2. Verify the key is active under **Settings > Organization > API Keys**
    3. Confirm the key is passed in the `Authorization: Bearer` header on the OTLP exporter, not as a query parameter
  </Accordion>

  <Accordion title="Traces not appearing in the Studio">
    1. Confirm the OTLP endpoint is set to `https://my.orq.ai/v2/otel` (or `/v2/otel/v1/traces` for exporters that require the full path)
    2. Check that the workspace in the API key matches the **AI Studio** workspace being viewed
    3. Traces can take a few seconds to appear, wait 10 seconds and refresh
  </Accordion>
</AccordionGroup>

***

<CardGroup cols={2}>
  <Card title="Annotate traces" icon="tags" href="/ai-studio/observability/annotation-queues">
    Label and review spans to build high-quality evaluation datasets from real production traffic.
  </Card>

  <Card title="Set up analytics" icon="chart-line" href="/ai-studio/observability/reporting-api">
    Track cost, latency, error rates, and token usage across models and deployments over time.
  </Card>

  <Card title="Run an experiment" icon="flask" href="/ai-studio/optimize/experiments">
    Use traced data as a baseline to compare prompts, models, and configurations side by side.
  </Card>

  <Card title="Build an agent" icon="rocket" href="/ai-studio/ai-engineering/quickstart">
    Build and deploy a native **Orq.ai** agent with tools, memory, and full **AI Studio** management.
  </Card>
</CardGroup>
