Skip to content

Conversation

@enyst
Copy link
Collaborator

@enyst enyst commented Oct 20, 2025

Summary

  • Fixes from roasted review and follow-ups on branch sdk
  • Keep solutions minimal; no changes to MCP filter_tools_regex example

Key changes

  1. CI/workflows
  • sync-sdk-changes.yml: Stop mutating branches. Generate Agent SDK OpenAPI then create a branch and open a PR via peter-evans/create-pull-request. Added pull-requests: write permission and switched bot identity to openhands.dev.
  • sync-docs-code-blocks.yml (already present on this branch): guarded triggers (main,sdk), no direct pushes; uses create-pull-request when content changes.
  1. Sync script hardening
  • .github/scripts/sync_code_blocks.py: No-op when agent-sdk path is not found (graceful), removed walrus operator in update path, simplified block replacement and comparison. Script no longer writes to GITHUB_OUTPUT; workflow owns outputs.
  1. Docs information architecture
  • docs.json: “Agent SDK (v1)” tab is primary for v1. Added an OpenAPI tab for Agent SDK pointing to openapi/agent-sdk.json. Left the legacy “OpenHands (Core) API)” tab in place for now; it can be removed when v0 is officially retired on sdk.
  1. Broken links and consistency
  • Replaced dead /sdk/architecture/* links with working destinations (or removed when no stable target existed yet). Example pages updated:
    • sdk/guides/hello-world.mdx
    • sdk/guides/custom-tools.mdx
    • sdk/guides/mcp.mdx
  • Hello World import fixed to from openhands.sdk.preset.default import get_default_agent.
  • LLM terminology unified to usage_id across the examples shown.
  1. Domain migration
  • Migrated external site links to openhands.dev where appropriate (company/blog/app/docs). Intentionally preserved docker., runtime., jira.* hosts.

Notes

  • openapi/agent-sdk.json is not versioned in this branch; sdk target branch contains it and the dedicated sync workflow. The new OpenAPI tab will function post-merge.
  • MCP examples (including filter_tools_regex) are unchanged per request.

Testing

  • Basic link audit via grep; docs build expected to pick up both OpenAPI tabs once merged to sdk.

Request
Please review and merge into sdk (PR #32 source branch). This keeps CI non-destructive (PR-only), fixes broken links, and aligns SDK docs with v1 expectations.

@enyst can click here to continue refining the PR

xingyaoww and others added 11 commits October 21, 2025 03:28
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Update sdk/getting-started.mdx to reference the actual hello world
example file (examples/01_standalone_sdk/01_hello_world.py) instead
of maintaining inline code. This allows the sync_code_blocks.py
workflow to automatically keep the documentation in sync with the
agent-sdk repository.

Co-authored-by: openhands <openhands@all-hands.dev>
- Remove agent-sdk gitlink from index and add to .gitignore
- Avoid broken submodule state and clarify intended local checkout behavior

Co-authored-by: openhands <openhands@all-hands.dev>
- Don’t hard-fail when agent-sdk path is missing; exit cleanly
- Replace blocks using known slice instead of inner regex
- Remove GITHUB_OUTPUT coupling; rely on git status in workflow

Co-authored-by: openhands <openhands@all-hands.dev>
- Limit to main/sdk pushes and PRs
- Use peter-evans/create-pull-request to open PR instead of direct push

Co-authored-by: openhands <openhands@all-hands.dev>
- Fix /sdk/getting-started link on SDK index
- Hello World: use openhands.sdk.preset.default.get_default_agent and usage_id
- Remove duplicate heading in custom-tools example
- Workflow: only run on main/sdk and open PR for updates
- Script: no-op if agent-sdk missing; simpler replacement
- Ignore local agent-sdk checkout and remove gitlink

Co-authored-by: openhands <openhands@all-hands.dev>
…o-authored-by: openhands <openhands@all-hands.dev>
- Add separate API tab for agent-sdk.json (generated by workflow)
- Update company/blog/cloud anchors to openhands.dev

Co-authored-by: openhands <openhands@all-hands.dev>
- Replace all-hands.dev -> openhands.dev for app/docs/blog/home
- Preserve docker.* and jira.* hosts as-is

Co-authored-by: openhands <openhands@all-hands.dev>
…pens PRs only

- Replace /sdk/architecture/* links with working /sdk/arch/llms/* or remove
- Hello World imports fixed and usage_id consistent
- Domain move to openhands.dev; keep docker.* and jira.*
- sync_code_blocks.py: no-op if SDK missing; remove walrus operator; simpler block replace
- sync-sdk-changes workflow: create branch + PR for OpenAPI updates
- docs.json: Agent SDK (v1) is primary; add OpenAPI tab for Agent SDK

Co-authored-by: openhands <openhands@all-hands.dev>
…ot identity

- Add pull-requests: write
- Use create-pull-request for agent-sdk OpenAPI updates
- Update bot name/email to openhands.dev

Co-authored-by: openhands <openhands@all-hands.dev>
@jamiechicago312
Copy link
Collaborator

Will review first thing tomorrow 👍

@enyst
Copy link
Collaborator Author

enyst commented Oct 20, 2025

Thank you. They're actually to Xingyao's PR, so it's like, they're meant to be:

  • either included in his PR
  • or submitted to main, after his PR is merged in main.

…g deletion (replaced by sync-agent-sdk-openapi.yml)
@openhands-ai
Copy link

openhands-ai bot commented Oct 20, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Sync Documentation Code Blocks

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #33 at branch `pr/sync-openapi-prs`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

@mamoodi
Copy link
Collaborator

mamoodi commented Oct 21, 2025

Looks generally okay. I don't know what the sync job is for but wondering if it's just for SDK, it can just run when SDK changes or something.

Also can you run: mint broken-links
to make sure there's no broken links please. The API tabs will show up as broken links and that's a known issue in mintlify.

@enyst
Copy link
Collaborator Author

enyst commented Oct 21, 2025

Yes, it’s a bit in flux. I think this PR or the other were trying to fix broken links.

@xingyaoww xingyaoww changed the base branch from sdk to main October 21, 2025 13:02
@xingyaoww xingyaoww self-requested a review as a code owner October 21, 2025 13:02
@xingyaoww xingyaoww merged commit 9d43f75 into main Oct 21, 2025
@jamiechicago312 jamiechicago312 deleted the pr/sync-openapi-prs branch October 21, 2025 17:30
enyst pushed a commit that referenced this pull request Nov 8, 2025
…ructure (#33)

Co-authored-by: openhands <openhands@all-hands.dev>
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.

7 participants