Skip to content

Feature: expose skill and subagent names for Langfuse analytics #38

Open

Description

@Azther0z

Problem

OpenCode skill and task tool calls are exported as Langfuse TOOL observations named only skill and task.

The semantic values are preserved only inside the observation input:

  • Skill name: input.name
  • Subagent type: input.subagent_type

Langfuse dashboards can group tool observations by observation name, but cannot group or filter metrics by fields nested inside observation input. As a result, dashboards can show only total skill invocations and total subagent spawns. They cannot break those calls down by skill name or subagent type.

Current behavior

A skill invocation such as:

{
  "name": "resolve-dependencies"
}

is exported as an observation named skill.

A subagent spawn such as:

{
  "subagent_type": "developer"
}

is exported as an observation named task.

On current main, traceToolStart creates the span with startSpan(input.tool, ...), so these semantic names are not exposed through the observation name. I reproduced the behavior with plugin 0.3.0, and the same naming behavior remains in the current 0.4.0 source.

Expected behavior

Expose the semantic skill or subagent name through a field that Langfuse metrics can group and filter by.

Possible approaches:

  • Name observations skill:<name> and task:<subagent_type>.
  • Add stable Langfuse attributes or metadata fields that are supported as dashboard dimensions.

The original tool input should remain available unchanged.

Why this matters

This would allow native Langfuse dashboards to report:

  • Skill invocation counts by skill name
  • Subagent spawn counts by subagent type
  • Per-trace skill and subagent usage

Without this, users must build a separate pipeline that parses observation inputs and writes the extracted values back into Langfuse.

Activity

  1. suolongcn commented on Sep 18, 2026

    @suolongcn

    @bezbac Hi, I have resolved this issue and verified it with a local Langfuse environment. Could you please review the PR? I am new to this project, but I have contributed 1000+ lines of code to Apache projects before. I am familiar with Java and have been working in this field for more than 10 years at top IT companies in China. This year I have been focusing on AI engineering, and I would like to make more contributions to Langfuse in the future.

  2. milanagm commented on Sep 23, 2026

    @milanagm
    Contributor

    Hello @suolongcn and @Azther0z, thank you so much for your contribution! We are currently looking into this and will get back to you as soon as we have decided how to proceed!

  3. suolongcn commented on Sep 23, 2026

    @suolongcn

    Hello @suolongcn and @Azther0z, thank you so much for your contribution! We are currently looking into this and will get back to you as soon as we have decided how to proceed!

    Okay! I’m looking forward to your decision!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions