---
title: Langflow x Langfuse
date: 2023/09/21
description: "Build in no-code in Langflow, observe and analyze in Langfuse"
tag: integration
ogImage: /images/blog/langflow-langfuse/og.png
author: Max
---

Langflow provides a user interface that allows you to define LLM features and get started quickly. It offers a beautiful drag-and-drop UI that enables you to define complex chains of tools and LLM calls. This eliminates the need for coding everything from scratch and allows you to experiment and prototype effortlessly. With Langflow, you have the flexibility to choose different LLM Providers and a broad range of tools to enrich prompts.
In addition to its user-friendly interface, Langflow also offers a community-provided set of pre-built LLM features. These features have produced good results for others, making it a great source of inspiration for your own projects.

  ![Langflow UI](/images/blog/langflow-langfuse/langflow.jpg)

Once you have set up your LLM feature chain using Langflow, it's time to test it in production. This is where Langfuse comes into play. Langfuse records all the steps of the LLM feature, allowing you to look into the details of how it behaved. It also provides analytics based on latency, API cost, and quality. Quality is measured by user feedback and model-based evaluations.

  ![Trace Detail](/images/blog/langflow-langfuse/trace-detail.jpg)

Setting up both Langflow and Langfuse is easy. You can choose to self-host them or use the hosted version of Langfuse. The integration between the two tools is simple: just add the Langfuse environment variables when starting Langflow.

```bash
export LANGFLOW_LANGFUSE_SECRET_KEY=<your secret key>
export LANGFLOW_LANGFUSE_PUBLIC_KEY=<your public key>
```

Read the [integration docs](https://langfuse.com/docs/langflow) for more details on how to set up the integration. If you are looking for a general intro to Langfuse, we recorded a [2 min demo](https://langfuse.com/docs/video) showing the core tracing and analytics features.

If you want to learn more about Langflow and Langfuse, you can join their Discords for further discussions and support ([Langfuse](https://langfuse.com/discord), [Langflow](https://discord.com/invite/EqksyE2EX9)). Additionally, as both projects are open source check out the open issues to collaborate with the community ([Langfuse](https://github.com/langfuse/langfuse), [Langflow](https://github.com/logspace-ai/langflow/issues)) or leave a ⭐️.

I love how Langflow makes it easy to build complex LLM applications and am super excited about this new integration (there will be more coming over the next weeks).

<!-- 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/blog/langflow.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>.
