Skip to content

fix: accept remoteA2aAgent in GenericResourceOverwrite#1581

Merged
PopescuTudor merged 2 commits intomainfrom
feat/add-remotea2a-gen-res-overr
Apr 21, 2026
Merged

fix: accept remoteA2aAgent in GenericResourceOverwrite#1581
PopescuTudor merged 2 commits intomainfrom
feat/add-remotea2a-gen-res-overr

Conversation

@PopescuTudor
Copy link
Copy Markdown
Collaborator

Summary

Adds remoteA2aAgent to the accepted resource_type tags of GenericResourceOverwrite. Unblocks agents that reference Remote A2A resources — they currently fail to start in Alpha with a Pydantic union_tag_invalid error.

Root cause

Solutions containing Remote A2A resources emit runtime overwrites keyed by remoteA2aAgent.<name>[.<folder>] (see AgentHubService Kind.RemoteA2aAgent → serialized as camelCase remoteA2aAgent). At agent startup the runtime deserializes the overwrite map via ResourceOverwriteParser.parse, which validates each entry against the discriminated union ResourceOverwriteUnion.

The parser extracts remoteA2aAgent as the discriminator but the GenericResourceOverwrite.resource_type Literal only listed process | index | app | asset | bucket | mcpServer | queue. Pydantic rejects the tag → the whole overwrite batch fails → agent never starts.

Observed error (from Alpha job logs):

1 validation error for tagged-union[GenericResourceOverwrite, ..., EntityResourceOverwrite, ConnectionResourceOverwrite]
  Input tag 'remoteA2aAgent' found using 'resource_type' does not match any of the expected tags:
  'process', 'index', 'app', 'asset', 'bucket', 'mcpServer', 'queue', 'entity', 'connection'
  [type=union_tag_invalid, input_value={'resource_type': 'remote...', 'name': 'basica2a'}, input_type=dict]

Fix

Extend the Literal with "remoteA2aAgent". Remote A2A overwrites have the same name + folderPath shape as other generic resources, so no dedicated subclass is needed.

Bumps uipath-platform to 0.1.33.

What was missing from the original rollout

Remote A2A support was added across the stack — AgentA2aResourceConfig (agent.json authoring), a2a_tool.py in uipath-langchain-python, the langgraph wiring in uipath-agents-python, and the CRUD + proxy endpoints in AgentHubService. This overwrite binding was the one gap: the parser is the gate every agent runtime passes through at startup, regardless of whether the A2A code itself uses the override today.

Test plan

  • New test class TestRemoteA2aAgentResourceOverwrite covers:
    • Direct GenericResourceOverwrite(resource_type="remoteA2aAgent", ...) construction
    • ResourceOverwriteParser.parse(key="remoteA2aAgent.basica2a.solution_folder", ...) roundtrip
  • Full uipath test suite: 1786 passed, 0 failures
  • End-to-end validation in Alpha: deploy a solution containing a low-code agent with an A2A resource, start a job, confirm no union_tag_invalid error

Links

Observed in Alpha against low-code agent 2d2417eb-881b-4828-9018-f9eb7683c5dc with an A2A resource basica2a (external a2a-test-agent-192161339979.us-central1.run.app).

Solutions with Remote A2A agent resources send down runtime overwrites
keyed by 'remoteA2aAgent.<name>[.<folder>]'. The discriminated union in
ResourceOverwriteParser rejected the unknown tag, failing Pydantic
validation of the whole overwrite batch and preventing the agent from
starting with a 'union_tag_invalid' error.

Extend the Literal to include 'remoteA2aAgent' (same shape as other
generic name+folderPath overwrites). Bumps uipath-platform to 0.1.33.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the test:uipath-langchain Triggers tests in the uipath-langchain-python repository label Apr 21, 2026
@PopescuTudor PopescuTudor requested a review from radugheo April 21, 2026 15:15
@PopescuTudor PopescuTudor self-assigned this Apr 21, 2026
Missed in previous commit. CI failed with --locked mismatch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@PopescuTudor PopescuTudor merged commit 58adbab into main Apr 21, 2026
122 checks passed
@PopescuTudor PopescuTudor deleted the feat/add-remotea2a-gen-res-overr branch April 21, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants