Langfuse vs LangSmith: Pricing, Self-Hosting, OpenTelemetry and an X-Data Agent Traced in Both

- Billing unit is the main split. Langfuse counts every trace, observation and score as a unit ($8 per 100k after 100k); LangSmith counts one trace per run (0.005 LSU = $0.005 each after the included 5k or 10k) plus $39 per seat on Plus.
- Self-hosting: Langfuse's core (tracing, evals, prompt management, datasets, playground, annotation queues) is MIT and free to self-host; LangSmith self-hosted and hybrid are Enterprise-only.
- Retention: Langfuse data access is 30 days (Hobby), 90 days (Core), 3 years (Pro); LangSmith base traces live 14 days, extended traces 180 days.
- OpenTelemetry: both ingest OTLP over HTTP. Langfuse at
/api/public/otelwith Basic auth; LangSmith atapi.smith.langchain.com/otelwithx-api-key. - What X says: of 419 posts naming both tools, 18% are tool roundups, 9 state a choice (8 for Langfuse), and evals is the most named theme (43%).
- X data bill for the example agent: pulling 200,000 posts a month costs $30 at $0.15 per 1,000 tweets on TwitterAPI.io vs $1,000 at $0.005 per post read on the official X pay-per-usage rate card.
Langfuse and LangSmith solve the same problem: once an LLM app has more than one step, you need to see every model call, tool call, latency and token count in one tree, score the outputs, and replay failures as test cases. Both do that well. Most comparisons stop at a feature checklist, which is why the head-to-head question keeps coming back on X.
This page answers it with what changes the decision in practice: the billing unit each vendor charges for, read from their own pricing pages this session; the license and self-hosting terms; how each accepts OpenTelemetry; and a worked cost model for one concrete workload, an agent that pulls posts from X through TwitterAPI.io, summarizes them and scores the result. The same agent is shown instrumented for both tools, so you can see that the code barely differs and the bill does.
We also measured how the comparison plays out on X itself: 419 posts that name both tools, collected in 2026, plus the latest posts from the two official accounts, @langfuse and @LangChain (the old @LangChainAI handle now returns "user not found").
9 of 419 (2.1%)
Langfuse vs LangSmith at a glance: pricing, hosting, OTel, evals
Every row below comes from the vendor's own pricing page, docs or repository, read this session. Where a vendor does not publish a number, the table says so instead of guessing.
Read the units before the prices. A LangSmith trace is a whole run, so a 3-step agent costs one trace. A Langfuse unit is every data point, so the same run is roughly 5 units (the trace, three observations and one score). That is why "$8 per 100k" and "$0.005 per trace" cannot be compared directly, and why the worked example below does the conversion.
Ownership note. The Langfuse repository's LICENSE file now carries a "Copyright (c) 2023-2026 ClickHouse, Inc." line, and the self-hosted pricing page says Langfuse's enterprise pricing is "additive to your ClickHouse commercial plan". The MIT terms for everything outside the ee/ directories are unchanged.
Evals, prompts and datasets: the feature lists overlap almost completely. The difference is where each feature lives and what it costs.
Langfuse. The self-hosted pricing page lists observability, evaluation, prompt management, datasets, the playground, prompt experiments, LLM-as-judge evaluators and human annotation queues as part of the MIT open-source core. What sits behind the enterprise license is administrative: project-level RBAC, data retention management, audit logs, server-side data masking, SCIM and instance management APIs. Prompts are versioned and can be released by label, which lets a deploy pull "production" instead of a hard-coded version.
LangSmith. The pricing page lists tracing, monitoring, insights, online and offline evals, dataset collection, an annotation queue, Prompt Hub and Playground and bulk data export on every plan. Tuned Evaluators are metered at 0.015 LSU per run. LangSmith also sells adjacent products on the same bill (Deployment for long-running agents, Sandboxes, Fleet and Engine), which matters if you want one vendor for build, trace and deploy.
For an X-data agent specifically, the useful evals are inexpensive: did the fetch return posts, does the summary mention the top posts by engagement, does it stay under a length limit, and does it avoid quoting private accounts. All four run as code-based scores in either tool; only the judge-style "is this summary faithful" check needs an LLM evaluator.
Pricing in detail: units vs traces vs seats
Langfuse cloud plans. Hobby is free with no credit card, 50k units a month and no overage billing, so it simply stops at the limit. Core is $29 a month, Pro $199 a month and Enterprise $2,499 a month; each includes 100k units and then bills graduated overage: $8 per 100k from 100k to 1M units, $7 per 100k from 1M to 10M, $6.50 per 100k from 10M to 50M and $6 per 100k above 50M. Pro adds 3 years of data access, data retention management, SOC2 and ISO27001 reports and a HIPAA BAA; a Teams add-on for Pro costs $300 a month for enterprise SSO and fine-grained RBAC.
LangSmith plans. Developer is $0 per seat per month with one seat and up to 5k base traces, then pay as you go. Plus is $39 per seat per month with up to 10k base traces, unlimited seats at $39 each, and one free small serverless deployment. Enterprise is custom. The pricing page's tooltip prices extra traces at 0.005 LSU per base trace and 0.0025 LSU per extended-trace upgrade, and the page defines 1 LSU as $1. So 1,000 extra base traces cost $5, and 1,000 traces kept for 180 days cost $7.50.
Seats matter on LangSmith only. Langfuse Core and above have unlimited users; LangSmith Plus charges every user. A 5-person team on Plus pays $195 a month before any overage; the same team on Langfuse Core pays $29.
What is billed but not obvious. On LangSmith, automation rules (for example sampling 10% of traces for review, or keeping every errored trace) upgrade the whole trace to extended retention, which adds the 0.0025 LSU fee. Tuned Evaluators bill 0.015 LSU per evaluation run. On Langfuse, each score you attach is its own unit, so an eval that writes three scores per run triples that part of the bill.
Discounts. Langfuse lists 50% off the first year for early-stage startups, up to 100% off for research and students, $199 a month in credits for non-profits and $300 a month for open-source projects. LangSmith lists up to $10,000 in credits for VC-backed startups.
A worked cost model: one X-data agent in both tools
Take a small production agent: every run fetches recent posts about a topic from X, asks a model to summarize them, and records one quality score. Instrumented with decorators, one run produces one root observation, two child observations (fetch and summarize) and one score. In LangSmith that is 1 trace. In Langfuse it is about 5 units (1 trace + 3 observations + 1 score). Each run pulls one 20-post page from X.
How the LangSmith column is computed. Developer: (runs minus 5,000) x $0.005. Plus with one seat: $39 + (runs minus 10,000) x $0.005. Base retention (14 days) only; keeping traces 180 days adds $2.50 per 1,000.
How the X data columns are computed. Each run returns 20 posts. TwitterAPI.io bills 15 credits per tweet returned, which is $0.15 per 1,000 tweets ($0.003 for a full 20-tweet page). The official X API pay-per-usage rate card (docs.x.com) charges $0.005 per post read, $5 per 1,000, about 33x more per 1,000 posts. The official plan is also capped at 3M post reads a month before Enterprise.
The takeaway for this workload. Below about 10,000 runs a month both observability tools are free or close to it, and the X data line is the larger cost. Past that, the per-trace price on LangSmith grows linearly, while Langfuse's unit price stays low even though it counts more units per run. If your agent produces many observations per run (long tool chains, retrieval steps), redo the Langfuse math with your real observation count: a 40-step run is about 42 units.
Tracing the X-data agent in Langfuse (and the LangSmith version)
Langfuse's Python SDK (v5 on PyPI this session, 5.2.0) wraps OpenTelemetry. The @observe decorator turns each function into an observation, and as_type="generation" marks the LLM step so tokens and cost show up in the generation view. The full runnable script is in the code block at the end of this page; the key parts:
Fetch step. fetch_posts calls /twitter/tweet/advanced_search with queryType=Latest, reads the top-level tweets[] list and follows has_next_page / next_cursor. Each tweet carries text, likeCount, viewCount and an author object. The decorator records the query as input and the trimmed list as output, so a bad summary can be traced back to the exact posts the model saw.
Score step. langfuse.create_score attaches a numeric score to the current trace. In production you would replace the toy non_empty check with an LLM-as-judge evaluator configured in the Langfuse UI, which runs in the MIT core on self-hosted instances too.
Flush. Short-lived scripts must call langfuse.flush() before exit, or the background exporter may drop the last batch. Long-running servers do not need it.
Self-hosted. Point LANGFUSE_BASE_URL at your own instance. The SDK v5 docs say it needs Langfuse server v4 (v4.59.0 or newer if self-hosted); the latest GitHub release this session is v4.76.0.
The LangSmith version is in the code block below. @traceable from the langsmith package does the same job; run_type="llm" marks the model step. Set LANGSMITH_TRACING=true and LANGSMITH_API_KEY and every call of run() becomes one trace in the project named by LANGSMITH_PROJECT. Inside LangChain or LangGraph you need no decorators at all: the environment variables alone turn tracing on, which is the integration advantage people cite for LangSmith.
# pip install requests langsmith
# env: TWITTERAPI_IO_KEY, LANGSMITH_TRACING=true, LANGSMITH_API_KEY, LANGSMITH_PROJECT=x-digest
import os
import requests
from langsmith import traceable
BASE = "https://api.twitterapi.io"
HEADERS = {"X-API-Key": os.environ["TWITTERAPI_IO_KEY"]}
@traceable(run_type="tool", name="fetch_posts")
def fetch_posts(query: str, max_pages: int = 2) -> list[dict]:
tweets, cursor = [], ""
for _ in range(max_pages):
r = requests.get(
f"{BASE}/twitter/tweet/advanced_search",
headers=HEADERS,
params={"query": query, "queryType": "Latest", "cursor": cursor},
timeout=30,
)
r.raise_for_status()
body = r.json()
tweets += body.get("tweets", [])
if not body.get("has_next_page"):
break
cursor = body.get("next_cursor", "")
return [{"text": t["text"], "likes": t.get("likeCount", 0)} for t in tweets]
@traceable(run_type="llm", name="summarize")
def summarize(posts: list[dict]) -> str:
top = sorted(posts, key=lambda p: p["likes"], reverse=True)[:5]
return "\n".join(f"- {p['likes']} likes: {p['text'][:120]}" for p in top)
@traceable(run_type="chain", name="x_digest_agent")
def run(query: str) -> str:
return summarize(fetch_posts(query)) # the whole tree is ONE trace
if __name__ == "__main__":
print(run('(langfuse OR langsmith) -filter:retweets lang:en'))
OpenTelemetry: both accept it, with different endpoints and auth
If your stack already emits OpenTelemetry spans (the Vercel AI SDK, many agent frameworks, or your own instrumentation), you can send them to either tool without their SDKs. This is also the cleanest way to run both side by side during an evaluation.
One caveat on Langfuse's side: its docs state plainly that gRPC is not supported yet, so configure the HTTP exporter. LangSmith's docs recommend langsmith SDK 0.4.25 or later for non-LangChain OTel export, and 0.14.9 or later for agent-based workspaces that use the Langsmith-Agent-Id header.
# Same OpenTelemetry spans, two backends. Only the base endpoint and the auth header change.
# pip install opentelemetry-sdk opentelemetry-exporter-otlp-proto-http
import base64, os
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
BACKEND = os.environ.get("TRACE_BACKEND", "langfuse") # or "langsmith"
if BACKEND == "langfuse":
# EU cloud; US is https://us.cloud.langfuse.com/api/public/otel
os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = "https://cloud.langfuse.com/api/public/otel"
auth = base64.b64encode(f"{os.environ['LANGFUSE_PUBLIC_KEY']}:{os.environ['LANGFUSE_SECRET_KEY']}".encode()).decode()
headers = {"Authorization": f"Basic {auth}"}
else:
os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = "https://api.smith.langchain.com/otel"
headers = {"x-api-key": os.environ["LANGSMITH_API_KEY"], "Langsmith-Project": "x-digest"}
# the HTTP exporter appends the traces path to OTEL_EXPORTER_OTLP_ENDPOINT itself
provider = TracerProvider()
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter(headers=headers)))
trace.set_tracer_provider(provider)
tracer = trace.get_tracer("x-digest")
with tracer.start_as_current_span("x_digest_agent") as span:
span.set_attribute("x.query", "(langfuse OR langsmith) -filter:retweets")
# call fetch_posts() and summarize() here; nested spans become child observations / runs
What X says: 419 posts that name both tools
We pulled every recent post X search returned for "langfuse langsmith" (reposts excluded) and kept the 419 whose text names both products. They come from 310 distinct authors; 248 are from 2026, 97 from 2025 and 71 from 2024. English leads (302 posts), then Japanese (70) and Chinese (26).
Almost nobody declares a winner. Only 9 posts (2.1%) state a choice by our keyword rules. 8 of them lean Langfuse and one names both as picks; none states a switch to LangSmith. Of the Langfuse picks, 4 cite self-hosting or open source, 2 cite price and 2 cite evals. With a sample this small, read it as "the people who write about switching tend to be leaving for Langfuse", not as market share.
The tools are mostly named together, not against each other. 18% of the posts are roundups that also name three or more other tools (Braintrust, Arize Phoenix, DeepEval and so on), and those roundups get the most reach: a median of 1,397 views vs 624 for the whole set. 40 posts (9.5%) share their opening 120 characters with another post in the sample, mostly copy-pasted "AI stack map" graphics.
Evals are what people talk about. 181 posts (43%) mention evals, 107 (26%) mention price or cost, 106 (25%) mention self-hosting or open source and 49 (12%) mention OpenTelemetry. LangChain ecosystem fit, the classic argument for LangSmith, appears in only 12.
Questions outnumber answers. 13 posts ask which one to use, more than the 9 that answer it.

How the two official accounts post
We also read the latest timeline of each company account: 60 posts from @langfuse covering 74 days and 180 from @LangChain covering 29 days (LangSmith has no separate company account we could find; the older @LangChainAI handle returns "user not found").
Different jobs. @LangChain posts about 7.5x as often and covers the whole LangChain family (LangGraph, Deep Agents, LangSmith); only 13% of its posts name LangSmith. @langfuse posts less than once a day and stays on topic: 37% of its posts mention evals. Neither account named the other product in the sample.
Engagement per post is closer than follower counts suggest. @LangChain has about 41x the followers but only 1.5x the median likes per original post. For a team deciding which community to lean on, LangChain's reach is broader; Langfuse's audience is narrower and engaged.

Decision guide: which one to pick
Pick Langfuse if you need to self-host (data residency, a regulated customer, an air-gapped environment), you expect more than about 10,000 runs a month, your team has more than two or three people who need access, or you want to stay framework-neutral. Budget for running Postgres, ClickHouse, Redis and object storage if you self-host, or use the cloud plans.
Pick LangSmith if your agents are built on LangChain or LangGraph and you want tracing switched on by environment variables, you plan to deploy agents on LangSmith Deployment anyway, or you are a solo developer under 5,000 traces a month and want the shortest setup. Watch the per-seat line as the team grows and the extended-retention upgrades that automation rules trigger.
Run both for a week if you cannot decide. Emit OpenTelemetry spans once, switch TRACE_BACKEND in the OTel snippet above to send the same runs to each tool, then compare the trace views your team actually uses on real runs.
Wiring X data into either one. If the agent needs live X posts, profiles or followers, call the REST endpoints directly as in the code here, or connect the hosted MCP server at https://mcp.twitterapi.io/mcp with an Authorization: Bearer header so a model can call X tools itself; each tool call then shows up as a span in whichever tracer you picked. Reads need no X account. New accounts that pass the automatic bot check get up to $1 of free credits (at most 100,000 credits, no card, one per person or network, expiring after 31 days), which covers about 6,600 tweets of testing at $0.15 per 1,000 tweets.
One rate-limit note for agent builders: TwitterAPI.io allows 0.2 requests per second before the first payment and 20 once paid, so a scheduled agent that polls every minute fits easily, and a polling check that finds nothing costs the $0.00015 minimum (every 60 seconds for a month is $6.48).
How we collected this
Question. When people on X compare Langfuse and LangSmith, which one do they say they chose and why, and how do the two official accounts post?
Data. One X advanced search for posts containing both "langfuse" and "langsmith" (Latest, reposts excluded), 500 posts returned, 419 naming both in the text; plus the latest timelines of @langfuse (60 posts) and @LangChain (180 posts), and profile lookups for both accounts. Collected in 2026 through the TwitterAPI.io read endpoints /twitter/tweet/advanced_search, /twitter/user/last_tweets and /twitter/user/info.
Cost. 43 requests returned 740 tweets and 3 profiles, about $0.11 at 15 credits per tweet and 18 per profile. The same reads on the official X API pay-per-usage rate card ($0.005 per post read, $0.010 per user read) would cost about $3.73.
Method. Choices and themes are classified with transparent keyword rules (English, Japanese and Chinese phrasings such as "switched to", "we use", "self-host", "派"), published in analyze.py in our studies folder. Rules undercount implicit choices, cannot read sarcasm and treat a reply in a longer thread on its own.
What the sample cannot show. X search returns a recency-weighted subset, not every post ever written; posts that name only one tool are excluded by design; the official-account windows differ in length because the accounts post at different rates. None of this measures usage or market share.
Privacy. Aggregates only. The two organization accounts are named; authors of the comparison posts are private individuals and are not named, quoted or linked. Raw search pages were not stored; de-identified rows (year, language, category, engagement) are kept for reproducibility.
# pip install requests langfuse
# env: TWITTERAPI_IO_KEY, LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, LANGFUSE_BASE_URL (https://cloud.langfuse.com or your self-hosted URL)
import os
from collections import Counter
import requests
from langfuse import get_client, observe
BASE = "https://api.twitterapi.io"
HEADERS = {"X-API-Key": os.environ["TWITTERAPI_IO_KEY"]}
langfuse = get_client()
@observe(name="fetch_posts")
def fetch_posts(query: str, max_pages: int = 2) -> list[dict]:
"""Pull recent posts for a query. Billed per tweet returned ($0.15 per 1,000)."""
tweets, cursor = [], ""
for _ in range(max_pages):
r = requests.get(
f"{BASE}/twitter/tweet/advanced_search",
headers=HEADERS,
params={"query": query, "queryType": "Latest", "cursor": cursor},
timeout=30,
)
r.raise_for_status()
body = r.json()
tweets += body.get("tweets", [])
if not body.get("has_next_page"):
break
cursor = body.get("next_cursor", "")
return [
{
"text": t["text"],
"likes": t.get("likeCount", 0),
"views": t.get("viewCount", 0),
"author": t["author"]["userName"],
}
for t in tweets
]
@observe(name="summarize", as_type="generation")
def summarize(posts: list[dict]) -> str:
"""Swap the body for your LLM call; the decorator records input and output either way."""
top = sorted(posts, key=lambda p: p["likes"], reverse=True)[:5]
words = Counter(w.lower() for p in posts for w in p["text"].split() if len(w) > 5)
lines = [f"{len(posts)} posts. Frequent terms: " + ", ".join(w for w, _ in words.most_common(8))]
lines += [f"- {p['likes']} likes: {p['text'][:120]}" for p in top]
return "\n".join(lines)
@observe(name="x_digest_agent")
def run(query: str) -> str:
posts = fetch_posts(query)
summary = summarize(posts)
# one score per run = one more billable unit in Langfuse
langfuse.create_score(
name="non_empty",
value=1.0 if posts else 0.0,
trace_id=langfuse.get_current_trace_id(),
)
return summary
if __name__ == "__main__":
print(run('(langfuse OR langsmith) -filter:retweets lang:en'))
langfuse.flush() # short-lived script: send buffered spans before exit
Researching this?Free starter credits cover end-to-end testing — Google sign-in, no card. Get a key.
Questions readers ask
Is Langfuse a free alternative to LangSmith?
Langfuse's core is MIT-licensed and free to self-host, including tracing, evals, prompt management, datasets and annotation queues. Its cloud Hobby plan is also free with 50k units a month and 30 days of data access. LangSmith's Developer plan is free for one seat and up to 5k base traces a month, but self-hosting LangSmith requires the Enterprise plan.
Can I use Langfuse with LangChain and LangGraph?
Yes. Langfuse has a LangChain callback integration and also accepts OpenTelemetry spans, so LangChain and LangGraph apps can be traced without LangSmith. LangSmith's advantage is that tracing turns on with environment variables alone (LANGSMITH_TRACING=true).
How is a Langfuse unit different from a LangSmith trace?
A Langfuse unit is any tracing data point: a trace, an observation (span, event, generation) or a score. A LangSmith trace is one full execution of your app regardless of how many steps it has. A 3-step agent with one score is about 5 Langfuse units but 1 LangSmith trace.
How much does LangSmith cost per trace?
The LangSmith pricing page prices extra base traces at 0.005 LSU each and the extended-retention upgrade at 0.0025 LSU, with 1 LSU = $1. That is $5 per 1,000 base traces and $7.50 per 1,000 traces kept for 180 days, after the 5k (Developer) or 10k (Plus) included each month.
How long do Langfuse and LangSmith keep traces?
Langfuse shows 30 days of data on Hobby, 90 days on Core and 3 years on Pro and Enterprise; older data stays stored and becomes visible again on upgrade. LangSmith keeps base traces 14 days and extended traces 180 days.
Do Langfuse and LangSmith support OpenTelemetry?
Both do. Langfuse's SDK is built on OpenTelemetry and its OTLP endpoint is /api/public/otel (HTTP JSON or protobuf, no gRPC) with Basic auth. LangSmith accepts OTLP at https://api.smith.langchain.com/otel with an x-api-key header.
Which one do developers on X say they chose?
Very few say. Of 419 posts we collected in 2026 that name both tools, 9 state a choice by our keyword rules, and 8 of those lean Langfuse, most often citing self-hosting or open source. Most posts are roundups or mentions without a verdict.
How do I feed X (Twitter) data into an agent I trace with either tool?
Call /twitter/tweet/advanced_search or /twitter/user/last_tweets on https://api.twitterapi.io with an X-API-Key header inside a decorated function, or connect the hosted MCP server at https://mcp.twitterapi.io/mcp. Reads cost $0.15 per 1,000 tweets vs $0.005 per post read on the official X pay-per-usage rate card.
Continue
- Langfuse pricing: Hobby, Core, Pro, Enterprise, units and graduated overage
- Langfuse self-hosted pricing: MIT open-source features vs enterprise features
- LangSmith pricing: seats, base traces, LSU rates, retention, hosting options
- LangSmith docs: tracing with OpenTelemetry (endpoint, headers, SDK versions)
- Langfuse docs: OpenTelemetry endpoint, Basic auth, HTTP-only transport
- X developer docs: pay-per-usage pricing
- X (Twitter) API overview: endpoints, pricing and access
- LangChain vs LangGraph: when to use each
- LangChain + Twitter (X) API: loaders, agent tools and MCP
- OpenAI Agents SDK with the Twitter (X) API
- Twitter (X) MCP server for AI agents
- How to build an AI agent on X data, step by step
- TwitterAPI.io pricing and plans
- TwitterAPI.io endpoint reference
- 01Devin Pricing in 2026: Plans, Quotas, ACUs and What X Users Actually Pay
- 02Lovable Alternatives in 2026: Bolt.new, v0, Base44, Replit, Emergent and Cursor Compared
- 03Kiro vs Cursor in 2026: Plans, Spec-Driven vs Agent-First, and X (Twitter) Data via MCP
- 04n8n vs Zapier vs Make in 2026: Pricing, Self-Hosting, AI Agents and the Same Twitter (X) Flow Built in All Three
- 05Replit pricing in 2026: plans, credits, effort-based Agent costs, and what an app that reads Twitter (X) data really costs
- 06OpenClaw Browser Relay: How the Chrome Extension Drives Your Signed-In Browser (and When to Use an API for Twitter (X) Data Instead)
- 07Claude Code Pricing in 2026: Plans, Usage Limits and the Real Cost of an Always-On Agent
- 08Grok Bot Alternatives: Open-Source and Hosted Agents for Twitter (X)
Writing about something you built with TwitterAPI.io? Our community rewards program pays API credits for honest tutorials, build logs and videos.
Stop reading. Start building.
Starter credits cover real testing on real data. Google sign-in, no card, no application queue.
Get an API keyAlready building with TwitterAPI.io? Publish an honest tutorial or build log about it and earn up to $200 a month in API credits.