How close are we to cutting a release for the agen...
# proj-sdk
q
How close are we to cutting a release for the agent-sdk? (just the sdk and tools package, not including the agent server) We have an ongoing issue where the V1 CLI entrypoint is broken because PyPI can't resolve the dependencies properly (they aren't published packages) The docs at the moment have
uvx --python 3.12 openhands
as a method of running the CLI which doesn't work so far More context in the proposed fix here, which sadly didn't end up working https://github.com/All-Hands-AI/OpenHands/pull/11354
Current workaround is quite ugly
Copy code
uvx --python 3.12 \
  --with "openhands-sdk @ git+https://github.com/All-Hands-AI/agent-sdk.git@50b094a9#subdirectory=openhands/sdk" \
  --with "openhands-tools @ git+https://github.com/All-Hands-AI/agent-sdk.git@50b094a9#subdirectory=openhands/tools" \
  openhands
cc @chilly-france-44439 @wooden-umbrella-84098
c
we could cut a pre-release for this though (e.g., agent-sdk v1.0.0a0)
official release probably need to wait AFTER we ran the eval
q
pre-release works for me, as long as its published to PyPI
c
lemme do that quickly now
w
yeah let's do it
c
I will ship to
openhands-sdk
openhands-tools
openhands-workspace
and
openhands-agent-server
pypi
@quick-window-91705 ok! Try
openhands-sdk
and
openhands-tools
now with version
1.0.0a1
šŸ‘€ 1
q
Hmm im running this locally and seeing the following error
Copy code
Error: cannot import name 'Message' from 'openhands.sdk' (unknown location)
Traceback (most recent call last):
  File "/Users/rohitmalhotra/Documents/Openhands/Openhands/openhands-cli/openhands_cli/simple_main.py", line 42, in main
    from openhands_cli.agent_chat import run_cli_entry
  File "/Users/rohitmalhotra/Documents/Openhands/Openhands/openhands-cli/openhands_cli/agent_chat.py", line 10, in <module>
    from openhands.sdk import (
ImportError: cannot import name 'Message' from 'openhands.sdk' (unknown location)
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/rohitmalhotra/Documents/Openhands/Openhands/openhands-cli/openhands_cli/simple_main.py", line 59, in <module>
    main()
  File "/Users/rohitmalhotra/Documents/Openhands/Openhands/openhands-cli/openhands_cli/simple_main.py", line 42, in main
    from openhands_cli.agent_chat import run_cli_entry
  File "/Users/rohitmalhotra/Documents/Openhands/Openhands/openhands-cli/openhands_cli/agent_chat.py", line 10, in <module>
    from openhands.sdk import (
ImportError: cannot import name 'Message' from 'openhands.sdk' (unknown location)
c
which branch are you on?
trying to repro
q
rel-cli-1.0.2
c
ok can repro on main when i change the package...
q
this seems to work thinky spin
Copy code
uvx --with 'openhands-sdk==1.0.0a1' --with 'openhands-tools==1.0.0a1' openhands --help
c
this is very weird...
i just discover a very weird bug in agent-sdk that the tarball doesn't contains any code šŸ˜…
looking into this now
ty 1
Seems like using
openhands.sdk
as the import path is making it pretty hard to package it properly šŸ˜… looking into it now When i got the packaging working, the existing code won't work
nod 1
ty 1
ugh this is very tricky.. we probably won't be able to fix it today
ugh spending so much time & tokens, finally got it PyPI publish of Agent-SDK working šŸ˜… • CLI PR: https://github.com/All-Hands-AI/OpenHands/pull/11411 - it currently points to PyPI Test Index • SDK PR: https://github.com/All-Hands-AI/agent-sdk/pull/752 (changes the package structure, and fix a tricky `DiscriminativedUnionMixin` issue Would appreciate an šŸ‘€ on the SDK PR (cc @quick-window-91705 ) -- once that's in, I can cut another official PyPI release and update CLI to reference that -- This should fix our CLI binary issue
šŸ‘€ 1
q
Nice! Will take a look in a sec Meanwhile it seems like we won't be able to root level imports from openhands because of the shared namespace: https://openhands-ai.slack.com/archives/C08E1SYKEM9/p1760592687838739?thread_ts=1760581173.025539&cid=C08E1SYKEM9 E.g
from openhands import version
will have to be
from openhands.version import version
I think thats the only limitation we can't workaround but one we can live with
c
ideally we should just go with getting version for individual package going forward?
q
I worry about people accidently putting things there or putting the
__init__
file there that must be omitted. Maybe a test can cover that
nod 1
c
e.g., version from the sdk, app, cli
q
e.g., version from the sdk, app, cli
That sounds reasonable
q
Right the app project in the OpenHands repo is under the subdirectory
openhands
This project needs a version number which is typically defined in the
__init__.py
file but seems like that won't be possible (possibly due to namespace conflicts)