Skip to Content
MigrationsMigrate from Langfuse to Curate-Me

Migrate from Langfuse

Langfuse and Curate-Me solve different problems. Langfuse is observability-first: tracing, evals, prompt management. Curate-Me is governance-first: cost caps, PII scanning, HITL approvals, managed runners.

Langfuse was acquired by ClickHouse in January 2026; the roadmap is now tightly coupled to ClickHouse’s analytics direction. This guide covers two scenarios:

  1. Replace Langfuse with Curate-Me — if you need governance and observability is secondary
  2. Add Curate-Me alongside Langfuse — keep Langfuse tracing; add CM governance at the gateway layer

Estimated migration time: 20–40 minutes for replacement; 15 minutes for the “add alongside” path.

Scenario A: Replace Langfuse with Curate-Me

Langfuse uses SDK instrumentation (not a proxy) for tracing. Removing it means removing the SDK callbacks. Curate-Me uses a proxy — your existing SDK needs only a base URL change.

Environment variable mapping (replacement path)

Langfuse env varCurate-Me equivalentNotes
LANGFUSE_PUBLIC_KEYNot needed
LANGFUSE_SECRET_KEYNot needed
LANGFUSE_HOSTNot needed
OPENAI_API_KEY (direct)Store in CM Secrets; set OPENAI_API_KEY=cm_sk_...Provider key moves server-side
CM_API_KEY (cm_sk_...)New: gateway key
OPENAI_BASE_URL=https://api.curate-me.ai/v1/openaiNew: proxy URL

Before / after code diff (replacement)

-from langfuse.openai import openai # Langfuse-wrapped OpenAI -from langfuse import Langfuse - -langfuse = Langfuse( - public_key=os.environ["LANGFUSE_PUBLIC_KEY"], - secret_key=os.environ["LANGFUSE_SECRET_KEY"], - host=os.environ.get("LANGFUSE_HOST", "https://cloud.langfuse.com"), -) - -response = openai.chat.completions.create( - model="gpt-4o", - messages=[{"role": "user", "content": "Hello"}], - # Langfuse trace metadata - name="my-generation", - user_id="user-123", -) +from openai import OpenAI + +client = OpenAI( + base_url="https://api.curate-me.ai/v1/openai", + api_key="cm_sk_your_gateway_key", +) +response = client.chat.completions.create( + model="gpt-4o", + messages=[{"role": "user", "content": "Hello"}], + # Optional: per-request metadata + extra_headers={"X-CM-User-Id": "user-123"}, +) print(response.choices[0].message.content)

Scenario B: Run Curate-Me alongside Langfuse

Keep your Langfuse SDK tracing for evaluations and prompt experiments. Add Curate-Me at the gateway layer for cost caps, PII scanning, and HITL. The two layers are complementary — Langfuse sees the same requests at the SDK level; CM intercepts them at the network level.

# Curate-Me governs at the network level (base URL) # Langfuse instruments at the SDK level (wrapper) from langfuse.openai import openai as lf_openai from openai import OpenAI # Configure the OpenAI client to route through CM import openai as _openai_module _openai_module.base_url = "https://api.curate-me.ai/v1/openai" _openai_module.api_key = "cm_sk_your_gateway_key" # Langfuse wraps the now-CM-routed client response = lf_openai.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Hello"}], name="governed-generation", )

In this setup Langfuse traces the CM-governed request. You get Langfuse’s eval + prompt management plus CM’s cost caps and PII scanning. Latency overhead: ~3–5ms for the CM governance chain.

Step-by-step migration (replacement path)

Create a Curate-Me account and get your gateway key

Sign up at dashboard.curate-me.ai/signup . Go to Settings → API Keys → New Key.

Store your provider secrets

curl -X POST https://api.curate-me.ai/v1/admin/secrets \ -H "X-CM-API-Key: cm_sk_your_gateway_key" \ -H "Content-Type: application/json" \ -d '{"provider": "openai", "secret": "sk-your-openai-key"}'

Export your Langfuse data before migrating (optional)

Langfuse → Settings → Data Export to download your traces, evals, and prompt versions as JSON. This is archive-only — CM does not import Langfuse traces.

Set a daily budget

curl -X POST https://api.curate-me.ai/v1/admin/budgets \ -H "X-CM-API-Key: cm_sk_your_gateway_key" \ -H "Content-Type: application/json" \ -d '{"daily_limit_usd": 25.0, "scope": "org"}'

Update environment variables

# Remove Langfuse vars unset LANGFUSE_PUBLIC_KEY unset LANGFUSE_SECRET_KEY unset LANGFUSE_HOST # Add Curate-Me vars export CM_API_KEY=cm_sk_your_gateway_key export OPENAI_BASE_URL=https://api.curate-me.ai/v1/openai export OPENAI_API_KEY=cm_sk_your_gateway_key

Remove Langfuse SDK instrumentation

Remove langfuse.openai wrappers; switch back to the standard openai import. Your tracing moves to the CM Traces dashboard automatically.

Verify

curl https://api.curate-me.ai/v1/openai/chat/completions \ -H "X-CM-API-Key: $CM_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-4o","messages":[{"role":"user","content":"Migration test"}]}'

Langfuse feature equivalents

Langfuse featureCurate-Me equivalent
Distributed tracing (generations/spans)Traces dashboard (per-request, not nested spans yet)
Evaluations (LLM-as-judge)Not available
Prompt management + versioningNot available
A/B prompt experimentsNot available
DatasetsNot available
Cost trackingPer-request, per-key, per-org (more granular budget control)
User session trackingX-CM-User-Id header (grouping in roadmap)
Rate limitingIETF-standard per-key/org rate limits
PII redaction33-pattern PII scanning + optional Presidio NER
Content safetyPrompt injection + jailbreak detection
HITL approvalsBuilt-in gate for high-cost requests
Managed agent runnersOpenClaw runners with lifecycle management

Rollback

export LANGFUSE_PUBLIC_KEY=your-public-key export LANGFUSE_SECRET_KEY=your-secret-key export LANGFUSE_HOST=https://cloud.langfuse.com # Restore langfuse.openai wrappers in code unset CM_API_KEY export OPENAI_API_KEY=sk-your-real-openai-key unset OPENAI_BASE_URL