Skip to content

Python: [Feature]: Add import-light factories for code-defined skills #9621

Description

Maintainer-owned issue. Community contributors: please do not pick up or start implementing this issue.

Problem

The simplest stable code-defined Skills path requires users to construct SkillFrontmatter, InlineSkill, and SkillsProvider. Static resources and scripts require additional framework-owned objects. The advanced classes own useful validation and behavior, but they are mandatory even for a small data-only definition.

Use Case and Evidence

A basic skill currently requires multiple public types from python/packages/core/agent_framework/_skills.py, notably SkillFrontmatter around lines 936-1012, InlineSkill around lines 1152-1207, and SkillsProvider around lines 2080-2145. These names are stable root exports from released agent-framework-core.

Desired Outcome

Allow the common path to create a provider with one primary framework symbol and plain keyword or structurally typed data while preserving all existing advanced APIs.

Alternatives Considered

Removing or replacing the existing classes would break stable imports and behavior. Widening the existing constructor directly may also introduce ambiguous input discrimination.

Proposed Direction

Add an additive factory such as SkillsProvider.from_inline(...) and consider SkillsProvider.from_definitions(...) with a public SkillDefinition TypedDict. Normalize through SkillFrontmatter and InlineSkill internally so current validation remains authoritative. Consider data shorthands for static resources while retaining class-based callable resources and scripts.

Scope and Non-Goals

Do not remove or rename SkillFrontmatter, InlineSkill, ClassSkill, resource/script classes, source classes, or existing SkillsProvider constructor forms. MCP-backed Skills staging is out of scope.

Language

Python

Contribution Intent

Maintainer-owned; implementation must wait for maintainer design agreement.

Acknowledgements

  • I searched existing issues and did not find a duplicate.
  • I will wait for explicit maintainer agreement before starting implementation of a non-trivial change.

Ownership: Core maintainers only; not available for community pickup.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonUsage: [Issues, PRs], Target: PythonskillsUsage: [Issues, PRs], Target: skills related features

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions