Add auto-generated Python API reference documentation#69
Closed
Add auto-generated Python API reference documentation#69
Conversation
- Create GitHub Actions workflow to sync API docs from agent-sdk - Add Python script that uses AST parsing to extract docstrings - Generate MDX files for 11 SDK modules (agent, conversation, llm, tool, workspace, mcp, event, context, security, io, git) - Update docs.json navigation to include API Reference section - Workflow runs daily at 2 AM UTC and on workflow_dispatch - Auto-generated docs include class and function signatures with docstrings Fixes #65
- Replace custom AST-based generator with pydoc-markdown library - Generate single sdk/api/index.mdx with all API documentation (7214 lines) - Remove 11 separate module MDX files (agent, conversation, llm, etc.) - Update docs.json to reference only sdk/api/index - Install pydoc-markdown in workflow for doc generation - Uses pydoc-markdown's native markdown output with Mintlify frontmatter - No external dependencies needed at runtime (pydoc-markdown installed in CI)
Contributor
Author
Update: Flattened API ReferenceI've updated this PR with a new approach based on feedback: Changes✅ Single-file output: Combined all SDK modules into one Technical Details
Files Changed
Benefits
Ready for review! 🚀 |
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
Contributor
Author
|
#72 is better |
enyst
pushed a commit
that referenced
this pull request
Nov 8, 2025
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.
Fixes #65
Summary
This PR implements auto-generated Python API reference documentation from the software-agent-sdk repository as requested in issue #65.
Changes
New GitHub Actions Workflow
.github/workflows/sync-api-reference.yml: Automated workflow that runs daily at 2 AM UTC and onworkflow_dispatchDocumentation Generation Script
.github/scripts/generate_api_docs.py: Python script that uses AST parsing to extract documentationdocs.jsonnavigation automaticallyGenerated Documentation
sdk/api/: New directory containing auto-generated API referenceindex.mdx- Overview page with module list and descriptionsagent.mdx,conversation.mdx,llm.mdx,tool.mdx,workspace.mdx,mcp.mdx,event.mdx,context.mdx,security.mdx,io.mdx,git.mdxNavigation Updates
docs.json: Added "API Reference" section to SDK tab navigationImplementation Highlights
astmodule for robust source code parsing without requiring SDK installation__init__)Testing
Checklist
Next Steps
After this PR is merged:
@xingyaoww can click here to continue refining the PR