Skip to content

Conversation

@nan-yu
Copy link
Collaborator

@nan-yu nan-yu commented Jan 28, 2026

Description

It updates the sample to use the A2uiSchemaManager from the a2ui-agent python SDK.

Tested:

  • The contact angular client successfully connected to the contact_multiple_surfaces agent and rendered the response correctly.

contact_multiple_surfaces

Pre-launch Checklist

If you need help, consider asking for advice on the discussion board.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 new a2ui-agent Python package with a centralized A2uiSchemaManager for handling A2UI schemas. This is a great architectural improvement, moving away from hardcoded schemas in the sample agents. The manager provides robust, multi-layered logic for loading schemas from package resources or the source repository, and includes functionality for bundling, pruning, and validating schemas. The sample agents (contact_lookup and contact_multiple_surfaces) are refactored to use this new manager, simplifying their code and making them more maintainable. The changes also include a Hatch build hook to package the schema files correctly and new tests for the added functionality.

I've found a couple of issues: one in a __main__ block in contact_lookup/prompt_builder.py that would cause a TypeError if run directly, and a logic error in contact_multiple_surfaces/agent.py where a check for a loaded schema was referencing a method instead of a property. I've provided suggestions to fix both. Overall, this is a well-executed and beneficial refactoring.

@nan-yu nan-yu force-pushed the update-contact-multiple-surfaces-sample branch 2 times, most recently from a2cc041 to 3eb5cf5 Compare January 28, 2026 20:55
@nan-yu nan-yu force-pushed the update-contact-multiple-surfaces-sample branch 4 times, most recently from a76909c to 09e6b06 Compare February 12, 2026 00:05
@gspencergoog
Copy link
Collaborator

/gemini summary

@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

- 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.
Tested:
- [x] The contact_lookup client successfully connected to the contact_lookup
agent and rendered the response correctly.
Introduces a `schema_modifiers` parameter to A2uiSchemaManager, allowing
custom callable hooks to transform schemas after loading. This enables
flexible schema customization, such as relaxing strict validation
constraints during testing.
It updates the sample to use the A2uiSchemaManager from the a2ui-agent
python SDK.

Tested:
- [x] The `contact` lit client successfully connected to the
  `contact_multiple_surfaces` agent and rendered the response correctly.
@nan-yu nan-yu force-pushed the update-contact-multiple-surfaces-sample branch from 09e6b06 to 53244c8 Compare February 12, 2026 18:10
@nan-yu nan-yu requested a review from zeroasterisk as a code owner February 12, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants