Skip to main content
AI InfrastructureMay 12, 20268 min

LLM Observability Is Not Optional — Your Agent Is a Black Box

AI agents make decisions you can't see. Here's how Langfuse, Helicone, Phoenix, and OpenLit give you real visibility into prompts, token spend, latency, and failure modes.

NeuralStackly
Author
Journal

LLM Observability Is Not Optional — Your Agent Is a Black Box

LLM Observability Is Not Optional — Your Agent Is a Black Box

LLM Observability Is Not Optional — Your Agent Is a Black Box

You shipped an AI agent to production. It works. Mostly. Then a user reports that it did something weird — called the wrong API, fabricated a URL, or silently dropped a step in a multi-step workflow.

You open your logs. You see the input prompt and the output text. Nothing in between.

That's the problem. Traditional observability — logs, metrics, traces — was built for deterministic code. You call a function, you get a return value, you log both. But LLM-powered agents are stochastic pipelines. A single user request can trigger 5, 15, or 50 model calls, each depending on the output of the last. Tool calls branch. Context windows shift. Prompts mutate at runtime.

If you can't see what happened between the input and the output, you can't debug it, you can't optimize it, and you can't trust it in production.

What "LLM Observability" Actually Means

LLM observability is not just "log the prompt and response." It's four things:

1. Trace-level visibility — Every LLM call in a request, linked together in a DAG. Which call produced which output. How long each took. What tokens were consumed.

2. Prompt and completion logging — The exact prompt sent, the exact completion received, including system messages, tool schemas, and any dynamic context injected at runtime.

3. Cost and latency tracking — Token counts per model, per agent, per user. P95 latency. Cost attribution by feature.

4. Evaluation and regression detection — Automated checks that flag when outputs drift from expected quality, not just when they error.

If you're building agents with LangGraph, Pydantic AI, or the OpenAI Agents SDK, you already have multi-step pipelines. Each step is a potential failure point. Without observability, you're flying blind.

The Tools That Actually Work

I've spent time evaluating the LLM observability landscape. Here's what's real and what's marketing.

Langfuse — The Open-Source Standard

27,000+ GitHub stars as of May 2026. Langfuse is the most adopted open-source LLM observability platform, and for good reason — it does the core job well.

What it gives you:

  • End-to-end tracing for multi-step agent runs
  • Prompt management with versioning and A/B testing
  • Per-session cost tracking with model-level breakdowns
  • Evaluation pipelines (human-in-the-loop and automated)
  • Self-hostable or cloud-hosted

Where it fits: If you're running LangGraph, CrewAI, or any Python-based agent framework, Langfuse is the default choice. The Python SDK integrates in two lines of code. The UI shows you exactly which step in your agent pipeline failed and why.

Gotcha: The prompt playground is useful but not a replacement for proper eval harnesses. Don't confuse "I can see the prompt" with "I know it's correct."

Helicone — The Drop-In Proxy

5,500+ GitHub stars. Helicone sits between your application and the LLM provider as a proxy. You change your API base URL. Everything else is automatic.

What it gives you:

  • Zero-code integration (just swap the base URL)
  • Request logging with full prompt/completion visibility
  • Caching layer that reduces redundant API calls
  • Rate limiting and cost alerts
  • Custom properties for filtering and grouping

Where it fits: Teams that want observability without touching application code. If you have 12 microservices calling OpenAI and can't add SDK calls to each one, Helicone's proxy approach is pragmatic.

Gotcha: Because it's a proxy, it sees the API call but not your application logic. You won't get the same DAG-level tracing that Langfuse provides for multi-step agents. It's request-level observability, not pipeline-level.

Phoenix (Arize AI) — Evaluation-First

9,600+ GitHub stars. Phoenix is built by Arize, who've been doing ML observability since before LLMs were the thing. Their angle is evaluation and drift detection.

What it gives you:

  • Tracing with automatic span annotation
  • Embedding visualization (see what your RAG retriever actually returns)
  • LLM-based evaluation — use a model to score other model outputs
  • Dataset curation for building eval sets
  • Works with OpenTelemetry, so it integrates with existing observability stacks

Where it fits: Teams that already have observability infrastructure (Datadog, Grafana, Jaeger) and want to add LLM-specific evaluation without replacing their stack. The OpenTelemetry integration is real and well-documented.

Gotcha: The evaluation-first approach means the setup is heavier than Langfuse or Helicone. You need to define what "good" looks like before you can detect "bad." That's the right long-term approach, but it's more upfront investment.

OpenLit — OpenTelemetry-Native

2,400+ GitHub stars. OpenLit is the newest entry, and its differentiator is being OpenTelemetry-native from day one.

What it gives you:

  • Auto-instrumentation for 40+ LLM providers and frameworks
  • OpenTelemetry traces and metrics with no manual instrumentation
  • Token cost tracking per trace
  • Guardrails integration (content filtering, PII detection)
  • Self-hostable with minimal infrastructure requirements

Where it fits: Teams already invested in OpenTelemetry who want LLM traces to flow through their existing pipeline. If you're already running OTel collectors and Grafana dashboards, OpenLit is the path of least resistance.

Gotcha: Smaller community than Langfuse. The UI is functional but less polished. You're betting on an early-stage project's trajectory.

LangSmith — If You're Already in the LangChain Ecosystem

883 GitHub stars for the SDK (LangSmith itself is a hosted product). LangSmith is LangChain's observability product, and if you're already using LangChain or LangGraph heavily, it's the most integrated option.

What it gives you:

  • Native tracing for LangGraph, LangChain, and LangServe
  • Prompt versioning with dataset-based evaluation
  • Annotation queues for human review of agent outputs
  • Playground for testing prompt changes before deploying

Where it fits: Teams that have bet on the LangChain ecosystem and want one-vendor support. The LangGraph tracing is genuinely excellent — you can see every node, every edge, every state transition.

Gotcha: It's a closed, hosted product. You can't self-host. The free tier is limited. If your agent pipeline uses non-LangChain components (and it probably does), you'll have observability gaps.

What You Actually Need vs. What's Nice-to-Have

After working with these tools, here's my honest take on what matters:

Must-have (week one):

  • Trace-level logging for every LLM call
  • Token count and cost per request
  • Latency percentiles (p50, p95, p99)
  • Search/filter by session, user, or error state

Should-have (month one):

  • Multi-step trace linking (DAG visualization)
  • Prompt versioning and comparison
  • Automated anomaly detection (latency spikes, cost spikes)

Nice-to-have (quarter one):

  • Evaluation pipelines with automated scoring
  • Embedding visualization for RAG retrieval analysis
  • Guardrails integration for content/PII filtering

Don't let vendors convince you that you need all of this on day one. Start with tracing and cost tracking. Everything else builds on that foundation.

The Integration Tax Nobody Talks About

Every observability tool adds latency. Every trace payload adds bytes. Every SDK call is a potential failure point.

In practice:

  • Proxy-based tools (Helicone) add 5-20ms per request. Negligible for most use cases, but test it.
  • SDK-based tools (Langfuse, Phoenix) add near-zero latency for the actual LLM call — the trace is written asynchronously. But if the trace backend is down, you need a fallback.
  • OpenTelemetry-based tools (Phoenix, OpenLit) add the OTel overhead, which is well-optimized but not zero. Budget 1-3% CPU overhead per service.

The real cost isn't latency — it's the engineering time to integrate, maintain, and actually use the data. A beautifully instrumented agent that nobody monitors is worse than no instrumentation at all, because it gives you false confidence.

How to Start (Practical)

Step 1: Pick one tool. Langfuse if you're Python-first and want the most community support. Helicone if you want zero-code. Phoenix if you're already on OpenTelemetry. Don't overthink this — you can switch later. The instrumentation patterns are similar across all of them.

Step 2: Instrument your highest-traffic agent first. Not the experimental one. The one your users actually hit. You'll learn the most from the agent that has the most real traffic.

Step 3: Add cost alerts on day one. Set a threshold at 2x your current daily spend. If an agent starts hallucinating in a loop and burning tokens, you'll know within hours, not when the invoice arrives.

Step 4: Build an eval set from real traces. After a week of production data, export 50 traces that represent your common use cases. These become your regression test set. When you change a prompt, run it against this set. If accuracy drops, you catch it before users do.

Step 5: Add latency alerts. If your agent's p95 latency jumps from 3 seconds to 15 seconds, something changed — a model version update, a context window bloat, a downstream API degradation. LLM latency is a leading indicator of quality problems.

Why This Matters More Than You Think

The HN front page regularly features stories about AI agents doing unexpected things in production. That's not a model problem — it's an observability problem. You can't fix what you can't see.

The teams that ship reliable agents in 2026 are the ones that invested in observability early. Not because they love dashboards, but because they know that debugging a stochastic pipeline without traces is guessing, not engineering.

If you're building agents, compare your observability options on our AI agent observability tools page. For agent framework comparisons, check our benchmarks and side-by-side comparisons.

For dev-stack testing and eval tooling beyond observability, see AI testing and QA tools. And if you're running agents in production, AI DevOps tools covers deployment, monitoring, and incident response.

Share this article

N

About NeuralStackly

Expert researcher and writer at NeuralStackly, dedicated to finding the best AI tools to boost productivity and business growth.

View all posts

Related Articles

Continue reading with these related posts