
linyp/dsh-plugin-langfuse
40Last commit Aug 15, 2026
dsh-plugin-langfuse DSH plugin
This plugin integrates Langfuse observability into DeepSeek Harness (dsh). It exports each turn as an OpenTelemetry trace, groups turns by session, records feedback as Langfuse Scores, and preserves fork/subagent lineage. It implements the harness's public telemetry seam as an alternative backend to the official OTLP-logs exporter.
How to install the dsh-plugin-langfuse DSH plugin
dsh plugin --profile web add dsh-plugin-langfuseCopying does not run this command. Review the repository and version before installing the dsh-plugin-langfuse DSH plugin.
dsh-plugin-langfuse DSH plugin data source
dsh-plugin-langfuse DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-plugin-langfuse DSH plugin can do
- Exports each turn as an OpenTelemetry trace, with model step generations and tool call spans.
- Groups turns by session (langfuse.session.id) and preserves fork/subagent lineage.
- Records canonical user feedback as Langfuse TEXT Scores (session-level) when feedbackScores is enabled.
- Supports FEEDBACK_ONLY mode: only exports the session log when the user records feedback, ensuring consent.
Where the dsh-plugin-langfuse DSH plugin fits
- Monitor AI agent sessions in Langfuse for debugging and performance analysis.
- Correlate dsh traces with host application traces using the correlation config (userId/sessionId).
- Enable feedback-driven observability: only export traces after user provides feedback, reducing data transfer.
Who the dsh-plugin-langfuse DSH plugin is for
- Developers building AI agents with DeepSeek Harness who need detailed observability.
- Platform teams embedding dsh into larger systems and requiring unified tracing in Langfuse.
dsh-plugin-langfuse DSH plugin limitations
- Requires Langfuse project keys (LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY); keys are region-scoped and must match the LANGFUSE_HOST region.
- Configuration errors (missing URL, invalid auth, unknown mode, etc.) cause plugin load to fail with no runtime fallback.
- Environment variables are read at boot; an already-running instance must be restarted after installation.
dsh-plugin-langfuse DSH plugin: from the repository README
Quoted from the linyp/dsh-plugin-langfuse README, the upstream source of the dsh-plugin-langfuse DSH plugin. Copyright remains with the original authors.
English | [中文](README.zh.md) [Langfuse](https://langfuse.com) observability for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`): exports each turn as an OpenTelemetry trace — model step → generation, tool call → tool span — groups turns by session, records canonical feedback as Langfuse Scores, and preserves fork/subagent lineage. This is a community plugin (`dsh-plugin` topic), not part of the official repository. It implements the harness's public telemetry seam (`@deepseek-ai/dsh-session-telemetry`) as an alternative backend to the official OTLP-logs exporter. ## Install The commands below assume the installed `dsh` CLI. Running the official harness from a [source checkout](https://github.com/deepseek-ai/deepseek-harness) instead? Run each of them as `pnpm dsh …` from the checkout root (after its `pnpm run build`) — same commands, same `web` profile. As a profile bundle (the package ships a `cordis.patch.yml` patch layer): ```sh dsh plugin --profile web add dsh-plugin-langfuse export LANGFUSE_PUBLIC_KEY=pk-lf-… export LANGFUSE_SECRET_KEY=sk-lf-… # optional, defaults to https://cloud.langfuse.com (EU region); note the plugin # reads LANGFUSE_HOST
Read the full READMERepository license: MIT
dsh-plugin-langfuse DSH plugin questions
How do I install dsh-plugin-langfuse?
Run `dsh plugin --profile web add dsh-plugin-langfuse` and set the required environment variables (LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY). Then restart dsh. The plugin reads the environment at boot.
What environment variables are needed?
You need LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY. Optionally set LANGFUSE_HOST (defaults to https://cloud.langfuse.com for EU region). Note the plugin reads LANGFUSE_HOST, not LANGFUSE_BASE_URL.
How do I enable feedback scores?
The profile bundle enables feedback scores when both project keys are present. For explicit config, set `feedbackScores.enabled: true` in the cordis.yml row. The plugin also requires a valid scores URL and queue parameters.
Can I correlate dsh traces with my host application's traces?
Yes, use the `correlation` config with userId and sessionId. These values are stamped on every exported span as langfuse.user.id and langfuse.session.id. You can also override per turn via record attributes.
What happens if configuration is wrong?
The plugin fails loud at load time with a descriptive error. No transport is constructed, and the plugin does not start. Examples include missing exporter URL, invalid auth, or unknown mode.