Skip to content

Commit 79c3b1c

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
fix: update default input and output modes in create_agent_card
PiperOrigin-RevId: 833561382
1 parent f7e718f commit 79c3b1c

File tree

1 file changed

+6
-2
lines changed
  • vertexai/preview/reasoning_engines/templates

1 file changed

+6
-2
lines changed

vertexai/preview/reasoning_engines/templates/a2a.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ def create_agent_card(
5353
description: Optional[str] = None,
5454
skills: Optional[List["AgentSkill"]] = None,
5555
agent_card: Optional[Dict[str, Any]] = None,
56+
default_input_modes: Optional[List[str]] = None,
57+
default_output_modes: Optional[List[str]] = None,
5658
) -> "AgentCard":
5759
"""Creates an AgentCard object.
5860
@@ -67,6 +69,8 @@ def create_agent_card(
6769
description (Optional[str]): A description of the agent.
6870
skills (Optional[List[AgentSkill]]): A list of AgentSkills.
6971
agent_card (Optional[Dict[str, Any]]): Agent Card as a dictionary.
72+
default_input_modes (Optional[List[str]]): A list of default input modes.
73+
default_output_modes (Optional[List[str]]): A list of default output modes.
7074
7175
Returns:
7276
AgentCard: A fully constructed AgentCard object.
@@ -88,8 +92,8 @@ def create_agent_card(
8892
description=description,
8993
url="http://localhost:9999/",
9094
version="1.0.0",
91-
default_input_modes=["text"],
92-
default_output_modes=["text"],
95+
default_input_modes=default_input_modes or ["text/plain"],
96+
default_output_modes=default_output_modes or ["application/json"],
9397
# Agent Engine does not support streaming yet
9498
capabilities=AgentCapabilities(streaming=False),
9599
skills=skills,

0 commit comments

Comments
 (0)