dsh-langfuse
Verified@amaster.ai/dsh-langfuse Β· v0.1.7 Β· MIT
Langfuse observability plugin for DeepSeek Harness: one generation per LLM call with a nested llm-request span, one span per tool call, one trace per session turn, subagent child sessions nested under the parent's tree.
Install
dsh plugin add @amaster.ai/dsh-langfuse Confirm the layer applied with dsh --profile default --dump-config β see the install guide.
Source
Creators
Readme
@amaster.ai/dsh-langfuse

Langfuse observability for DeepSeek Harness (dsh):
- one generation per LLM call (
llm/streamwaterfall), plus a nestedllm-requestspan carrying the verbatim loop-built request - one span per tool call (
tools/executewaterfall) - one trace per session turn (
session/event) β in the v5 SDK the trace IS its root span, ended (and thereby exported) atturn/end - subagent child sessions nested under the parent's tree (
session/createdheader link +subagent/start/subagent/end)
Install
dsh plugin --profile my-agent add @amaster.ai/dsh-langfuse \
@langfuse/tracing @langfuse/otel @opentelemetry/sdk-trace-node \
@opentelemetry/api @opentelemetry/exporter-trace-otlp-http
The Langfuse JS SDK v5 peers (@langfuse/tracing, @langfuse/otel, @opentelemetry/sdk-trace-node) are loaded via lazy dynamic import(), so an unused install costs nothing β but they must all be present at runtime (dsh plugin add does not auto-install peer trees, so the OTEL api/exporter packages @langfuse/otel itself peers on are listed explicitly).
Configuration
Disabled by default. Configure via the profile's cordis.patch.yml:
- insert:
- id: langfuse
name: '@amaster.ai/dsh-langfuse'
config:
enabled: true
publicKey: pk-lf-...
secretKey: sk-lf-... # secret role
baseUrl: https://cloud.langfuse.com
traceName: dsh-turn
captureContent: true # set false to record metadata only
Buffered spans drain on session/flush(session); the exporter shuts down with the plugin fiber.
Observability is a no-throw seam: backend errors are logged with a [dsh-langfuse] prefix and never escape into the agent loop.
Compatibility
Pinned dsh/cordis versions live in the root compat matrix. Event payloads ride pre-release dsh APIs β check the TODO(verify) markers in src/ before upgrading dsh.
License
MIT