Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions tests/unit/vertexai/test_genai_types.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest

from vertexai._genai import types


@pytest.mark.parametrize(
"config_type",
[types.AgentEngineConfig, types.CreateAgentEngineConfig, types.UpdateAgentEngineConfig],
)
def test_agent_engine_configs_accept_a2a_framework(config_type):
config = config_type(agent_framework="a2a")

assert config.agent_framework == "a2a"
72 changes: 60 additions & 12 deletions vertexai/_genai/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -8885,13 +8885,21 @@ class CreateAgentEngineConfig(_common.BaseModel):
""",
)
agent_framework: Optional[
Literal["google-adk", "langchain", "langgraph", "ag2", "llama-index", "custom"]
Literal[
"google-adk",
"langchain",
"langgraph",
"ag2",
"llama-index",
"custom",
"a2a",
]
] = Field(
default=None,
description="""The agent framework to be used for the Agent Engine.
The OSS agent framework used to develop the agent.
Currently supported values: "google-adk", "langchain", "langgraph",
"ag2", "llama-index", "custom".
"ag2", "llama-index", "custom", "a2a".
If not specified:
- If `agent` is specified, the agent framework will be auto-detected.
- If `source_packages` is specified, the agent framework will
Expand Down Expand Up @@ -9031,12 +9039,20 @@ class CreateAgentEngineConfigDict(TypedDict, total=False):
"""

agent_framework: Optional[
Literal["google-adk", "langchain", "langgraph", "ag2", "llama-index", "custom"]
Literal[
"google-adk",
"langchain",
"langgraph",
"ag2",
"llama-index",
"custom",
"a2a",
]
]
"""The agent framework to be used for the Agent Engine.
The OSS agent framework used to develop the agent.
Currently supported values: "google-adk", "langchain", "langgraph",
"ag2", "llama-index", "custom".
"ag2", "llama-index", "custom", "a2a".
If not specified:
- If `agent` is specified, the agent framework will be auto-detected.
- If `source_packages` is specified, the agent framework will
Expand Down Expand Up @@ -9552,13 +9568,21 @@ class UpdateAgentEngineConfig(_common.BaseModel):
""",
)
agent_framework: Optional[
Literal["google-adk", "langchain", "langgraph", "ag2", "llama-index", "custom"]
Literal[
"google-adk",
"langchain",
"langgraph",
"ag2",
"llama-index",
"custom",
"a2a",
]
] = Field(
default=None,
description="""The agent framework to be used for the Agent Engine.
The OSS agent framework used to develop the agent.
Currently supported values: "google-adk", "langchain", "langgraph",
"ag2", "llama-index", "custom".
"ag2", "llama-index", "custom", "a2a".
If not specified:
- If `agent` is specified, the agent framework will be auto-detected.
- If `source_packages` is specified, the agent framework will
Expand Down Expand Up @@ -9707,12 +9731,20 @@ class UpdateAgentEngineConfigDict(TypedDict, total=False):
"""

agent_framework: Optional[
Literal["google-adk", "langchain", "langgraph", "ag2", "llama-index", "custom"]
Literal[
"google-adk",
"langchain",
"langgraph",
"ag2",
"llama-index",
"custom",
"a2a",
]
]
"""The agent framework to be used for the Agent Engine.
The OSS agent framework used to develop the agent.
Currently supported values: "google-adk", "langchain", "langgraph",
"ag2", "llama-index", "custom".
"ag2", "llama-index", "custom", "a2a".
If not specified:
- If `agent` is specified, the agent framework will be auto-detected.
- If `source_packages` is specified, the agent framework will
Expand Down Expand Up @@ -20352,13 +20384,21 @@ class AgentEngineConfig(_common.BaseModel):
""",
)
agent_framework: Optional[
Literal["google-adk", "langchain", "langgraph", "ag2", "llama-index", "custom"]
Literal[
"google-adk",
"langchain",
"langgraph",
"ag2",
"llama-index",
"custom",
"a2a",
]
] = Field(
default=None,
description="""The agent framework to be used for the Agent Engine.
The OSS agent framework used to develop the agent.
Currently supported values: "google-adk", "langchain", "langgraph",
"ag2", "llama-index", "custom".
"ag2", "llama-index", "custom", "a2a".
If not specified:
- If `agent` is specified, the agent framework will be auto-detected.
- If `source_packages` is specified, the agent framework will
Expand Down Expand Up @@ -20548,12 +20588,20 @@ class AgentEngineConfigDict(TypedDict, total=False):
"""

agent_framework: Optional[
Literal["google-adk", "langchain", "langgraph", "ag2", "llama-index", "custom"]
Literal[
"google-adk",
"langchain",
"langgraph",
"ag2",
"llama-index",
"custom",
"a2a",
]
]
"""The agent framework to be used for the Agent Engine.
The OSS agent framework used to develop the agent.
Currently supported values: "google-adk", "langchain", "langgraph",
"ag2", "llama-index", "custom".
"ag2", "llama-index", "custom", "a2a".
If not specified:
- If `agent` is specified, the agent framework will be auto-detected.
- If `source_packages` is specified, the agent framework will
Expand Down