Skip to content

fix: keep context tool backwards-compatible with pre-v48 agent bundles#828

Open
milind-jain-uipath wants to merge 2 commits intomainfrom
fix/context-type-backcompat
Open

fix: keep context tool backwards-compatible with pre-v48 agent bundles#828
milind-jain-uipath wants to merge 2 commits intomainfrom
fix/context-type-backcompat

Conversation

@milind-jain-uipath
Copy link
Copy Markdown
Contributor

@milind-jain-uipath milind-jain-uipath commented May 7, 2026

Summary

PR #726 (Data Fabric tool support) added assert resource.context_type is not None at the top of create_context_tool. Agents packaged with storage-schema < v48 don't carry a contextType field — at runtime they hit this assert and fail to start.

This is a backwards-compatibility regression: uipath-langchain-python must accept all historical agent schema versions, since older customer bundles (packaged with older clients) flow through the runtime without the v48 TypeScript migration ever running.

Why removing the assert is safe

  • The downstream if resource.context_type == AgentContextType.DATA_FABRIC_ENTITY_SET check already evaluates False when context_type is None, so legacy bundles never enter the DataFabric branch (which is correct — DataFabric is v48-only).
  • The remaining handlers — handle_semantic_search, handle_deep_rag, handle_batch_transform — never read context_type. They dispatch on settings.retrieval_mode, which legacy v47 bundles always populate.
  • Net effect on legacy bundles: identical to pre-feat: add Data Fabric tool support #726 behaviour.

Test plan

  • Added regression tests in TestCreateContextTool covering context_type=None for both semantic search and deep RAG paths
  • uv run pytest tests/agent/tools/test_context_tool.py — 87/87 pass
  • uv run ruff check — clean

Manual end-to-end testing

1. Download an agent with a context-grounding tool

Created an agent in Agent Builder with a TestIndex context-grounding resource attached, then pulled the project locally:

uv run --project ../uipath-agents-python uipath pull

2. Modify the bundle to simulate a legacy (pre-v48) shape

Inlined the resource into agent.json.resources and removed contextType. Both top-level agent.json and the cached .agent-builder/agent.json were edited (the runtime restores the top-level from the cached copy on each invocation):

jq -s '.[0] + {resources: [.[1] + {isEnabled: true} | del(.contextType)]}' \
  .agent-builder/agent.json resources/TestIndex/resource.json > agent.json
cp agent.json .agent-builder/agent.json

Resulting resource entry in agent.json:

"resources": [
  {
    "$resourceType": "context",
    "name": "TestIndex",
    "description": "TestIndex",
    "folderPath": "solution_folder",
    "indexName": "TestIndex",
    "id": "...",
    "referenceKey": "...",
    "settings": {
      "query": { "description": "...", "variant": "dynamic" },
      "folderPathPrefix": { "variant": "static" },
      "threshold": 0,
      "resultCount": 3,
      "retrievalMode": "semantic",
      "fileExtension": { "value": "All" }
    },
    "isEnabled": true
  }
]

3. Run with main (assert intact)

git -C ../uipath-langchain-python checkout main
uv run --project ../uipath-agents-python uipath run agent.json '{}'

Result: ❌ AgentStartupError caused by AssertionError at context_tool.py:153.

Full output (main)
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
      Built uipath-langchain @ file:///Users/jm/repos/Eval-Agent/uipath-langchain-python
Uninstalled 1 package in 1ms
Installed 1 package in 2ms
Initializing AgentsRuntimeFactory for command run
Copied bindings.json to /private/tmp/legacy-test/bindings.json
Copied agent.json to /private/tmp/legacy-test/agent.json
Copied entry-points.json to /private/tmp/legacy-test/entry-points.json
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/agentsruntime_/api/featureFlags "HTTP/1.1 200 OK"
UiPathConfig: ConfigurationManager(project_id=None, folder_key=None, folder_path=None, base_url='https://alpha.uipath.com/datafabric/ab', tenant_id='7d7a7036-7312-4663-8f88-1ed3d7a793f1', organization_id='f4b9d127-5680-40ff-a562-f76fbdb50ca7', job_key=None, process_uuid=None, process_version=None)
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/agentsruntime_/api/featureFlags "HTTP/1.1 200 OK"
Prefetched feature flags: {'FilePiiMaskingEnabled': True}
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/agentsruntime_/api/featureFlags "HTTP/1.1 200 OK"
HTTP Request: GET https://alpha.uipath.com/datafabric/ab/agenthub_/llm/api/discovery "HTTP/1.1 200 OK"
HTTP Request: GET https://alpha.uipath.com/datafabric/ab/agenthub_/llm/api/capabilities "HTTP/1.1 200 OK"
Token sub_type='user'
RunAsMe decision: is_conversational=False, is_user_token=True, run_as_me=False
Creating tools for agent 'Agent' from resources
Creating tool for resource 'TestIndex' of type 'AgentContextResourceConfig'
▶ START
track_event called: AgentRun.Start, properties: {'AgentName': 'Agent', 'AgentId': '90a56e2a-f6be-4faa-9a7e-4b764ac7c28b', 'TraceId': '862bd6bbac3bc7e8ce4f8aa50a76cd03', 'AgentRunId': 'e0a6f714-d0b3-4e91-a1a8-55e4a086f3bd', 'Model': 'gpt-4o-2024-11-20', 'MaxTokens': '16384', 'Temperature': '0.0', 'Engine': 'basic-v2', 'MaxIterations': '25', 'IsConversational': 'False', 'AgentVersion': '1.1.0', 'Mode': 'standard', 'AgentRunSource': 'runtime', 'ApplicationName': 'UiPath.AgentService', 'Runtime': 'URT', 'UiPathAgentsPackageVersion': '0.0.0', 'CloudOrganizationId': 'f4b9d127-5680-40ff-a562-f76fbdb50ca7', 'CloudTenantId': '7d7a7036-7312-4663-8f88-1ed3d7a793f1', 'JobId': None, 'CloudUserId': '9b7f03dc-4547-4af3-8e01-a4ee1d651773', 'AgentType': 'LowCode', 'ImageVersion': None}
_track_event completed for: AgentRun.Start
track_event called: AgentRun.Failed, properties: {'AgentName': 'Agent', 'Status': 'Failed', 'ErrorMessage': 'An unexpected error occurred during agent startup, please try again later or contact your Administrator.\nError Details:\n', 'ErrorType': 'AgentStartupError', 'Timestamp': '2026-05-07T10:36:25.726289+00:00', 'ErrorCode': 'AGENT_STARTUP.UNEXPECTED_ERROR', 'ErrorTitle': 'Unexpected Error', 'ErrorCategory': 'Unknown', 'ErrorTraceback': 'Traceback (most recent call last):\n  File "/Users/jm/repos/Eval-Agent/uipath-agents-python/src/uipath_agents/_cli/runtime/factory.py", line 171, in new_runtime\n    compiled_graph = await self._resolve_and_compile_graph(\n                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/Users/jm/repos/Eval-Agent/uipath-langchain-python/src/uipath_langchain/runtime/factory.py", line 216, in _resolve_and_compile_graph\n    loaded_graph = await self._load_graph(entrypoint, **kwargs)\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/Users/jm/repos/Eval-Agent/uipath-agents-python/src/uipath_agents/_cli/runtime/factory.py", line 601, in _load_graph\n    graph, disposables = await build_agent_graph(\n                         ^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/Users/jm/repos/Eval-Agent/uipath-agents-python/src/uipath_agents/agent_graph_builder/graph.py", line 124, in build_agent_graph\n    tools = await create_tools_from_resources(agent_definition, llm)\n            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/Users/jm/repos/Eval-Agent/uipath-langchain-python/src/uipath_langchain/agent/tools/tool_factory.py", line 75, in create_tools_from_resources\n    tool = await _build_tool_for_resource(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/Users/jm/repos/Eval-Agent/uipath-langchain-python/src/uipath_langchain/agent/tools/tool_factory.py", line 106, in _build_tool_for_resource\n    return create_context_tool(resource, llm=llm, agent=agent)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/Users/jm/repos/Eval-Agent/uipath-langchain-python/src/uipath_langchain/agent/tools/context_tool.py", line 153, in create_context_tool\n    assert resource.context_type is not None\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File "/Users/jm/repos/Eval-Agent/uipath-agents-python/src/uipath_agents/_observability/instrumented_runtime.py", line 403, in _agent_span_context\n    yield agent_span\n  File "/Users/jm/repos/Eval-Agent/uipath-agents-python/src/uipath_agents/_observability/instrumented_runtime.py", line 216, in stream\n    async for event in self._delegate.stream(input, options):\n  File "/Users/jm/repos/Eval-Agent/uipath-agents-python/src/uipath_agents/_cli/runtime/reporter.py", line 47, in stream\n    raise self._error\nuipath_langchain.agent.exceptions.exceptions.AgentStartupError: An unexpected error occurred during agent startup, please try again later or contact your Administrator.\nError Details:\n\n', 'AgentId': '90a56e2a-f6be-4faa-9a7e-4b764ac7c28b', 'DurationMs': 1, 'AgentRunId': 'e0a6f714-d0b3-4e91-a1a8-55e4a086f3bd', 'Model': 'gpt-4o-2024-11-20', 'MaxTokens': '16384', 'Temperature': '0.0', 'Engine': 'basic-v2', 'MaxIterations': '25', 'IsConversational': 'False', 'AgentVersion': '1.1.0', 'Mode': 'standard', 'AgentRunSource': 'runtime', 'ApplicationName': 'UiPath.AgentService', 'Runtime': 'URT', 'UiPathAgentsPackageVersion': '0.0.0', 'CloudOrganizationId': 'f4b9d127-5680-40ff-a562-f76fbdb50ca7', 'CloudTenantId': '7d7a7036-7312-4663-8f88-1ed3d7a793f1', 'JobId': None, 'CloudUserId': '9b7f03dc-4547-4af3-8e01-a4ee1d651773', 'AgentType': 'LowCode', 'ImageVersion': None}
_track_event completed for: AgentRun.Failed
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/llmopstenant_/api/Traces/spans?traceId=862bd6bbac3bc7e8ce4f8aa50a76cd03&source=Robots "HTTP/1.1 400 Bad Request"
Attempt 1 failed with status code 400: {"code":"OPS0006","errorMessage":"The spans field is required.; The JSON value could not be converted to System.Nullable`1[System.Guid]. Path: $[0].FolderKey | LineNumber: 0 | BytePositionInLine: 1189.","requestId":"0466c81801bdf9c90b563673eb6d9745","isSuccessful":false,"status":0}
Failed to upsert span Agent run - Agent with final status
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/llmopstenant_/api/Traces/spans?traceId=862bd6bbac3bc7e8ce4f8aa50a76cd03&source=Robots "HTTP/1.1 400 Bad Request"
Attempt 1 failed with status code 400: {"code":"OPS0006","errorMessage":"The spans field is required.; The JSON value could not be converted to System.Nullable`1[System.Guid]. Path: $[0].FolderKey | LineNumber: 0 | BytePositionInLine: 1402.","requestId":"292230f4eac267f8d862cbebbb65964d","isSuccessful":false,"status":0}
Failed to upsert span Agent run - Agent with final status
❌ Error: Unexpected error occurred - An unexpected error occurred during agent startup, please try again later or contact your Administrator.
Error Details:

Traceback (most recent call last):
  File "/Users/jm/repos/Eval-Agent/uipath-python/packages/uipath/src/uipath/_cli/cli_run.py", line 251, in run
    asyncio.run(execute())
  File "/opt/homebrew/Cellar/python@3.12/3.12.11/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.11/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.11/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/jm/repos/Eval-Agent/uipath-python/packages/uipath/src/uipath/_cli/cli_run.py", line 242, in execute
    ctx.result = await debug_runtime(ctx, runtime)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jm/repos/Eval-Agent/uipath-python/packages/uipath/src/uipath/_cli/cli_run.py", line 162, in debug_runtime
    async for event in runtime.stream(ctx.get_input(), options=options):
  File "/Users/jm/repos/Eval-Agent/uipath-agents-python/src/uipath_agents/_observability/instrumented_runtime.py", line 216, in stream
    async for event in self._delegate.stream(input, options):
  File "/Users/jm/repos/Eval-Agent/uipath-agents-python/src/uipath_agents/_cli/runtime/reporter.py", line 47, in stream
    raise self._error
uipath_langchain.agent.exceptions.exceptions.AgentStartupError: An unexpected error occurred during agent startup, please try again later or contact your Administrator.
Error Details:

4. Run with this branch (assert removed)

git -C ../uipath-langchain-python checkout fix/context-type-backcompat
uv run --project ../uipath-agents-python uipath run agent.json '{}'

Result: ✓ Status: Completed, agent runs to end normally.

Full output (fix/context-type-backcompat)
Already on 'fix/context-type-backcompat'
Your branch is up to date with 'origin/fix/context-type-backcompat'.
Initializing AgentsRuntimeFactory for command run
Copied bindings.json to /private/tmp/legacy-test/bindings.json
Copied agent.json to /private/tmp/legacy-test/agent.json
Copied entry-points.json to /private/tmp/legacy-test/entry-points.json
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/agentsruntime_/api/featureFlags "HTTP/1.1 200 OK"
UiPathConfig: ConfigurationManager(project_id=None, folder_key=None, folder_path=None, base_url='https://alpha.uipath.com/datafabric/ab', tenant_id='7d7a7036-7312-4663-8f88-1ed3d7a793f1', organization_id='f4b9d127-5680-40ff-a562-f76fbdb50ca7', job_key=None, process_uuid=None, process_version=None)
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/agentsruntime_/api/featureFlags "HTTP/1.1 200 OK"
Prefetched feature flags: {'FilePiiMaskingEnabled': True}
HTTP Request: GET https://alpha.uipath.com/datafabric/ab/agenthub_/llm/api/discovery "HTTP/1.1 200 OK"
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/agentsruntime_/api/featureFlags "HTTP/1.1 200 OK"
HTTP Request: GET https://alpha.uipath.com/datafabric/ab/agenthub_/llm/api/capabilities "HTTP/1.1 200 OK"
Token sub_type='user'
RunAsMe decision: is_conversational=False, is_user_token=True, run_as_me=False
Creating tools for agent 'Agent' from resources
Creating tool for resource 'TestIndex' of type 'AgentContextResourceConfig'
HTTP Request: GET https://alpha.uipath.com/datafabric/ab/orchestrator_/odata/Users/UiPath.Server.Configuration.OData.GetCurrentUserExtended?$expand=PersonalWorkspace "HTTP/1.1 200 OK"
LicensedRuntime initialized: model='gpt-4o-2024-11-20', is_conversational=False, is_resume=False, licensing_context=None
▶ START
track_event called: AgentRun.Start, properties: {'AgentName': 'Agent', 'AgentId': '90a56e2a-f6be-4faa-9a7e-4b764ac7c28b', 'TraceId': '86b443bb129e50de4b481e806b13eca1', 'AgentRunId': 'd540db63-8370-4d29-94e5-66c0974e3349', 'Model': 'gpt-4o-2024-11-20', 'MaxTokens': '16384', 'Temperature': '0.0', 'Engine': 'basic-v2', 'MaxIterations': '25', 'IsConversational': 'False', 'AgentVersion': '1.1.0', 'Mode': 'standard', 'AgentRunSource': 'runtime', 'ApplicationName': 'UiPath.AgentService', 'Runtime': 'URT', 'UiPathAgentsPackageVersion': '0.0.0', 'CloudOrganizationId': 'f4b9d127-5680-40ff-a562-f76fbdb50ca7', 'CloudTenantId': '7d7a7036-7312-4663-8f88-1ed3d7a793f1', 'JobId': None, 'CloudUserId': '9b7f03dc-4547-4af3-8e01-a4ee1d651773', 'AgentType': 'LowCode', 'FolderKey': 'd7257953-5757-46b0-87e3-97aa9f184ac1', 'ImageVersion': None}
_track_event completed for: AgentRun.Start
● init
state
├── messages (list, 2 items)
│   ├── #0 (dict)
│   │   ├── content:
│   │   │   You are an advanced automatic agent equipped with a variety of tools to assist users.
│   │   │   Your primary function is to understand the user goal and utilize the appropriate tools at your disposal to fulfill
│   │   │   it.
│   │   │   The current date is: 2026-05-07
│   │   │   Your name is...
│   │   ├── additional_kwargs (dict)
│   │   ├── response_metadata (dict)
│   │   ├── type: system
│   │   ├── name: None
│   │   └── id: 9687648a-009d-4c6d-89d8-b4cb925cb370
│   └── #1 (dict)
│       ├── content: What is the current date?
│       ├── additional_kwargs (dict)
│       ├── response_metadata (dict)
│       ├── type: human
│       ├── name: None
│       └── id: b575a6ef-aec1-41a3-9ed6-3a7986040158
└── inner_state (dict)
    ├── job_attachments (dict)
    └── initial_message_count: 2
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/llmopstenant_/api/Traces/spans?traceId=86b443bb129e50de4b481e806b13eca1&source=Robots "HTTP/1.1 200 OK"
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/llmopstenant_/api/Traces/spans?traceId=86b443bb129e50de4b481e806b13eca1&source=Robots "HTTP/1.1 200 OK"
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/llmopstenant_/api/Traces/spans?traceId=86b443bb129e50de4b481e806b13eca1&source=Robots "HTTP/1.1 200 OK"
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/automationtracker_/track/operation/start "HTTP/1.1 200 OK"
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/automationtracker_/track/transaction/start "HTTP/1.1 200 OK"
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/agenthub_/llm/api/execution-cost-tmp?modelName=gpt-4o-2024-11-20 "HTTP/1.1 200 OK"
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/agenthub_/llm/raw/vendor/openai/model/gpt-4o-2024-11-20/completions "HTTP/1.1 200 OK"
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/llmopstenant_/api/Traces/spans?traceId=86b443bb129e50de4b481e806b13eca1&source=Robots "HTTP/1.1 200 OK"
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/llmopstenant_/api/Traces/spans?traceId=86b443bb129e50de4b481e806b13eca1&source=Robots "HTTP/1.1 200 OK"
● agent
state
└── messages (list, 1 items)
    └── #0 (dict)
        ├── content (list, 1 items)
        │   └── #0 (dict)
        │       ├── arguments: {"content":"The current date is May 7, 2026."}
        │       ├── call_id: call_laY3a6YI4RIh7o84QkdQO7zU
        │       ├── name: end_execution
        │       ├── type: function_call
        │       ├── id: fc_0eb1afa7902cc4be0069fc6b1c2bd08195a6d7cbcff158122e
        │       └── status: completed
        ├── additional_kwargs (dict)
        ├── response_metadata (dict)
        │   ├── id: resp_0eb1afa7902cc4be0069fc6b1ae1d88195bb86e943ca486bea
        │   ├── created_at: 1778150170.0
        │   ├── metadata (dict)
        │   ├── model: gpt-4o-2024-11-20
        │   ├── object: response
        │   ├── service_tier: default
        │   ├── status: completed
        │   ├── model_provider: openai
        │   ├── model_name: gpt-4o-2024-11-20
        │   └── headers (dict)
        │       ├── x-uipath-llmgateway-isbyoexecution: False
        │       ├── x-uipath-llmgateway-executiondeploymenttype: PAYGO
        │       └── x-uipath-targetservice-duration: 3024
        ├── type: ai
        ├── name: None
        ├── id: resp_0eb1afa7902cc4be0069fc6b1ae1d88195bb86e943ca486bea
        ├── tool_calls (list, 1 items)
        │   └── #0 (dict)
        │       ├── name: end_execution
        │       ├── args (dict)
        │       │   └── content: The current date is May 7, 2026.
        │       ├── id: call_laY3a6YI4RIh7o84QkdQO7zU
        │       └── type: tool_call
        ├── invalid_tool_calls (list, 0 items)
        └── usage_metadata (dict)
            ├── input_tokens: 837
            ├── output_tokens: 26
            ├── total_tokens: 863
            ├── input_token_details (dict)
            │   └── cache_read: 0
            └── output_token_details (dict)
                └── reasoning: 0
● terminate
state
└── content: The current date is May 7, 2026.
Deserializing unregistered type uipath_langchain.agent.react.types.InnerAgentGraphState from checkpoint. This will be blocked in a future version. Set LANGGRAPH_STRICT_MSGPACK=true to block now, or add to allowed_msgpack_modules to allow explicitly: [('uipath_langchain.agent.react.types', 'InnerAgentGraphState')]
● END
output
└── content: The current date is May 7, 2026.
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/automationtracker_/track/transaction/end "HTTP/1.1 200 OK"
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/automationtracker_/track/operation/end "HTTP/1.1 200 OK"
track_event called: AgentRun.End, properties: {'Status': 'Completed', 'ErrorMessage': '', 'AgentName': 'Agent', 'AgentId': '90a56e2a-f6be-4faa-9a7e-4b764ac7c28b', 'DurationMs': 5187, 'TraceId': '86b443bb129e50de4b481e806b13eca1', 'AgentRunId': 'd540db63-8370-4d29-94e5-66c0974e3349', 'Model': 'gpt-4o-2024-11-20', 'MaxTokens': '16384', 'Temperature': '0.0', 'Engine': 'basic-v2', 'MaxIterations': '25', 'IsConversational': 'False', 'AgentVersion': '1.1.0', 'Mode': 'standard', 'AgentRunSource': 'runtime', 'ApplicationName': 'UiPath.AgentService', 'Runtime': 'URT', 'UiPathAgentsPackageVersion': '0.0.0', 'CloudOrganizationId': 'f4b9d127-5680-40ff-a562-f76fbdb50ca7', 'CloudTenantId': '7d7a7036-7312-4663-8f88-1ed3d7a793f1', 'JobId': None, 'CloudUserId': '9b7f03dc-4547-4af3-8e01-a4ee1d651773', 'AgentType': 'LowCode', 'FolderKey': 'd7257953-5757-46b0-87e3-97aa9f184ac1', 'ImageVersion': None}
_track_event completed for: AgentRun.End
Calling end() on an ended span.
HTTP Request: POST https://alpha.uipath.com/datafabric/ab/llmopstenant_/api/Traces/spans?traceId=86b443bb129e50de4b481e806b13eca1&source=Robots "HTTP/1.1 200 OK"
✓  Successful execution.

Same agent.json, same runtime path — only the context_type assert was removed.

Related

🤖 Generated with Claude Code

The DataFabric PR (#726) added `assert resource.context_type is not
None` at the top of `create_context_tool`. Agents packaged with
storage-schema < v48 don't carry a `contextType` field, so the assert
fires at runtime and the agent fails to start.

The downstream `context_type == DATA_FABRIC_ENTITY_SET` check already
short-circuits correctly when `context_type` is None, and the
semantic-search / deep-rag / batch-transform handlers don't read
`context_type` at all — they branch on `settings.retrieval_mode`,
which legacy bundles always populate. So removing the assert restores
the pre-PR behaviour for legacy bundles without affecting v48+ flows.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Includes the context_type backwards-compatibility fix so legacy agent
bundles (storage-schema < v48) start cleanly under the new release.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants