-
Notifications
You must be signed in to change notification settings - Fork 838
Update contact lookup sample #559
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?
Conversation
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 introduces a significant and well-structured refactoring to create a centralized a2ui-agent package for managing A2UI schemas. The changes include a build-time hook to package schema files, a robust schema manager with fallback loading mechanisms, and a validator. The contact lookup sample has been updated to use this new package, which greatly improves maintainability and decouples the agent from hardcoded schemas. The overall approach is excellent. I've identified a few critical and high-severity issues related to exception handling and a NameError that could break the code at runtime, along with some medium-severity suggestions to improve the robustness of the build script and validation logic.
a2a_agents/python/a2ui_agent/src/a2ui/inference/schema/manager.py
Outdated
Show resolved
Hide resolved
a2a_agents/python/a2ui_agent/src/a2ui/inference/schema/manager.py
Outdated
Show resolved
Hide resolved
a2a_agents/python/a2ui_agent/src/a2ui/inference/schema/manager.py
Outdated
Show resolved
Hide resolved
6bc12ec to
6714d4f
Compare
557fe78 to
7f8af23
Compare
- Add a base InferenceStrategy class - Add PackSpecsBuildHook to copy JSON schemas into the package during build time. - Update pyproject.toml to include assets and configure the build hook. - Implement A2uiSchemaManager for robust schema loading, pruning, and prompt generation.
7f8af23 to
187797d
Compare
Tested: - [x] The contact_lookup client successfully connected to the contact_lookup agent and rendered the response correctly.
187797d to
91121f2
Compare
Tested:
Description
Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
List which issues are fixed by this PR. For larger changes, raising an issue first helps reduce redundant work.
Pre-launch Checklist
If you need help, consider asking for advice on the discussion board.