---
title: Langfuse for chat agents
description: Build and improve production chat agents with full-session tracing, quality evaluation, and cost visibility in one platform.
contentWidth: full
---

  <section data-use-case-section="hero" className="grid border-b border-line-structure lg:grid-cols-[1.2fr_0.8fr]">
    
      <p className="font-mono text-[10px] uppercase tracking-[0.09em] text-text-tertiary">Use case / chat agents</p>
      <h1 className="mt-2 text-[38px] leading-[0.95] text-text-primary sm:text-[48px]">
        <span className="block">Ship chat agents</span>
        <span className="block">your users</span>
        <span className="mt-1 inline-block bg-surface-cta-primary px-1.5 whitespace-nowrap">keep talking to</span>
      </h1>
      <p className="mt-4 max-w-[56ch] text-[14px] leading-[1.45] text-text-secondary">Chat-like agents are multi-turn, stateful, and stubbornly hard to debug. Langfuse traces every session end to end. See where a conversation went sideways, what each turn cost, and whether users are satisfied.</p>
      
        <a href="/cloud" className="border border-line-cta bg-text-primary px-3 py-1.5 font-mono text-[11px] uppercase tracking-[0.06em] text-surface-bg transition-opacity hover:opacity-90">Start free</a>
        <a href="/talk-to-us" className="border border-line-structure bg-surface-bg px-3 py-1.5 font-mono text-[11px] uppercase tracking-[0.06em] text-text-secondary transition-colors hover:border-line-cta hover:text-text-primary">Talk to sales</a>
        <a href="/docs/observability/get-started" data-use-case-action="quickstart" className="inline-flex items-center py-1.5 text-[12px] text-text-tertiary underline decoration-line-structure underline-offset-4 transition-colors hover:text-text-primary hover:decoration-text-tertiary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:ml-2">Chat agent quickstart →</a>
      
    

    
      
        
          
            <p className="pt-2 font-mono text-[9px] leading-[1.4] text-text-tertiary">01</p>
            <p className="justify-self-end rounded-[2px] border border-line-structure bg-surface-2 px-2 py-2 text-[11px] leading-[1.45] text-text-primary">Where is my payout for last week?</p>
            <p className="col-start-2 text-right font-mono text-[9px] leading-[1.4] uppercase tracking-[0.08em] text-text-tertiary">User · 0.9s</p>
          

          
            <p className="pt-2 font-mono text-[9px] leading-[1.4] text-text-tertiary">02</p>
            <p className="justify-self-start rounded-[2px] border border-line-structure bg-surface-bg px-2 py-2 text-[11px] leading-[1.45]">Your payout for 12–18 May was $248.10.</p>
            <p className="col-start-2 font-mono text-[9px] leading-[1.4] uppercase tracking-[0.08em] text-text-tertiary">Agent · retrieve_payouts · 0.4s</p>
          

          
            <p className="pt-2 font-mono text-[9px] leading-[1.4] text-text-tertiary">03</p>
            <p className="justify-self-end rounded-[2px] border border-line-structure bg-surface-2 px-2 py-2 text-[11px] leading-[1.45] text-text-primary">That&apos;s not what I asked. Last <em>week</em>.</p>
            <p className="col-start-2 text-right font-mono text-[9px] leading-[1.4] uppercase tracking-[0.08em] text-text-tertiary">Frustration true · flagged</p>
          

          
            <p className="pt-2 font-mono text-[9px] leading-[1.4] text-text-tertiary">04</p>
            <p className="justify-self-start rounded-[2px] border border-line-structure bg-surface-bg px-2 py-2 text-[11px] leading-[1.45]">You&apos;re right — 20–26 May: $412.60, settling tomorrow.</p>
            <p className="col-start-2 font-mono text-[9px] leading-[1.4] uppercase tracking-[0.08em] text-text-tertiary">Agent · retry_payouts_v2 · 2.1s · helpfulness 0.92</p>
          
        

        
          <p className="font-mono text-[9px] leading-[1.4] uppercase tracking-[0.08em] text-text-tertiary">Resolved</p>
          <p className="mt-1 text-[18px] leading-none text-text-primary">yes</p>
        
      
    

  </section>

  <section data-use-case-section="benefits" className="border-t border-line-structure px-5 py-14 sm:px-10 sm:py-20">
    
      <h2 className="text-[34px] leading-[1] text-text-primary sm:text-[46px]">
        Trace the full session, not one call
      </h2>
    

    
### Identify where conversations go sideways

See deep insights into user inputs and agent responses. Dive deep into every step the agent takes in between. Inspect the overall user session as a whole and follow the conversation flow as your users did.

![Chatbot trace with agent steps, tool calls, and a highlighted user disagreement score](/images/chat-agents/conversation-trace.png)

[Session tracing](/docs/observability/features/sessions)

### Track detailed cost of interactions

Context grows with every turn and so does your bill. Break cost and token usage by turn, session, model, and release. Build dashboards and set alerts to stay on top of your spend.

![Chatbot interaction showing the breakdown of input, cached input, output, and total cost](/images/chat-agents/interaction-cost.png)

[Cost tracking](/docs/observability/features/token-and-cost-tracking)

### Measure and improve quality of your chat agent

Run LLM as a judge on production data to detect frustration, follow-ups, or other user signals that are worth investigating. Promote happy paths from production into datasets to measure and improve quality.

![General QA chatbot dataset experiments comparing evaluation scores, latency, and cost](/images/chat-agents/quality-experiments.png)

[Evaluations](/docs/evaluation/overview)

  </section>

  <section data-use-case-section="customer_stories" className="border-t border-line-structure bg-surface-1 px-5 py-14 sm:px-10 sm:py-18">
    <h2 className="mt-2 text-center text-[44px] leading-[1] text-text-primary">
      Teams observing and improving production chat agents on Langfuse
    </h2>
    
### [SumUp](/users/sumup)

> “Building on Langfuse we saved 30% of external BPO cost by deflecting 50% of support conversations to AI.”
>
> — Ana Casado, Head of Operations Data and AI, SumUp

### [Canva](/users/canva)

> “Langfuse hits the sweet spot between engineering requirements and empowerment of non-technical users to contribute their domain expertise.”
>
> — Andreas Schuster, Head of Product, AI Help Experience, Canva

### [Evolve](/users/evolve)

> “Users were telling the coach they'd already shared something days earlier. These patterns, you only find them when you do structured error analysis.”
>
> — Martín Siniawski, CEO, Evolve

  </section>

  <section data-use-case-section="integrations" className="border-t border-line-structure px-5 py-8 sm:px-10 sm:py-10">
    
## Any model, any framework

Based on OpenTelemetry. Two lines in your handler, or point an existing OTel exporter at Langfuse — nothing else in your stack changes.

### Agent frameworks

- [LangChain](/integrations/frameworks/langchain)
- [LangGraph](/integrations/frameworks/langgraph)
- [OpenAI Agents](/integrations/frameworks/openai-agents)
- [Vercel AI SDK](/integrations/frameworks/vercel-ai-sdk)
- [Pydantic AI](/integrations/frameworks/pydantic-ai)
- [CrewAI](/integrations/frameworks/crewai)
- [Mastra](/integrations/frameworks/mastra)

### Model providers

- [OpenAI](/integrations/model-providers/openai-py)
- [Anthropic](/integrations/model-providers/anthropic)
- [Google Gemini](/integrations/model-providers/google-gemini)
- [Amazon Bedrock](/integrations/model-providers/amazon-bedrock)
- [Azure OpenAI](/integrations/model-providers/openai-py)
- [LiteLLM](/integrations/frameworks/litellm-sdk)

### Languages & telemetry

- [Python](/docs/observability/sdk/overview)
- [TypeScript](/docs/observability/sdk/overview)
- [OpenTelemetry](/integrations/native/opentelemetry)
- [REST API](/docs/api-and-data-platform/features/public-api)

  </section>

  <section data-use-case-section="resources" className="border-t border-line-structure px-5 py-14 sm:px-10 sm:py-16">
    <h2 className="mt-2 text-center text-[40px] leading-[1] text-text-primary">
      Learn from real chat-agent examples
    </h2>
    <p className="mx-auto mt-2 max-w-[60ch] text-center text-[13px] text-text-tertiary">See the demo, study the academy walkthrough, and use production monitoring patterns that catch rage-click equivalents in chat sessions.</p>
    
      
- [Explore the live demo project](/docs/demo): Check out how we set up Langfuse to trace and improve a docs chatbot. Inspect the full project setup in a public demo org.
- [Academy: customer support chatbot example](/academy/examples/customer-support-chatbot): Explore a detailed recommendation on how to set up Langfuse for a customer support chat agent.
- [Evaluate multi-turn conversations](/guides/cookbook/example_evaluating_multi_turn_conversations): Turn conversation traces into datasets and evaluate whether changes improve your chatbot's next response.
- [The rage clicks of LLM apps (blog)](/blog/2026-04-01-llm-as-a-judge-production-monitoring): See concrete monitoring patterns to detect repeated re-asks, frustration loops, and quality regressions.

    
  </section>

  <section data-use-case-section="closing_cta" className="border-t border-line-structure bg-surface-1 px-5 py-10 sm:px-10 sm:py-12">
    
      
## Ready to improve your production chat agent?

Use traces, evals, and cost analytics to observe and improve every production chat session with Langfuse.

- [Start free](/cloud)
- [Documentation](/docs)
- [Talk to sales](/talk-to-us)

    
  </section>

<!-- agent-instructions -->

---

## Agent Instructions

This page is part of the [Langfuse](https://langfuse.com) documentation, published as plain Markdown for AI agents. Every page is available as Markdown by appending `.md` to its URL, or by sending an `Accept: text/markdown` header. This page: `https://langfuse.com/chat-agents.md`.

### Querying these docs

If the answer is not on this page, query the documentation instead of guessing:

- **Semantic search** across all Langfuse docs, returning an answer with the relevant pages and excerpts. Ask a specific, self-contained question:

  ```bash
  curl -sG "https://langfuse.com/api/search-docs" --data-urlencode "query=How do I trace a LangGraph agent?"
  ```

- **Index of every page**: <https://langfuse.com/llms.txt>, with per-section indexes [llms-docs.txt](https://langfuse.com/llms-docs.txt), [llms-integrations.txt](https://langfuse.com/llms-integrations.txt), and [llms-self-hosting.txt](https://langfuse.com/llms-self-hosting.txt).

### Before writing Langfuse code

- **Install the [Langfuse Agent Skill](https://langfuse.com/docs/api-and-data-platform/features/agent-skill).** It encodes Langfuse's own best practices for instrumentation, prompt management, and evaluation, and materially improves results.
- **Read [What does a good trace look like?](https://langfuse.com/docs/observability/best-practices.md)** before instrumenting an application.
- **Verify endpoints, parameters, and response fields** against the [API reference](https://api.reference.langfuse.com) instead of inferring them from code examples.
- **Use the [Langfuse CLI](https://langfuse.com/docs/api-and-data-platform/features/cli)** (`npx @langfuse/cli api <resource> <action>`) to read or write traces, prompts, datasets, and scores from the terminal.

Found an error in these docs? Please open an issue at <https://github.com/langfuse/langfuse-docs/issues>.
