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

# Get started with AI Observability

> Start monitoring your AI applications with zero-code instrumentation or SDKs

<Check>
  OpenLIT automatically instruments LLMs, VectorDBs, MCP, and frameworks by default.
</Check>

Get real-time cost tracking, token usage monitoring, and latency optimization for your AI applications.

## Select where your AI application is running

<Tabs>
  <Tab title="Kubernetes" icon="dharmachakra">
    <Steps>
      <Step title="Deploy OpenLIT with the Controller" titleSize="h3">
        Deploy OpenLIT and the Controller together using the [Helm chart](https://github.com/openlit/helm/tree/main/charts/openlit). The Controller automatically discovers your services and lets you enable LLM observability from the dashboard — no code changes needed.

        ```shell theme={null}
        helm repo add openlit https://openlit.github.io/helm/
        helm repo update
        helm install openlit openlit/openlit --set openlit-controller.enabled=true
        ```

        The Controller's DaemonSet, RBAC, and configuration are all handled by the chart.
        The dashboard URL and OTLP endpoint are auto-derived from the Helm release name.

        <Tip title="Secure with an API Key">
          If you've created an API key in **Settings → API Keys**, pass it to the Controller so it authenticates with the dashboard:

          ```shell theme={null}
          helm install openlit openlit/openlit \
            --set openlit-controller.enabled=true \
            --set openlit-controller.apiKey="YOUR_OPENLIT_API_KEY"
          ```

          You can also set the `OPENLIT_API_KEY` environment variable. See [Controller configuration](/latest/controller/configuration) for details.
        </Tip>

        For detailed configuration options, see the [Installation guide](/latest/openlit/installation) and [Controller configuration](/latest/controller/configuration).
      </Step>

      <Step title="Enable observability from the Agents page">
        1. Open the OpenLIT dashboard and navigate to **Agents**
        2. Your services making LLM API calls will appear automatically
        3. Click **Enable** next to any service to start collecting traces and metrics

        <Tip>
          The Controller uses eBPF for zero-code LLM observability and can also inject the OpenLIT Python SDK for agent framework traces — no code changes, image rebuilds, or redeployments required. For deeper application-level tracing, you can also use the [OpenLIT SDKs](/latest/sdk/overview).
        </Tip>
      </Step>
    </Steps>
  </Tab>

  <Tab title="Docker" icon="docker" iconType="brands">
    <Steps>
      <Step title="Deploy OpenLIT with Docker Compose" titleSize="h3">
        ```shell theme={null}
        git clone git@github.com:openlit/openlit.git
        ```

        From the root directory of the [OpenLIT Repo](https://github.com/openlit/openlit), add the Controller service to your `docker-compose.yml`:

        ```yaml theme={null}
        openlit-controller:
          image: ghcr.io/openlit/controller:latest
          privileged: true
          pid: "host"
          volumes:
            - /proc:/host/proc:ro
            - /sys/kernel/debug:/sys/kernel/debug:ro
            - /sys/fs/bpf:/sys/fs/bpf:rw
            - /var/run/docker.sock:/var/run/docker.sock
          environment:
            OPENLIT_URL: "http://openlit:3000"
            OPENLIT_PROC_ROOT: "/host/proc"
            OTEL_EXPORTER_OTLP_ENDPOINT: "http://openlit:4318"
            # OPENLIT_API_KEY: "your-api-key"  # Recommended: see tip below
          depends_on:
            - openlit
        ```

        Then start everything:

        ```shell theme={null}
        docker compose up -d
        ```

        <Tip title="Secure with an API Key">
          If you've created an API key in **Settings → API Keys**, add it to the Controller's environment to authenticate requests:

          ```yaml theme={null}
          environment:
            OPENLIT_API_KEY: "your-openlit-api-key"
          ```

          See [Controller configuration](/latest/controller/configuration) for all available options.
        </Tip>
      </Step>

      <Step title="Enable observability from the Agents page">
        1. Open the OpenLIT dashboard at `http://127.0.0.1:3000`
        2. Navigate to **Agents**
        3. Your containers making LLM API calls will appear automatically
        4. Click **Enable** next to any service to start collecting traces and metrics

        <Tip>
          The Controller uses eBPF for zero-code LLM observability and can also inject the OpenLIT Python SDK for agent framework traces — no code changes or image rebuilds required. For deeper application-level tracing, you can also use the [OpenLIT SDKs](/latest/sdk/overview).
        </Tip>
      </Step>
    </Steps>
  </Tab>

  <Tab title="Linux" icon="linux" iconType="brands">
    <Steps>
      <Step title="Deploy OpenLIT" titleSize="h3">
        ```shell theme={null}
        git clone git@github.com:openlit/openlit.git
        ```

        From the root directory of the [OpenLIT Repo](https://github.com/openlit/openlit):

        ```shell theme={null}
        docker compose up -d
        ```
      </Step>

      <Step title="Install the OpenLIT Controller" titleSize="h3">
        <Tabs>
          <Tab title="x86_64 (amd64)">
            ```bash theme={null}
            curl -fsSL https://github.com/openlit/openlit/releases/latest/download/openlit-controller-linux-amd64 \
              -o /usr/local/bin/openlit-controller
            chmod +x /usr/local/bin/openlit-controller
            ```
          </Tab>

          <Tab title="ARM64 (aarch64)">
            ```bash theme={null}
            curl -fsSL https://github.com/openlit/openlit/releases/latest/download/openlit-controller-linux-arm64 \
              -o /usr/local/bin/openlit-controller
            chmod +x /usr/local/bin/openlit-controller
            ```
          </Tab>
        </Tabs>

        Verify the installation:

        ```bash theme={null}
        openlit-controller --version
        ```

        Create a systemd service with the configuration passed as environment variables:

        ```ini /etc/systemd/system/openlit-controller.service theme={null}
        [Unit]
        Description=OpenLIT Controller
        After=network.target

        [Service]
        Environment="OPENLIT_URL=http://your-openlit-host:3000"
        Environment="OTEL_EXPORTER_OTLP_ENDPOINT=http://your-openlit-host:4318"
        Environment="OPENLIT_POLL_INTERVAL=60s"
        Environment="OPENLIT_ENVIRONMENT=production"
        # Environment="OPENLIT_API_KEY=your-api-key"  # Recommended: see tip below
        ExecStart=/usr/local/bin/openlit-controller
        Restart=always
        RestartSec=5

        [Install]
        WantedBy=multi-user.target
        ```

        ```bash theme={null}
        systemctl daemon-reload
        systemctl enable --now openlit-controller
        ```

        <Tip title="Secure with an API Key">
          If you've created an API key in **Settings → API Keys**, add it to the systemd service to authenticate Controller requests:

          ```ini theme={null}
          Environment="OPENLIT_API_KEY=your-openlit-api-key"
          ```

          Then reload: `systemctl daemon-reload && systemctl restart openlit-controller`
        </Tip>
      </Step>

      <Step title="Enable observability from the Agents page">
        1. Open the OpenLIT dashboard and navigate to **Agents**
        2. Your processes making LLM API calls will appear automatically
        3. Click **Enable** next to any service to start collecting traces and metrics

        <Tip>
          The Controller uses eBPF for zero-code LLM observability and can also inject the OpenLIT Python SDK for agent framework traces — no code changes required. For deeper application-level tracing, you can also use the [OpenLIT SDKs](/latest/sdk/overview).
        </Tip>
      </Step>
    </Steps>
  </Tab>

  <Tab title="Local Development" icon="laptop-code">
    <Steps>
      <Step title="Deploy OpenLIT" titleSize="h3">
        ```shell theme={null}
        git clone git@github.com:openlit/openlit.git
        ```

        From the root directory of the [OpenLIT Repo](https://github.com/openlit/openlit):

        ```shell theme={null}
        docker compose up -d
        ```
      </Step>

      <Step title="Install the OpenLIT SDK">
        <Tabs>
          <Tab title="Python">
            ```shell theme={null}
            pip install openlit
            ```
          </Tab>

          <Tab title="Typescript">
            ```shell theme={null}
            npm install openlit
            ```
          </Tab>
        </Tabs>
      </Step>

      <Step title="Instrument your AI application">
        <Tabs>
          <Tab title="Python">
            <Tip>
              Not sure which method to choose? Check out [Instrumentation Methods](/latest/sdk/instrumentation-methods) to understand the differences.
            </Tip>

            <Tabs>
              <Tab title="Zero-code instrumentation">
                ```bash theme={null}
                openlit-instrument \
                  --service-name my-ai-app \
                  --environment development \
                  --otlp-endpoint http://127.0.0.1:4318 \
                  python your_app.py
                ```
              </Tab>

              <Tab title="Manual instrumentation">
                ```python theme={null}
                import openlit

                openlit.init(otlp_endpoint="http://127.0.0.1:4318")
                ```

                Examples:

                <CodeGroup>
                  ```python OpenAI theme={null}
                  from openai import OpenAI
                  import openlit

                  openlit.init(otlp_endpoint="http://127.0.0.1:4318")

                  client = OpenAI(api_key="YOUR_OPENAI_KEY")

                  chat_completion = client.chat.completions.create(
                      messages=[
                          {
                              "role": "user",
                              "content": "What is LLM Observability?",
                          }
                      ],
                      model="gpt-4o-mini",
                  )
                  ```

                  ```python Anthropic theme={null}
                  import os
                  from anthropic import Anthropic
                  import openlit

                  openlit.init(otlp_endpoint="http://127.0.0.1:4318")

                  client = Anthropic(api_key=os.environ.get("ANTHROPIC_API_KEY"))

                  message = client.messages.create(
                      max_tokens=1024,
                      messages=[
                          {
                              "role": "user",
                              "content": "Hello, What is LLM Observability?",
                          }
                      ],
                      model="claude-sonnet-4-20250514",
                  )
                  ```

                  ```python LangChain theme={null}
                  from langchain_core.messages import HumanMessage, SystemMessage
                  import openlit

                  openlit.init(otlp_endpoint="http://127.0.0.1:4318")

                  from langchain_openai import ChatOpenAI

                  model = ChatOpenAI(model="gpt-4o-mini")

                  messages = [
                      SystemMessage(content="Translate the following from English into Italian"),
                      HumanMessage(content="hi!"),
                  ]

                  model.invoke(messages)
                  ```
                </CodeGroup>
              </Tab>
            </Tabs>
          </Tab>

          <Tab title="Typescript">
            ```typescript theme={null}
            import Openlit from "openlit"

            Openlit.init({ otlpEndpoint: "http://127.0.0.1:4318" })
            ```

            Example with OpenAI:

            ```typescript theme={null}
            import Openlit from "openlit"

            Openlit.init({ otlpEndpoint: "http://127.0.0.1:4318" })

            async function main() {
                const OpenAI = await import("openai").then((e) => e.default);
                const openai = new OpenAI({ apiKey: YOUR_OPENAI_KEY });
                const completion = await openai.chat.completions.create({
                    model: "gpt-4o-mini",
                    messages: [{ role: "system", content: "Who are you?" }],
                });
                console.log(completion?.choices?.[0]);
            }

            main();
            ```
          </Tab>
        </Tabs>

        Refer to OpenLIT [Python SDK repository](https://github.com/openlit/openlit/tree/main/sdk/python) or [Typescript SDK repository](https://github.com/openlit/openlit/tree/main/sdk/typescript) for more advanced configurations and use cases.
      </Step>
    </Steps>
  </Tab>
</Tabs>

## Monitor and optimize your AI applications

With real-time LLM observability data now flowing to OpenLIT, visualize comprehensive AI performance metrics including token costs, latency patterns, hallucination rates, and model accuracy to optimize your production AI applications.

Head over to OpenLIT at `127.0.0.1:3000` on your browser to start exploring. You can login using the default credentials:

* **Email**: `user@openlit.io`
* **Password**: `openlituser`

<Frame>
  <img src="https://github.com/openlit/.github/blob/main/profile/assets/openlit-client-1.png?raw=true" />

  <img src="https://github.com/openlit/.github/blob/main/profile/assets/openlit-client-2.png?raw=true" />
</Frame>

If you have any questions or need support, reach out to our [community](https://join.slack.com/t/openlit/shared_invite/zt-2etnfttwg-TjP_7BZXfYg84oAukY8QRQ).

***

<CardGroup cols={3}>
  <Card title="Quickstart: LLM Evaluations" href="/latest/sdk/quickstart-programmatic-evals" icon="bolt">
    Get started with evaluating your LLM responses in 2 simple steps
  </Card>

  <Card title="Integrations" href="/latest/sdk/integrations/overview" icon="circle-nodes">
    60+ AI integrations with automatic instrumentation and performance tracking
  </Card>

  <Card title="Destinations" href="/latest/sdk/destinations/overview" icon="link">
    Send telemetry to Datadog, Grafana, New Relic, and other observability stacks
  </Card>
</CardGroup>
