AgentEngineConfig.agent_framework Literal rejects "a2a" — out of sync with _SUPPORTED_AGENT_FRAMEWORKS and the GA A2A template
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with vertexai/_genai/types/common.py and inspect the AgentEngineConfig, Dict twin, and update-config variants named in the report, comparing them with _SUPPORTED_AGENT_FRAMEWORKS in vertexai/_genai/_agent_engines_utils.py. Reproduce the shown agent_engines.create configuration, then run the relevant existing validation tests; done means agent_framework="a2a" is accepted consistently without weakening validation.
Written by the indexing model from the issue text.
Description
Environment
google-cloud-aiplatform1.159.0 → 1.165.1 (still present onmain)- GenAI client path:
vertexai.Client().agent_engines
Bug
A2A on Agent Engine is a supported framework: _SUPPORTED_AGENT_FRAMEWORKS includes "a2a", the A2aAgent template sets agent_framework = "a2a" (since 1.147.0), the A2A framework template is GA (CHANGELOG 1.150.0), and the backend API accepts spec.agent_framework = "a2a".
But the config type was never updated to match:
# vertexai/_genai/types/common.py
agent_framework: Optional[
Literal["google-adk", "langchain", "langgraph", "ag2", "llama-index", "custom"]
]
"a2a" is missing from the Literal (in AgentEngineConfig, its Dict twin, and the update-config variants), so passing it raises a Pydantic validation error, while the same package accepts it internally:
# vertexai/_genai/_agent_engines_utils.py (~line 167)
_SUPPORTED_AGENT_FRAMEWORKS = frozenset(
["google-adk", "langchain", "langgraph", "ag2", "llama-index", "custom", "a2a"]
)
Steps to reproduce
import vertexai
client = vertexai.Client(project="...", location="us-central1")
client.agent_engines.create(
agent=my_agent,
config={"staging_bucket": "gs://...", "agent_framework": "a2a"},
)
# pydantic ValidationError: Input should be 'google-adk', 'langchain',
# 'langgraph', 'ag2', 'llama-index' or 'custom'
Expected behavior
agent_framework="a2a" accepted in the config, consistent with _SUPPORTED_AGENT_FRAMEWORKS, the A2aAgent template, and the backend API.
Workaround
Set the fields on the agent object instead of the config: use the A2aAgent template, or set my_agent.agent_framework = "a2a" before create() — _get_agent_framework(agent) reads the attribute and bypasses the config Literal.
Related
#6267 (classic ReasoningEngine.create path missing agent_framework support) — this issue is about the GenAI client config type being out of sync.
- Dominant language
- Python
- Stars
- 907
- Forks
- 467
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 44
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleapis/python-aiplatform
-
api: vertex-ai
Difficulty 1/5 Under an hour Newbie friendliness 85/100
googleapis/python-aiplatform#7132 ·
-
CustomContainerTrainingJob.run drops max_wait_duration=0 instead of requesting indefinite DWS wait Openapi: vertex-ai
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
googleapis/python-aiplatform#7067 · 1 comment ·
-
api: vertex-ai
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
googleapis/python-aiplatform#6877 ·
-
api: vertex-ai
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
googleapis/python-aiplatform#6865 · 1 comment ·
-
api: vertex-ai
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/python-aiplatform#6822 · 2 reactions ·
All issues in googleapis/python-aiplatform
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
use-agent-os/agent-os#3314 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AiursoftWeb/AnduinOS-2#19 ·