-
Notifications
You must be signed in to change notification settings - Fork 4
Initial SDK docs & automatic way to sync agent-sdk example code #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
sdk/getting-started.mdx
Outdated
|
|
||
| Create a file `hello_agent.py`: | ||
|
|
||
| ```python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this reference the first, hello world, example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are absolute right! (sonnet face)
@OpenHands please review examples/01_standalone_sdk/01_hello_world.py and update sdk/getting-started.mdx to reference the example there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on it! xingyaoww can track my progress at all-hands.dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
I've successfully updated sdk/getting-started.mdx to reference the actual hello world example from the agent-sdk repository, addressing @enyst's comment on PR #32.
Changes Made:
✅ Replaced inline code with example reference: Changed the code block format from a generic inline example to use the special syntax ````python icon="python" expandable examples/01_standalone_sdk/01_hello_world.pythat enables automatic syncing via thesync_code_blocks.py` workflow.
✅ Updated code content: Replaced the simplified inline example with the actual content from examples/01_standalone_sdk/01_hello_world.py, which includes:
- Correct import path:
openhands.tools.preset.default(notopenhands.sdk.preset.default) - Additional LLM configuration options:
base_url,usage_id, and model environment variable - Proper workspace initialization pattern
- More realistic task example
✅ Updated instructions: Changed the run command to reference the actual example file path and updated the description to match what the example does.
✅ Removed redundancy: Removed the duplicate reference link at the end since the code block now directly references the example file.
Result:
The documentation will now automatically stay in sync with the agent-sdk repository's hello world example through the automated workflow. The changes have been committed and pushed to the sdk branch, updating PR #32.
Commit: 6133057 - "docs: reference hello world example from agent-sdk"
|
Summary of my work on /codereview-roasted for PR #32 (branch sdk) What I did
Top blockers (must-fix before merge)
Important improvements (should fix)
Style/consistency notes
Verdict Key insight If you want, I can implement these fixes on sdk and re-run the checks. |
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
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>
enyst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if GPT-5 is correct or not, but I had it make a PR anyway, not modify this branch directly.
Up to you if you want to merge and deal with its proposals later, I looked though the deployment and it's beautiful!
Summary of changes