Skip to content

Python: create_harness_agent skills_paths should accept str and Path #6705

Description

@eavanvalkenburg

Description

create_harness_agent has a skills_paths parameter, but its type currently appears to accept only Sequence[str] | None.

It would be more ergonomic and consistent with the lower-level skills APIs if skills_paths accepted:

  • a single str
  • a single pathlib.Path
  • a sequence of str | pathlib.Path

For example, this should be valid without requiring str(...) conversion:

from pathlib import Path

SKILLS_DIR = Path(__file__).resolve().parent / "skills"

agent = create_harness_agent(
    client=client,
    skills_paths=SKILLS_DIR,
)

Current workaround

agent = create_harness_agent(
    client=client,
    skills_paths=[str(SKILLS_DIR)],
)

Expected behavior

create_harness_agent(skills_paths=...) should match the path ergonomics of FileSkillsSource / SkillsProvider.from_paths, which already accept str | Path | Sequence[str | Path].

Suggested type shape:

skills_paths: str | Path | Sequence[str | Path] | None = None

Metadata

Metadata

Assignees

Labels

pythonUsage: [Issues, PRs], Target: Python
No fields configured for Feature.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions