[Feat]: Add QuerySkill() operation for runtime skill capability introspection#1655
[Feat]: Add QuerySkill() operation for runtime skill capability introspection#1655Srinivasoo7 wants to merge 4 commits intoa2aproject:mainfrom
Conversation
Summary of ChangesHello, 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 introduces a significant enhancement to the A2A protocol by enabling dynamic skill introspection through a new 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new QuerySkill RPC to allow for dynamic capability discovery between agents. The changes include a new ADR documenting the feature and the necessary additions to the a2a.proto file, such as the new RPC, messages, and an enum.
My review focuses on improving the clarity of the ADR and enhancing the flexibility and consistency of the new protobuf messages. I've emphasized using full context for enum values in the ADR for better clarity, aligning with documentation best practices. I've also suggested adopting google.protobuf.Struct for map-like fields to align with existing patterns in the protocol and support more complex data structures, and proposed making the new enum values in the proto more concise for better readability in JSON payloads.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a QuerySkill RPC to enable dynamic capability discovery in the A2A protocol, a significant improvement over relying on the static AgentCard. The changes include a new ADR, and updates to the a2a.proto file to define the new RPC, messages, and a capability flag. The implementation is well-structured and the ADR provides clear context. My feedback includes a suggestion to align a new protobuf enum with project conventions, and a reminder to update the main specification document to reflect these new changes.
| @@ -0,0 +1,28 @@ | |||
| # ADR 002: Dynamic Skill Introspection (`QuerySkill`) | |||
There was a problem hiding this comment.
This ADR is a great addition for documenting the new QuerySkill RPC. However, the main protocol specification document (docs/specification.md) also needs to be updated to reflect this change. Please ensure the new RPC is added to the list of core operations and the method mapping reference table to keep the documentation complete and discoverable for implementers.
| We will add a `QuerySkill` RPC to `a2a.proto` as a capability declaration, not a task execution. | ||
|
|
||
| The design has three layers: | ||
| 1. **Proto definition**: Add `SkillQueryRequest` and `SkillQueryResult` messages, and the `SkillSupportLevel` enum with values `SKILL_SUPPORT_LEVEL_SUPPORTED`, `SKILL_SUPPORT_LEVEL_PARTIAL`, and `SKILL_SUPPORT_LEVEL_UNSUPPORTED`. |
There was a problem hiding this comment.
The enum values mentioned here (SKILL_SUPPORT_LEVEL_SUPPORTED, etc.) are inconsistent with the current implementation in a2a.proto, which uses short names like SUPPORTED. While the names in this ADR correctly follow the project's enum naming convention (e.g., TASK_STATE_...), the implementation does not. This should be reconciled for consistency. I've added a suggestion on a2a.proto to align the implementation with this ADR and the project's conventions.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Description
This PR addresses the need for dynamic capability discovery in the A2A protocol. Currently, orchestrators rely on the static
AgentCard, which cannot represent multidimensional or runtime-specific constraints (e.g., "Can you process a 500MB audio file right now?").Several active discussions confirm real community pain - #883 , #773 , #921, #166 all describing the same root cause: no protocol-level mechanism exists for a client to probe whether a remote agent can handle a specific skill at runtime.
This PR introduces the
QuerySkillRPC to establish a proactive capability declaration standard prior to task execution.Changes:
QuerySkillRPC toA2AServiceina2a.protofor dynamic skill introspection.skill_queryboolean flag toAgentCapabilitiesso agents can explicitly declare support for this feature.SkillQueryRequestandSkillQueryResultmessages, including aSkillSupportLevelenum (SUPPORTED,PARTIAL,UNSUPPORTED).adr-002-queryskill.md) detailing the context, decision, consequences, and rejected alternatives.Details:
constraintsmap forPARTIALsupport levels.confidencefloat andreasonstring for probabilistic routing.cache_ttl_secondsto allow orchestrators to cache results (and utilizestale-if-errorsemantics), preventing theQuerySkillRPC from becoming a performance bottleneck.