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

# Helicone to Netra

> Migrate from Helicone to Netra for AI observability. A step-by-step guide covering prompt templates, variables, versioning, and tracing integration.

Helicone has [moved into maintenance mode](https://www.helicone.ai/blog/joining-mintlify) after its acquisition by Mintlify. This page walks through how to transition both **prompt management** and **observability** from Helicone to Netra.

{/* ###  Update Application Code

Replace Helicone’s prompt integration with Netra’s fetch + compile flow.

**If you used Helicone's gateway approach** (`prompt_id` + `inputs` in the API call):

```python
# Before (Helicone gateway)
response = client.chat.completions.create(
model="gpt-4o-mini",
prompt_id="customer_support",
inputs={"customer_name": "Alice", "issue_type": "billing"}
)

# After (Netra)
from Netra import Netra

Netra = Netra()
prompt = Netra.get_prompt("customer_support", label="production", type="chat")
compiled_messages = prompt.compile(customer_name="Alice", issue_type="billing")

response = client.chat.completions.create(
model=prompt.config.get("model", "gpt-4o-mini"),
messages=compiled_messages
)
```

**If you used Helicone's SDK approach** (`@helicone/helpers` / `HeliconePromptManager`):

```python
# Before (Helicone SDK)
# body = prompt_manager.get_prompt_body(prompt_id="customer_support", inputs={...})
# response = client.chat.completions.create(**body)

# After (Netra) — same pattern, different SDK
from Netra import Netra

Netra = Netra()
prompt = Netra.get_prompt("customer_support", label="production", type="chat")
compiled_messages = prompt.compile(customer_name="Alice", issue_type="billing")

response = client.chat.completions.create(
model=prompt.config.get("model", "gpt-4o-mini"),
messages=compiled_messages
)
```

See the [prompt management get-started guide](/docs/prompt-management/get-started) for full Python and TypeScript examples. */}

## Migrating Tracing / Observability

Helicone captures LLM traffic at the gateway. Netra adds **hierarchical traces** with nested spans, so you can follow complete multi-step agent workflows, not just individual model calls.

### Option A: Use the Netra SDK (Recommended)

Netra ships official SDKs for [Python](https://docs.getnetra.ai/sdk-reference/sdk/python) and [TypeScript](https://docs.getnetra.ai/sdk-reference/sdk/typescript) to instrument application code directly, plus native [integrations across 50+ frameworks and model providers](https://docs.getnetra.ai/Integrations/overview) including OpenAI, LangChain, LlamaIndex, Anthropic, and more. See the full [integrations overview](https://docs.getnetra.ai/Integrations/overview) to pick the integration that matches your stack.

If you’re using OpenAI, the simplest migration is to keep your existing OpenAI SDK calls. Since Helicone is OpenAI-compatible, you can even keep Helicone as a gateway during the transition:

<CodeGroup>
  ```python Python theme={null}
  from netra import Netra

  # Initialize before importing other libraries for best results
  Netra.init(app_name="my-ai-app", environment="production")
  ```

  ```typescript TypeScript theme={null}
  import { Netra } from "netra-sdk";

  // Initialize before importing other libraries for best results
  await Netra.init({
    appName: "my-ai-app",
    environment: "production",
  });
  ```
</CodeGroup>

Then keep the rest of your OpenAI code the same:

<CodeGroup>
  ```python Python theme={null}
  # Your existing code works unchanged
  from openai import OpenAI

  client = OpenAI(
      base_url="<your_helicone_url>",  # Keep helicone's url during transition
      api_key="<your_api_key>"
  )
  response = client.chat.completions.create(
      model="gpt-4",
      messages=[{"role": "user", "content": "Hello!"}],
  )
  ```

  ```typescript TypeScript theme={null}
  // Your existing code works unchanged
  import OpenAI from "openai";

  const client = new OpenAI({
    baseURL: "<your_helicone_url>", // Keep helicone's url during transition
    apiKey: "<your_api_key>",
  });

  const response = await client.chat.completions.create({
    model: "gpt-4",
    messages: [{ role: "user", content: "Hello!" }],
  });
  ```
</CodeGroup>

Beyond gateway logging, Netra also supports application-level tracing via decorators in [Python](https://docs.getnetra.ai/sdk-reference/sdk/python#decorators) and equivalent patterns in [TypeScript](https://docs.getnetra.ai/sdk-reference/sdk/typescript#decorators). This creates hierarchical traces with nested spans for multi-step workflows (tool calls, retrieval, post-processing, and more), giving you full execution context that a gateway alone can’t provide.

### Option B: Use OpenTelemetry

If you already have OpenTelemetry in place, you don’t need to re-instrument. Point your OTLP exporter at Netra and keep your existing spans and context propagation. Configure your exporter using Netra's OTLP endpoint:

```bash theme={null}
export OTEL_EXPORTER_OTLP_ENDPOINT="https://api.eu.getnetra.ai/telemetry"
export OTEL_EXPORTER_OTLP_HEADERS="x-api-key=<your_netra_api_key>"
```

### Option C: Replace the Gateway with LiteLLM Proxy

If you relied on Helicone primarily as an AI gateway (provider routing, fallbacks, or operational controls), you can replace it with [LiteLLM Proxy](https://docs.litellm.ai/docs/simple_proxy) and continue sending traces to Netra:

<CodeGroup>
  ```python Python theme={null}
  from netra import Netra

  # Initialize before importing other libraries for best results
  Netra.init(app_name="my-ai-app", environment="production")
  ```

  ```typescript TypeScript theme={null}
  import { Netra } from "netra-sdk";

  // Initialize before importing other libraries for best results
  await Netra.init({
    appName: "my-ai-app",
    environment: "production",
  });
  ```
</CodeGroup>

Then keep your OpenAI client code the same—just point it at your LiteLLM proxy:

<CodeGroup>
  ```python Python theme={null}
  # Your existing code works unchanged
  from openai import OpenAI

  client = OpenAI(
      base_url="<your_litellm_url>",  # Add your litellm url
      api_key="<your_api_key>"
  )
  response = client.chat.completions.create(
      model="gpt-4",
      messages=[{"role": "user", "content": "Hello!"}],
  )
  ```

  ```typescript TypeScript theme={null}
  // Your existing code works unchanged
  import OpenAI from "openai";

  const client = new OpenAI({
    baseURL: "<your_litellm_url>", // Add your litellm url
    apiKey: "<your_api_key>",
  });

  const response = await client.chat.completions.create({
    model: "gpt-4",
    messages: [{ role: "user", content: "Hello!" }],
  });
  ```
</CodeGroup>

This preserves the gateway pattern while routing your tracing data into Netra.

## What's next?

Once your tracing is set up, you're ready to explore the rest of Netra. Pick what matters most to your team:

<CardGroup cols={2}>
  <Card icon="flask" href="/Simulation/Simulation-overview" title="Run Simulations">
    Test your agents with realistic, multi-turn conversations using configurable personas and goals.
  </Card>

  <Card icon="clipboard-check" href="/Evaluation/Evaluation-overview" title="Run Evaluations">
    Measure quality, accuracy, and reliability with LLM-as-Judge and code evaluators.
  </Card>

  <Card icon="chart-line" href="/Dashboard/Custom-dashboard" title="Set Up Custom Dashboards">
    Build your own views to track traces, costs, and agent behavior across projects.
  </Card>

  <Card icon="bell" href="/quick-start/QuickStart_Alerts" title="Configure Alerts">
    Get notified about anomalies, cost spikes, and performance issues.
  </Card>
</CardGroup>

***
