docs(python): add module-level docstrings to public modules#28
Merged
docs(python): add module-level docstrings to public modules#28
Conversation
…Agent SDK" This reverts commit 6361f82.
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive module-level docstrings to all Python SDK modules in the Kimi Agent SDK. The docstrings follow a consistent format with clear descriptions, key features, and runnable code examples.
Changes:
- Added module-level docstrings to six Python modules (
__init__.py,_session.py,_prompt.py,_exception.py,_approval.py,_aggregator.py) - Each docstring includes a summary, description, key classes/functions/types/exceptions listing, and practical code examples
- Examples demonstrate both high-level and low-level API usage patterns
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
python/src/kimi_agent_sdk/__init__.py |
Added comprehensive package-level docstring with both high-level prompt API and low-level Session API examples |
python/src/kimi_agent_sdk/_session.py |
Added module docstring explaining Session class for low-level agent control with Wire message access |
python/src/kimi_agent_sdk/_prompt.py |
Added module docstring for high-level prompt API with examples for both yolo mode and custom approval handlers |
python/src/kimi_agent_sdk/_exception.py |
Added module docstring documenting SDK-specific exceptions for validation and state management |
python/src/kimi_agent_sdk/_approval.py |
Added module docstring explaining approval handling types and custom approval handler pattern |
python/src/kimi_agent_sdk/_aggregator.py |
Added module docstring for Wire message aggregation with MessageAggregator usage example |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add module-level docstrings to all Python SDK modules following, with clear descriptions, key features, and runnable examples