Skip to content

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

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

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