-
Notifications
You must be signed in to change notification settings - Fork 137
Revise README for Agent Stack Server SDK #1711
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
Updated README to provide a comprehensive overview of the Agent Stack Server SDK, including installation instructions, key features, and usage examples. Signed-off-by: Jenna Winkler <[email protected]>
Summary of ChangesHello @jenna-winkler, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request provides a much-needed comprehensive update to the README.md for the Python SDK. The new content is well-structured and covers key aspects like installation, features, and a quickstart guide. I've provided a few suggestions on the quickstart code example to fix a bug and align it with Python best practices, ensuring new users have a smooth and correct starting point.
apps/agentstack-sdk-py/README.md
Outdated
| if __name__ == "__main__": | ||
| server.run( | ||
| host=os.getenv("HOST", "127.0.0.1"), | ||
| port=int(os.getenv("PORT", 8000)), |
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.
The os.getenv function's default value must be a string. Providing an integer 8000 will cause a TypeError if the PORT environment variable is not set. The default value should be a string, "8000", which is then converted to an integer.
| port=int(os.getenv("PORT", 8000)), | |
| port=int(os.getenv("PORT", "8000")), |
apps/agentstack-sdk-py/README.md
Outdated
| async def my_agent( | ||
| input: Message, | ||
| context: RunContext, | ||
| ): |
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.
The my_agent function is an async generator, but it lacks a return type hint. Adding a type hint makes the function's contract explicit, improving readability and enabling better static analysis. You'll need to import AsyncGenerator from collections.abc at the top of the file.
| async def my_agent( | |
| input: Message, | |
| context: RunContext, | |
| ): | |
| async def my_agent( | |
| input: Message, | |
| context: RunContext, | |
| ) -> "AsyncGenerator[str, None]": |
apps/agentstack-sdk-py/README.md
Outdated
| from agentstack_sdk.a2a.types import AgentMessage | ||
| await context.store(AgentMessage(text=response_text)) |
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.
According to PEP 8, imports should be at the top of the file. The import for AgentMessage should be moved to the top of the file with the other imports to improve readability and make dependencies clear. Please add from agentstack_sdk.a2a.types import AgentMessage at the top of the code block.
| from agentstack_sdk.a2a.types import AgentMessage | |
| await context.store(AgentMessage(text=response_text)) | |
| await context.store(AgentMessage(text=response_text)) |
Removed the 'Agent Wrapper' feature from the README. Signed-off-by: Jenna Winkler <[email protected]>
Refactor README to update agent definition and usage examples. Signed-off-by: Jenna Winkler <[email protected]>
Signed-off-by: Jenna Winkler <[email protected]>
Signed-off-by: Jenna Winkler <[email protected]>
Updated README to provide a comprehensive overview of the Agent Stack Server SDK, including installation instructions, key features, and usage examples.
Summary
Linked Issues
Documentation
If this PR adds new feature or changes existing. Make sure documentation is adjusted accordingly. If the docs is not needed, please explain why.