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 1: Create a Langfuse project
- Create a Langfuse account at Langfuse Cloud.
- Create a project.
- Open project settings.
- Copy the public key, secret key, and correct host.
Step 2: Add Langfuse tracing
Use Set Up with 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, andrun_id. - Verify that a trace appears in Langfuse.
.env file:
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
Create a Kindred agent so imported traces have an agent to attach to.- In Kindred, open Register agent.
- In New agent, enter an Agent name.
- Under Trace source, choose Langfuse.
- Click Create.
- Copy Agent ID (use as KINDRED_AGENT_ID in tracer).
- Paste that value into your agent
.envfile asKINDRED_AGENT_ID.
Connect Langfuse
- In Kindred, open Settings, then Langfuse.
- Click Create integration.
- Choose the agent, or leave it as Any agent if traces include
agent_id. - Click Configure.
- Paste the Langfuse public key, secret key, and host.
- Keep Enable scheduled pull sync on.
- Click Save and validate.
- Click Sync now.
.env file. See 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
- Open Behavior Search.
- Select the agent.
- Open the imported session.
- 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: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.