Skip to content

[codex] Clarify Python SDK skill invocation - #3

Merged
ZhiXiao-Lin merged 2 commits into
A3S-Lab:mainfrom
RezinChow:codex/python-sdk-skill-invocation-docs
Jul 20, 2026
Merged

ZhiXiao-Lin merged 2 commits into
A3S-Lab:mainfrom
RezinChow:codex/python-sdk-skill-invocation-docs

Conversation

@RezinChow

Copy link
Copy Markdown

Summary

Clarifies the Python SDK path for folder-style skills and direct skill invocation.

  • document skill_dirs, search_skills, and Skill usage in the Python SDK README
  • add a concise Skills section to the Python quick reference
  • update the skill-tool example from obsolete await session.send(...) usage to the current synchronous API
  • fix one Python binding docstring that still showed await session.send(...)

Why

The SDK already supports loading folder-style skills through skill_dirs and invoking them with session.tool("Skill", {...}), but the Python-facing docs did not show that path clearly. The old example also mixed in async-style usage that does not match the current PyO3 API.

Validation

  • git diff --check origin/main..HEAD
  • python3 -m py_compile examples/test_skill_tool.py

Rust checks were not run locally because cargo is not installed in this environment.

@ZhiXiao-Lin

ZhiXiao-Lin commented Jul 9, 2026 •

Copy link
Copy Markdown

I took a look at this PR:

  • mergeable_state is clean, so there are no merge conflicts.
  • Both check runs have passed: Check and SDK build check.
  • The diff is small and mostly updates the Python SDK skill invocation docs/examples. I do not see a blocking issue in the changes.

The only thing to resolve before merging is that this PR is still marked as Draft. GitHub will not allow a Draft PR to be merged, so please mark it as Ready for review first; after that, it should be good to merge according to the repo's normal process.

@ZhiXiao-Lin
ZhiXiao-Lin force-pushed the codex/python-sdk-skill-invocation-docs branch from d8465c7 to a7ac7ee Compare July 18, 2026 15:40
@ZhiXiao-Lin
ZhiXiao-Lin marked this pull request as ready for review July 18, 2026 15:40
@ZhiXiao-Lin

Copy link
Copy Markdown

Rebased the contribution onto the current modular Python SDK while preserving the original author. The moved PySession example now updates sdk/python/src/session.rs; the current A3S-Lab release URL and newer dynamic-workflow docs were retained alongside the skill examples.

Validation:

  • cargo fmt --all -- --check
  • cargo check --manifest-path sdk/python/Cargo.toml
  • python3 -m py_compile examples/test_skill_tool.py
  • git diff --check

@ZhiXiao-Lin ZhiXiao-Lin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the Python SDK examples and bindings. The examples now use the synchronous session.send() / session.tool() APIs correctly, SessionOptions is imported before use, and both supported skill-directory configuration paths are documented consistently. CI is green.

@ZhiXiao-Lin ZhiXiao-Lin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revalidated after merging current main (v6.0.0) into the contribution. The only conflict was the Python SDK wheel-install example; the current 6.0.0 placeholder guidance was retained while preserving the PR's skill-discovery and synchronous API corrections.

Local validation passed: formatting, event-protocol artifacts, SDK API alignment, Python example syntax, and cargo check --manifest-path sdk/python/Cargo.toml. GitHub CI is now green for Check, SDK build check, and Windows check.

@ZhiXiao-Lin
ZhiXiao-Lin merged commit d7b14d2 into A3S-Lab:main Jul 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants