#17775·langfuse

Feature Request: Closed-loop agent skill generation and continuous optimization

Author: tangkh2026Created Sep 22, 2026Updated Sep 29, 2026
Labelsfeat-agentsfeatureagentic-workflowsAgent Skills

Summary

Support a closed-loop workflow for generating agent skills from API documentation, documentation pages, OpenAPI specifications, or natural-language task descriptions, and continuously improving those skills based on runtime traces, evaluations, and user feedback.

The goal is not only to create a static skill package, but to provide a complete lifecycle for skill development and optimization.

Problem

Creating useful agent skills manually is expensive and fragile. A skill may be based on external APIs whose documentation changes over time, and its quality often depends on real-world tool usage patterns, failures, and user corrections.

Langfuse already provides foundational capabilities for agent observability and evaluation, but the workflow from documentation to generated skill and continuous improvement is still largely manual.

Proposed direction

1. Skill generation

  • Accept API documentation, OpenAPI specifications, documentation URLs, Markdown, or natural-language requirements.
  • Generate a skill package containing metadata, instructions, parameter schemas, examples, references, and optional execution scripts.
  • Support both unstructured documentation and structured API specifications.

2. Validation and QA

  • Validate the generated skill structure and metadata.
  • Run simulated tasks or test cases against the generated skill.
  • Check whether the skill is actionable and understandable by an agent.
  • Validate generated examples, parameters, and error-handling guidance.

3. Publishing and versioning

  • Version skills and track their lifecycle, such as draft, review, published, and deprecated.
  • Track the documentation or API schema version used to generate each skill.
  • Support review and rollback before or after publishing.

4. Runtime observation

  • Record traces for skill execution.
  • Capture the skill version, tool calls, parameters, errors, latency, retries, and outcomes.
  • Associate execution context and feedback with the relevant skill version.

5. Evaluation and analytics

  • Measure skill selection accuracy, task completion rate, tool-call success rate, parameter error rate, cost, latency, and user correction rate.
  • Create evaluation datasets for representative skill tasks.
  • Score whether the right skill was selected and whether it was used correctly.

6. Continuous optimization

  • Use failures, evaluation results, and user feedback to identify weaknesses in a skill.
  • Generate improvement suggestions for instructions, examples, edge cases, parameter descriptions, and error-handling rules.
  • Support iterative improvement through versioned candidate updates, evaluation, and approval before release.

Why this fits Langfuse

Langfuse already provides several building blocks that make this direction a natural extension:

  • tracing and observability
  • evaluation workflows
  • prompt and workflow management
  • collection of production usage data
  • structured feedback loops

A skill lifecycle system built on this foundation could extend Langfuse from observing agent execution to managing and improving agent capabilities over time.

Example workflow

Documentation / OpenAPI / user requirements
                        ↓
                  Skill generator
                        ↓
            Validation, simulation, and review
                        ↓
                 Versioned publication
                        ↓
           Agent installation and execution
                        ↓
            Traces, evaluations, and feedback
                        ↓
              Candidate skill improvements
                        ↓
                 Evaluation and approval
                        └────────────────↺