Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
867980b
feat: Add automated API documentation generation pipeline
openhands-agent Nov 3, 2025
379da89
refactor: Move API docs to sdk/ folder and integrate into Mintlify na…
openhands-agent Nov 3, 2025
411bc20
fix: Preserve essential Sphinx config files during clean operation
openhands-agent Nov 3, 2025
0e88c4b
fix: Improve API documentation generation with proper module paths an…
openhands-agent Nov 3, 2025
69a8867
feat: Complete API documentation generation with full docstring extra…
openhands-agent Nov 3, 2025
afff392
cleanup: Remove unnecessary example file
openhands-agent Nov 3, 2025
02811b3
fix: Improve markdown cleaning to prevent link checker parsing errors
openhands-agent Nov 3, 2025
8a2a6ce
fix: Escape <factory> tags to prevent Mintlify parsing errors
openhands-agent Nov 3, 2025
0bb363e
fix: Enhance markdown cleaning for complex type signatures and HTML-l…
openhands-agent Nov 3, 2025
4851e59
fix: Add comprehensive markdown cleaning for JavaScript parser compat…
openhands-agent Nov 3, 2025
c631587
fix: Manually fix remaining JSON pattern causing acorn parsing error
openhands-agent Nov 3, 2025
e53400a
feat: Improve API documentation formatting
openhands-agent Nov 3, 2025
0c26c61
fix: Resolve acorn parsing errors in API documentation
openhands-agent Nov 3, 2025
4aaa821
fix: Resolve remaining acorn parsing errors in API documentation
openhands-agent Nov 3, 2025
c6fda09
fix: Resolve nested emphasis in parameter lists causing acorn parsing…
openhands-agent Nov 3, 2025
15803f5
feat: Simplify API documentation formatting to eliminate parsing errors
openhands-agent Nov 3, 2025
e966822
fix: Remove keyword-only parameter indicators causing acorn parsing e…
openhands-agent Nov 3, 2025
d8fb99c
feat: Complete rewrite of API documentation generator with clean, sim…
openhands-agent Nov 3, 2025
b4c8df3
feat: Update navigation to use new simplified API reference structure
openhands-agent Nov 3, 2025
74de75a
docs: Update README to reflect new simplified API documentation approach
openhands-agent Nov 3, 2025
571f903
fix: Resolve acorn parsing errors in API documentation
openhands-agent Nov 3, 2025
066e475
fix: Convert API documentation to .mdx format for Mintlify compatibility
openhands-agent Nov 3, 2025
4b187d8
fix: Eliminate all remaining acorn parsing errors
openhands-agent Nov 3, 2025
5bdc090
fix: Remove asterisk patterns in type annotations causing acorn parsi…
openhands-agent Nov 3, 2025
a62d619
fix: Add comprehensive multi-line dictionary cleaning patterns
openhands-agent Nov 3, 2025
ef7dcc3
fix: Manually remove final dictionary pattern causing acorn parsing e…
openhands-agent Nov 3, 2025
8e33a00
fix: Update internal links from .md to .mdx extensions
openhands-agent Nov 3, 2025
818b148
fix: Enhance multi-line dictionary cleaning to catch persistent pattern
openhands-agent Nov 3, 2025
9eb843f
fix: Preserve full class names in headers for proper anchor linking
openhands-agent Nov 3, 2025
4ee8bb8
feat: Improve class header readability and fix anchor links
openhands-agent Nov 3, 2025
684a738
fix: Remove Python console prompt prefixes from code examples
openhands-agent Nov 3, 2025
e738e4d
feat: Reorganize class documentation with properties/methods separation
openhands-agent Nov 3, 2025
0c71833
fix: Correct header hierarchy for Example sections
openhands-agent Nov 3, 2025
7fabc7b
fix: Correct cross-reference links to point to specific module pages
openhands-agent Nov 3, 2025
dee4077
fix: Remove .mdx extensions from internal links for Mintlify compatib…
openhands-agent Nov 3, 2025
3ef2fbf
fix: Clean up malformed property entries and same-file anchor links
openhands-agent Nov 3, 2025
d9c7214
fix: Remove 'openhands.sdk' entry from navigation
openhands-agent Nov 3, 2025
1a6f1bf
feat: Add context module to API documentation and fix MDX syntax
openhands-agent Nov 3, 2025
d411528
feat: Remove all cross-reference links to eliminate Mintlify broken l…
openhands-agent Nov 4, 2025
2a9bc85
fix: Resolve Sphinx blockquote formatting issue in API documentation
openhands-agent Nov 4, 2025
46db292
feat: Remove duplicate module headers and improve descriptions
openhands-agent Nov 4, 2025
fc39b30
fix: Resolve empty backticks in abstract property documentation
openhands-agent Nov 4, 2025
e053e7d
feat: Format parameter names in backticks for better readability
openhands-agent Nov 4, 2025
cdb30ba
feat: Expand workflow to include API documentation generation
openhands-agent Nov 4, 2025
df08091
Update sync-docs-and-api.yml
rbren Nov 4, 2025
1d24c50
Update scripts/README.md
rbren Nov 4, 2025
c6ca324
Update scripts/README.md
xingyaoww Nov 4, 2025
b743dcd
Update .github/workflows/sync-docs-and-api.yml
enyst Nov 5, 2025
4e601b7
Merge branch 'main' of github.com:OpenHands/docs into feature/api-doc…
enyst Nov 5, 2025
b82799d
docs: sync documentation from agent-sdk
github-actions[bot] Nov 5, 2025
7a72883
Merge branch 'main' into feature/api-docs-generation-pipeline
enyst Nov 6, 2025
b2c742b
docs: sync documentation from agent-sdk
github-actions[bot] Nov 6, 2025
b09e158
Merge branch 'main' into feature/api-docs-generation-pipeline
enyst Nov 6, 2025
beeb0f3
ci: restore sync-docs-code-blocks workflow from main and extend to ge…
enyst Nov 6, 2025
59fce12
ci: remove redundant sync-docs-and-api workflow in favor of restored …
enyst Nov 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions .github/workflows/sync-docs-code-blocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,30 @@ jobs:
with:
python-version: '3.11'

- name: Install dependencies for API docs
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx-markdown-builder myst-parser
- name: Sync code blocks
id: detect_changes
env:
AGENT_SDK_PATH: ${{ github.workspace }}/agent-sdk
shell: bash
run: |
set -euo pipefail
python .github/scripts/sync_code_blocks.py
- name: Generate API documentation
shell: bash
run: |
set -euo pipefail
python scripts/generate-api-docs.py
- name: Check for changes
id: detect_changes
shell: bash
run: |
set -euo pipefail
if [[ -n "$(git status --porcelain)" ]]; then
echo "changes=true" >> "$GITHUB_OUTPUT"
else
Expand All @@ -57,26 +73,25 @@ jobs:
uses: peter-evans/create-pull-request@v7
with:
commit-message: |
docs: sync code blocks from agent-sdk examples
docs: sync code blocks and generate API reference
Synced from agent-sdk ref: ${{ github.event.inputs.agent_sdk_ref || 'main' }}
branch: sync-docs-code-blocks
branch: sync-docs-and-api
branch-suffix: timestamp
delete-branch: true
title: "docs: sync code blocks from agent-sdk examples"
title: "docs: sync code blocks and generate API reference"
body: |
## Summary of changes
This PR automatically syncs code blocks in documentation with their corresponding source files from the agent-sdk repository.
This PR automatically syncs code blocks in documentation with their corresponding source files from the agent-sdk repository, and generates API reference documentation.
**Agent SDK Reference**: `${{ github.event.inputs.agent_sdk_ref || 'main' }}`
### Changes Made
- Updated code blocks in MDX files to match the current state of example files in agent-sdk
- Generated API reference markdown files
- This is an automated sync performed by the `sync-docs-code-blocks` workflow
### Checklist
- [x] I have read and reviewed the documentation changes to the best of my ability.
- [x] If the change is significant, I have run the documentation site locally and confirmed it renders as expected.
**Note**: This is an automated pull request. Please review the changes to ensure they are correct before merging.
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
# Local checkout of agent-sdk for docs workflows and local testing
agent-sdk/

# Sphinx build artifacts
scripts/sphinx/build/
scripts/sphinx/source/*.rst
!scripts/sphinx/source/index.rst
!scripts/sphinx/source/conf.py

# Python cache
__pycache__/
*.pyc
*.pyo
*.pyd
.Python
*.so

# Virtual environments
venv/
env/
.env

# IDE files
.vscode/
.idea/
*.swp
*.swo

# OS junk
.DS_Store
Thumbs.db

# Keep generated API reference docs (these should be committed)
# api-reference/ - This directory should be committed
42 changes: 35 additions & 7 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@
},
{
"group": "Tips and Tricks",
"pages": ["openhands/usage/tips/prompting-best-practices"]
"pages": [
"openhands/usage/tips/prompting-best-practices"
]
},
{
"group": "Troubleshooting & Feedback",
Expand Down Expand Up @@ -258,6 +260,19 @@
]
}
]
},
{
"group": "API Reference",
"pages": [
"sdk/api-reference/openhands.sdk.agent",
"sdk/api-reference/openhands.sdk.conversation",
"sdk/api-reference/openhands.sdk.event",
"sdk/api-reference/openhands.sdk.llm",
"sdk/api-reference/openhands.sdk.security",
"sdk/api-reference/openhands.sdk.tool",
"sdk/api-reference/openhands.sdk.utils",
"sdk/api-reference/openhands.sdk.workspace"
]
}
]
},
Expand All @@ -267,7 +282,9 @@
},
{
"tab": "Success Stories",
"pages": ["success-stories/index"]
"pages": [
"success-stories/index"
]
}
],
"global": {
Expand Down Expand Up @@ -308,7 +325,7 @@
}
},
"banner": {
"content": "📢 **GitHub Org Rename:** All-Hands-AI to OpenHands on Monday Oct 20th at 18:00 UTC. [Migration details ](https://github.com/OpenHands/OpenHands/issues/11376)",
"content": "\ud83d\udce2 **GitHub Org Rename:** All-Hands-AI to OpenHands on Monday Oct 20th at 18:00 UTC. [Migration details \u2192](https://github.com/OpenHands/OpenHands/issues/11376)",
"dismissible": true
},
"head": [
Expand All @@ -320,11 +337,22 @@
}
],
"contextual": {
"options": ["copy", "view", "chatgpt", "claude"]
"options": [
"copy",
"view",
"chatgpt",
"claude"
]
},
"redirects": [
{ "source": "/modules/:slug*", "destination": "/:slug*" },
{ "source": "/usage/:slug*", "destination": "/openhands/usage/:slug*" },
{
"source": "/modules/:slug*",
"destination": "/:slug*"
},
{
"source": "/usage/:slug*",
"destination": "/openhands/usage/:slug*"
},
{
"source": "/openhands/usage/configuration-options",
"destination": "/openhands/usage/advanced/configuration-options"
Expand Down Expand Up @@ -414,4 +442,4 @@
"destination": "/openhands/usage/troubleshooting/feedback"
}
]
}
}
Loading