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

# Quickstart with Langfuse

> Connect Langfuse traces to Kindred and open your first imported session.

## Overview

Langfuse captures agent traces. Kindred imports those traces so you can use **Behavior Search**, **Clustering**, **Expectations**, and **Replay** on real production behavior.

This guide gets traces into Langfuse, connects Langfuse to Kindred, syncs them, and opens the first imported session.

If your agent already uses Langfuse, skip to [Step 2](#step-2-add-langfuse-tracing).

## Step 1: Create a Langfuse project

1. Create a Langfuse account at [Langfuse Cloud](https://langfuse.com/cloud).
2. Create a project.
3. Open project settings.
4. Copy the public key, secret key, and correct host.

Kindred supports these Langfuse Cloud hosts:

| Region | Host                               |
| ------ | ---------------------------------- |
| US     | `https://us.cloud.langfuse.com`    |
| EU     | `https://cloud.langfuse.com`       |
| JP     | `https://jp.cloud.langfuse.com`    |
| HIPAA  | `https://hipaa.cloud.langfuse.com` |

## Step 2: Add Langfuse tracing

Use [Set Up with a Coding Agent](/get-started/use-a-coding-agent) if you want Cursor, Claude Code, Codex, or another coding agent to make the integration patch.

The coding agent should:

* Install the official Langfuse SDK or framework integration.
* Configure the Langfuse credentials.
* Trace the full agent workflow.
* Preserve Kindred metadata such as `agent_id`, `session_id`, and `run_id`.
* Verify that a trace appears in Langfuse.

Your agent should have these values in its `.env` file:

```bash theme={null}
LANGFUSE_PUBLIC_KEY=pk-lf-...
LANGFUSE_SECRET_KEY=sk-lf-...
LANGFUSE_HOST=https://us.cloud.langfuse.com
KINDRED_AGENT_ID=agt_...
```

## Step 3: Verify the trace in Langfuse

Run one real agent request, then open the trace in Langfuse.

Confirm the trace includes:

* Input
* LLM and agent operations
* Tool calls and results
* Final output

## Step 4: Connect Langfuse to Kindred

### Register a Kindred agent - [app.usekindred.dev](https://app.usekindred.dev)

Create a Kindred agent so imported traces have an agent to attach to.

1. In Kindred, open **Register agent**.
2. In **New agent**, enter an **Agent name**.
3. Under **Trace source**, choose **Langfuse**.
4. Click **Create**.
5. Copy **Agent ID (use as KINDRED\_AGENT\_ID in tracer)**.
6. Paste that value into your agent `.env` file as `KINDRED_AGENT_ID`.

### Connect Langfuse

1. In Kindred, open **Settings**, then **Langfuse**.
2. Click **Create integration**.
3. Choose the agent, or leave it as **Any agent** if traces include `agent_id`.
4. Click **Configure**.
5. Paste the Langfuse public key, secret key, and host.
6. Keep **Enable scheduled pull sync** on.
7. Click **Save and validate**.
8. Click **Sync now**.

Use the same Langfuse values in your agent `.env` file. See [Environment Variables](/reference/environment-variables) for the exact names to set.

Kindred validates the host and API keys when you save. If validation cannot find a trace, run one traced agent turn in Langfuse, then save again.

Confirm the trace appears in **Behavior Search**.

## Step 5: Open the trace in Kindred

1. Open **Behavior Search**.
2. Select the agent.
3. Open the imported session.
4. Inspect its turns and steps.

## Step 6: Add a replay URL

Replay requires an endpoint Kindred can call to rerun the selected agent turn.

If your agent is deployed, use its replay endpoint, for example:

```text theme={null}
https://your-agent.example.com/replay
```

If your agent only runs locally, expose it with a tunnel and paste the public tunnel URL into Kindred.

```bash theme={null}
ngrok http 5000
```

Then use the public HTTPS URL as **Target URL (replay\_url)**. You can use any public HTTPS endpoint, such as a deployed service, ngrok, Cloudflare Tunnel, or similar.

Use [Configure Replay URL](/replay/configure-replay-url) if your agent does not have a replay endpoint yet. That page includes a coding-agent prompt that can add one for you. You can also use Prompt 2 in [Set Up with a Coding Agent](/get-started/use-a-coding-agent).

## Step 7: Run replay

In Kindred, open **Behavior Search**, click the trace or turn you want to replay, click **Replay turn**, paste the replay URL from Step 6, and click **Run**.

Kindred will call your replay URL, find the replay trace in Langfuse, and show the first important difference it finds.

## Core terms

* **Session:** a conversation or workflow.
* **Turn:** one logical agent invocation.
* **Step:** an LLM call, tool call, tool result, or operation.
