-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Fix: Handled AgentCardBuilder field inconsistencies #2099
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
base: main
Are you sure you want to change the base?
Fix: Handled AgentCardBuilder field inconsistencies #2099
Conversation
|
@seanzhou1023 Please help review. |
ce86765 to
c0da47b
Compare
|
Hello @seanzhou1023! Sorry for bothering. Please have a look on this fix when you find some time! |
| assert result.name == "test_agent" | ||
| assert result.description == "An ADK Agent" # Default description | ||
| # The source code uses doc_url parameter but AgentCard expects documentation_url | ||
| # Since the source code doesn't map doc_url to documentation_url, it will be None |
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.
can you update this comment as well?
|
Hi @SyedMohamedHyder ,Thank you for your contribution! |
Summary of Changes
This PR makes a few small improvements to the experimental Agent Card Builder feature:
AgentCardandAgentSkillfields to use snake_case instead of camelCase, in line with the project's conventions.doc_urlfield, which is not defined in theAgentCardmodel todocumentation_url.Rationale
Although this feature is still experimental, these changes help improve consistency and clarity:
The models currently allow camelCase access only for backwards compatibility and issue a deprecation warning when used. These aliases are planned to be removed in version 0.3.0. Updating to snake_case ensures the code aligns with the intended usage and avoids deprecation warnings. Below is the corresponding code from a2a-sdk.
Since
doc_urlisn’t a valid field onAgentCard, replacing it withdocumentation_urlhelps prevent confusion and ensures only supported fields are used.I have also updated the unit tests to ensure they correctly reflect the current model structure and remain reliable over time.
These are relatively minor changes, but I hope they help keep the codebase clean and aligned with the project's direction. Feedback is always welcome.