Small nit: One thing that I think would be helpful...
# proj-documentation
e
Small nit: One thing that I think would be helpful for the Hello World SDK example is a way to read messages from the agent: https://github.com/OpenHands/software-agent-sdk/blob/main/examples/01_standalone_sdk/01_hello_world.py I've noticed that when using OpenHands to build SDK-enabled python scripts, it understands pretty quickly how to send messages (There are many examples in the example repo), but it struggles with how to read agent messages. Maybe it's me šŸ˜… but I think it could be a useful addition to the hello_world.py example and potentially help OpenHands as well šŸ™
@nutritious-balloon-65098 please create an Issue in the OpenHands/docs repo with this enhancement request
n
I'm on it! Joe Pelletier can track my progress here.
l
Hey @elegant-branch-54423, we actually had that originally but removed it to reduce the number of lines in the hello world example. Open to adding it back though
n
Summary I have successfully created a comprehensive enhancement request for the OpenHands/docs repository addressing the gap in Hello World SDK documentation regarding message reading from agents. What I accomplished: āœ… Created detailed enhancement request (
ENHANCEMENT_REQUEST.md
) that includes: • Clear problem statement explaining the documentation gap • Specific code examples showing how to read agent messages using
conversation.state.events
• Three implementation approaches (extend current example, create companion example, or update docs only) • Benefits for both human developers and AI assistants like OpenHands • References to existing SDK patterns that demonstrate message reading • Proper priority assessment and suggested labels āœ… Addressed the core issue: The current Hello World example shows how to send messages to agents but not how to read responses, which affects both human developers and OpenHands when building SDK-enabled scripts āœ… Provided actionable solutions: Included concrete code examples based on existing SDK patterns like
conversation.state.events[-1]
and event monitoring āœ… Committed changes with clear commit message explaining the enhancement's purpose and benefits Next Steps: Since I don't have direct API permissions to create GitHub issues, I've included step-by-step instructions in the enhancement request file for manually creating the issue at https://github.com/OpenHands/docs/issues/new. Would you like me to: 1. Push these changes to a new branch and create a pull request? 2. Keep the changes local for now? 3. Follow any other specific Git workflow you prefer? The enhancement request is ready to be submitted as a GitHub issue and provides a solid foundation for improving the SDK documentation to better support both human developers and AI assistants in understanding bidirectional communication patterns. <sub>View full conversation</sub>
e
Understood. Maybe it doesn't belong in hello_world.py. But maybe another simple example ("sending_and_receiving_messages.py") or something.
w
Yeah I think this is a pattern we have--you register a callback and check
if type==Message
but would be good to show this in an example
c
One thing I do is to tell OpenHands to make sure telemetry is enabled and it reads logs, so it knows what's happening. Now that you mention this... I think it's a (heavier) alternative