Skip to content

docs(sdk): install openhands-sdk and openhands-tools as a matched set#512

Merged
VascoSch92 merged 1 commit into
mainfrom
docs/align-sdk-tools-versions
May 20, 2026
Merged

docs(sdk): install openhands-sdk and openhands-tools as a matched set#512
VascoSch92 merged 1 commit into
mainfrom
docs/align-sdk-tools-versions

Conversation

@VascoSch92
Copy link
Copy Markdown
Member

@VascoSch92 VascoSch92 commented May 20, 2026

What

Updates the SDK Getting Started page (sdk/getting-started.mdx, Step 2 → Option 1: Install via PyPI) so the core packages are installed as a matched set, and adds a warning that they must stay on the same version.

Why

The current instructions run four separate pip install commands with no version alignment:

pip install openhands-sdk
pip install openhands-tools
...

openhands-tools depends on openhands-sdk without a version constraint and imports its internals directly (it pulls in ~29 distinct openhands.sdk.* modules, including internal paths like conversation.impl.local_conversation, event.base, llm.llm, and utils.path). Because pip install <pkg> does not upgrade an already-installed copy, the separate-command pattern can leave a newer openhands-tools against an older openhands-sdk.

That mismatch fails at import — e.g. openhands-tools ≥ 1.20.0 imports openhands.sdk.utils.path, a module absent from older SDK releases (e.g. 1.17.0):

ModuleNotFoundError: No module named 'openhands.sdk.utils.path'

Reported in OpenHands/software-agent-sdk#3300.

Closes OpenHands/software-agent-sdk#3300.

Change

  • Install openhands-sdk and openhands-tools in a single pip command, with -U so a stale copy is upgraded.
  • List all packages in one command for the optional workspace/server install too, so every version resolves together.
  • Add a <Warning> explaining the two packages are a matched set that must share the same version, with the exact symptom of a mismatch and a pinned-install example.

This is a docs-only change. A complementary code fix (pinning the dependency in openhands-tools) can follow separately.

The PyPI install instructions ran four separate pip commands without
version alignment. Because openhands-tools depends on openhands-sdk
without a version constraint and imports its internals directly, this
can produce a mismatched pair (e.g. a newer openhands-tools against an
older, not-upgraded openhands-sdk), which fails at import with
ModuleNotFoundError: No module named 'openhands.sdk.utils.path'.

Install the packages together in a single pip command, use -U so an
existing copy is upgraded, and add a warning that the two packages must
stay on the same version.
@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 20, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
all-hands-ai 🟢 Ready View Preview May 20, 2026, 1:55 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Copy link
Copy Markdown
Contributor

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

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

🟢 Good taste - Excellent pragmatic documentation fix.

This change solves a real user problem (version mismatches causing ModuleNotFoundError) by consolidating installation commands and adding clear warnings. The -U flag ensures existing packages are upgraded, and the detailed warning explains why version alignment matters.

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟢 LOW

Documentation-only change that improves user experience and prevents installation issues. No code modifications, no breaking changes.

VERDICT:
Worth merging: Prevents silent version mismatches with clear, actionable guidance.

KEY INSIGHT:
Combining installation commands with -U eliminates the most common source of version mismatch errors while maintaining simplicity.


Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/OpenHands/docs/actions/runs/26167116322

Copy link
Copy Markdown
Member

@enyst enyst left a comment

Choose a reason for hiding this comment

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

Thank you!

@VascoSch92 VascoSch92 merged commit 832ad16 into main May 20, 2026
8 of 9 checks passed
@VascoSch92 VascoSch92 deleted the docs/align-sdk-tools-versions branch May 20, 2026 14:18
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.

[Bug]: Agent initialization fails in openhands-sdk v1.22.1 with "Instance is frozen" when assigning system_message

4 participants