# Trace and evaluate Cursor agents with Langfuse, powered by ClickHouse

DevFeed: [Trace and evaluate Cursor agents with Langfuse, powered by ClickHouse](<https://devfeed.tech/articles/trace-and-evaluate-cursor-agents-with-langfuse-powered-by-clickhouse-93147.md>)

Original publisher: [Read original article](<https://clickhouse.com/blog/cursor-agents-with-langfuse>)

Author: Hande Kafkas; Aditya Chidurala

Published: 2026-10-21T20:05:44.410000Z

Content type: tutorial

Language: en

Sources: [ClickHouse Blog](<https://devfeed.tech/sources/clickhouse-blog.md>)

Topics: [agent observability](<https://devfeed.tech/topics/agent-observability.md>), [cursor](<https://devfeed.tech/topics/cursor.md>), [AI-assisted coding](<https://devfeed.tech/topics/ai-assisted-coding.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [3](<https://devfeed.tech/tags/3.md>), [account](<https://devfeed.tech/tags/account.md>), [agent](<https://devfeed.tech/tags/agent.md>), [agent-observability](<https://devfeed.tech/tags/agent-observability.md>), [agents](<https://devfeed.tech/tags/agents.md>), [aggregate](<https://devfeed.tech/tags/aggregate.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-application](<https://devfeed.tech/tags/ai-application.md>), [analytics](<https://devfeed.tech/tags/analytics.md>), [clickhouse](<https://devfeed.tech/tags/clickhouse.md>), [connect](<https://devfeed.tech/tags/connect.md>), [cursor](<https://devfeed.tech/tags/cursor.md>), [evaluations](<https://devfeed.tech/tags/evaluations.md>), [helps](<https://devfeed.tech/tags/helps.md>), [langfuse](<https://devfeed.tech/tags/langfuse.md>), [model](<https://devfeed.tech/tags/model.md>), [tool](<https://devfeed.tech/tags/tool.md>), [trace](<https://devfeed.tech/tags/trace.md>), [with](<https://devfeed.tech/tags/with.md>)

## AI overview

Langfuse's open-source Cursor Observability plugin records each prompt as a trace, including assistant messages, tool activity, token usage, and metadata. ClickHouse powers Langfuse analytics; in v4, a wide observations table retains trace context for usage, cost, and latency queries. To set up the integration, create a Langfuse project, install the plugin, add its API keys and regional or self-hosted base URL to `~/.cursor/langfuse.json`, then restart Cursor. File-read contents are off by default and require enabling both `captureFileContent` and `captureToolOutput`. Cursor reports token usage once per turn, recorded on the final LLM observation, so use the trace total for cost. Teams can inspect costly turns, address repeated file reads or failed command retries with project rules, then evaluate real-session prompts for completion, cost, and latency before rollout. Langfuse also supports dataset experiments, CI score thresholds, and sampled online evaluation.

## Source excerpt

Connect Cursor to Langfuse to trace every agent turn, pinpoint expensive model and tool calls, and use evaluations to confirm a fix actually helps, with ClickHouse powering the analytics underneath.