> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Langfuse

> Query Langfuse traces and observations and create scores for LLM observability and evals

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: Basic auth.
* **Connection**: HTTP Basic auth with `LANGFUSE_PUBLIC_KEY` as the username and `LANGFUSE_SECRET_KEY` as the password.
* **Docs**: [https://langfuse.com/docs/api-and-data-platform/features/public-api](https://langfuse.com/docs/api-and-data-platform/features/public-api)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable              | Required | Description                                                                                                                                         |
| --------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `LANGFUSE_PUBLIC_KEY` | Yes      | Langfuse project public key (starts with pk-lf-), used as the HTTP Basic username [Docs](https://langfuse.com/faq/all/where-are-langfuse-api-keys). |
| `LANGFUSE_SECRET_KEY` | Yes      | Langfuse project secret key (starts with sk-lf-), used as the HTTP Basic password [Docs](https://langfuse.com/faq/all/where-are-langfuse-api-keys). |

## Setup

1. **Create a Langfuse account**: Sign up at [https://cloud.langfuse.com](https://cloud.langfuse.com) (EU) or [https://us.cloud.langfuse.com](https://us.cloud.langfuse.com) (US) - the free Hobby plan is enough for testing. Self-hosting is also supported.
2. **Create project API keys**: In your Langfuse project, open Settings → API Keys and create a key pair. You get a public key (pk-lf-...) and a secret key (sk-lf-...).
3. **Store the keys**: Add LANGFUSE\_PUBLIC\_KEY=pk-lf-.... and LANGFUSE\_SECRET\_KEY=sk-lf-.... to your .env file. The API uses HTTP Basic auth with the public key as username and secret key as password.
4. **Verify access**: Run the List Traces tool. If your project is in the US region, pass host us.cloud.langfuse.com; EU projects use the default cloud.langfuse.com.

* API keys are project-scoped - create separate keys per project/environment
* All tools take a 'host' parameter (default cloud.langfuse.com for EU); US cloud is us.cloud.langfuse.com and self-hosted deployments use their own domain

Provider API reference: [https://api.reference.langfuse.com](https://api.reference.langfuse.com)

## Tools

| Tool              | Access | Description                                                          |
| ----------------- | ------ | -------------------------------------------------------------------- |
| List Traces       | Read   | List traces in the Langfuse project with optional filters            |
| Get Trace         | Read   | Get a single trace with its full observation tree and scores         |
| List Observations | Read   | List observations (spans, generations, events) with optional filters |
| Create Score      | Write  | Attach a score (evaluation result) to a trace or observation         |

## Example prompts

* List my most recent Langfuse traces and summarize latency, errors, and usage patterns.
* Look up a Langfuse trace I specify and attach an accuracy score with a short comment.
