Skip to content

Conversation

@timn
Copy link
Member

@timn timn commented Dec 22, 2025

The AgentSkill in an A2A AgentCard expects examples to be a list of queries as strings. Therefore, agent examples, e.g., as provided by an ExampleTool, must be converted.

This change performs that extraction of just the inputs and converting them to a string to add to the AgentSkill.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Manual End-to-End (E2E) Tests:

Create an agent with ExampleTool and use agent card builder to create agent card for that agent. Fails without this change, succeeds with change included.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

The AgentSkill in an A2A AgentCard expects examples to be a list of
queries as strings. Therefore, agent examples, e.g., as provided by an
ExampleTool, must be converted.

This change performs that extraction of just the inputs and converting
them to a string to add to the AgentSkill.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @timn, 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 resolves an issue where agent examples, particularly those originating from ExampleTool, were not correctly formatted for A2A AgentCard's AgentSkill component. The change introduces a dedicated function to extract and convert these examples into a list of simple query strings, ensuring proper data ingestion and functionality when building agent cards. This fix is crucial for agents utilizing structured example formats to be correctly represented within the A2A framework.

Highlights

  • New Example Extraction Logic: Introduced a new utility function, _extract_inputs_from_examples, responsible for parsing and converting agent examples into the required list of query strings for AgentSkill.
  • Agent Card Builder Integration: Integrated the new example extraction function into both _build_llm_agent_skills and _build_non_llm_agent_skills to ensure that AgentSkill objects receive examples in the correct string format, resolving previous compatibility issues.
  • Comprehensive Unit Testing: Added new unit tests for _extract_inputs_from_examples to validate its behavior across various input scenarios, including plain text examples, structured examples from ExampleTool, and handling of None inputs.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@adk-bot adk-bot added the core [Component] This issue is related to the core interface and implementation label Dec 22, 2025
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 correctly adapts the agent card examples to be a list of strings by introducing the _extract_inputs_from_examples function. The changes are logical and well-tested. My review includes a suggestion to refactor the new function for better readability and robustness. I've also pointed out some minor issues in the new tests, such as an incorrect docstring, use of is instead of == for value comparison, and an unused variable.

@ryanaiagent ryanaiagent self-assigned this Dec 22, 2025
@ryanaiagent ryanaiagent added a2a [Component] This issue is related a2a support inside ADK. needs-review [Status] The PR is awaiting review from the maintainer and removed core [Component] This issue is related to the core interface and implementation labels Dec 23, 2025
@ryanaiagent
Copy link
Collaborator

Hi @timn , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Your PR has been received by the team and is currently under review. We will provide feedback as soon as we have an update to share.

@ryanaiagent
Copy link
Collaborator

ryanaiagent commented Dec 23, 2025

Hi @wyf7107 , can you please review this. LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a2a [Component] This issue is related a2a support inside ADK. needs-review [Status] The PR is awaiting review from the maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants