Skip to content

feat(agent): add ontology binding to Data Fabric context config#1728

Open
sankalp-uipath wants to merge 32 commits into
mainfrom
feat/agent-datafabric-ontology-binding
Open

feat(agent): add ontology binding to Data Fabric context config#1728
sankalp-uipath wants to merge 32 commits into
mainfrom
feat/agent-datafabric-ontology-binding

Conversation

@sankalp-uipath

@sankalp-uipath sankalp-uipath commented Jun 17, 2026

Copy link
Copy Markdown

What

Adds Data Fabric ontology binding to the agent context model: a context can carry one or more ontologies that the runtime fetches to ground Text2SQL.

  • agent/models/agent.pyAgentContextResourceConfig.ontology_set (alias ontologySet), a list of DataFabricOntologyItem nested in the context alongside entitySet.
  • platform/entities/_entity_ontology_service.pyDataFabricOntologyItem ({name, folderId, description?}) + EntityOntologyService, which fetches one ontology file: GET datafabric_/api/ontologies/{name}/files/{type} on the authenticated, folder-scoped client.
  • platform/entities/_entities_service.pyget_ontology_file_async(ontology_name, file_type="owl", folder_key=None) is a thin public wrapper delegating to EntityOntologyService (all ontology logic lives in the ontology sub-service). One file per call; the langchain consumer fetches owl and r2rml as separate calls.

Why

An ontology is part of a Data Fabric context — domain knowledge over the same entities — so it is configured inline on the context (a sibling of entitySet), mirroring how entities are bound. Each ontology carries its own folderId so it can live in a different folder from the entities.

Notes

  • Additive + backward compatible: ontology_set defaults to None.
  • No referenceKey on ontology items: ontologies are not solution-aware at this point, so there is no solution key to reference. The field is dropped from DataFabricOntologyItem — it was never populated or read (ontologies resolve by name + folderId). Backward compatible: configs that still send referenceKey are tolerated via extra="allow".
  • Validation is server-side: file-type/name validation lives in the ontology API (QE), not the client — the SDK forwards the request and surfaces the API's rejection (e.g. an unsupported file type) as EnrichedException (status code + response body + extracted message) rather than swallowing it. Redundant client-side allowlists were removed per review.
  • Tests: nested ontologySet parse/dump, required folderId per item, backward-compat default, full-AgentDefinition normalization; get_ontology_file_async covered for spec, folder header, allowed file types, and the negative case (API rejection of an unsupported file type surfaces as EnrichedException).
  • Consumed by uipath-langchain PR feat: add integration service invocation support #911.
  • Release: uipath2.12.5, uipath-platform0.1.91, pin uipath-platform>=0.1.91; latest main merged in and lockfiles relocked. Do not merge a .dev pin.

Development Packages

uipath

[project]
dependencies = [
  # Exact version (copy-paste ready):
  "uipath==2.12.6.dev1017287114",

  # Any version from this PR (uncomment to use a range instead):
  # "uipath>=2.12.6.dev1017280000,<2.12.6.dev1017290000",
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath = { index = "testpypi" }
uipath-platform = { index = "testpypi" }

[tool.uv]
override-dependencies = ["uipath-platform==0.1.91.dev1017287114"]

uipath-platform

[project]
dependencies = [
  # Exact version (copy-paste ready):
  "uipath-platform==0.1.91.dev1017287114",

  # Any version from this PR (uncomment to use a range instead):
  # "uipath-platform>=0.1.91.dev1017280000,<0.1.91.dev1017290000",
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath-platform = { index = "testpypi" }

Dev builds (testpypi) are republished by CI on each push. Use the latest .dev pins from the most recent CI publish comment, at base versions uipath==2.12.5 / uipath-platform==0.1.91:

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath = { index = "testpypi" }
uipath-platform = { index = "testpypi" }

Copilot AI review requested due to automatic review settings June 17, 2026 09:22
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Jun 17, 2026

This comment was marked as outdated.

Comment thread packages/uipath/src/uipath/agent/models/agent.py Outdated
sankalp-uipath and others added 4 commits June 17, 2026 15:22
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-ontology-binding

# Conflicts:
#	packages/uipath-platform/src/uipath/platform/entities/_entities_service.py

This comment was marked as outdated.

@sankalp-uipath sankalp-uipath added the build:dev Create a dev build from the pr label Jun 22, 2026
@sankalp-uipath sankalp-uipath requested a review from Copilot June 22, 2026 20:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

sankalp-uipath and others added 4 commits June 23, 2026 02:45
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🚨 Heads up: uipath-integrations cross-tests are FAILING 🚨

Your changes may break one or more integrations in uipath-integrations-python:

  • uipath-openai-agents
  • uipath-google-adk
  • uipath-agent-framework
  • uipath-llamaindex
  • uipath-pydantic-ai

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

sankalp-uipath and others added 3 commits June 23, 2026 18:18
…-ontology-binding

# Conflicts:
#	packages/uipath-platform/pyproject.toml
#	packages/uipath-platform/uv.lock
#	packages/uipath/pyproject.toml
#	packages/uipath/uv.lock
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 8 changed files in this pull request and generated no new comments.

@sankalp-uipath sankalp-uipath force-pushed the feat/agent-datafabric-ontology-binding branch from 9ee4757 to 1ce9049 Compare June 25, 2026 08:30
Comment thread packages/uipath-platform/src/uipath/platform/entities/_entities_service.py Outdated
Comment thread packages/uipath-platform/src/uipath/platform/entities/_entities_service.py Outdated
Comment thread packages/uipath-platform/src/uipath/platform/entities/_entities_service.py Outdated
Comment thread packages/uipath-platform/src/uipath/platform/entities/_entities_service.py Outdated
Comment thread packages/uipath-platform/src/uipath/platform/entities/entities.py Outdated
Comment thread packages/uipath-platform/src/uipath/platform/entities/entities.py Outdated
Comment thread packages/uipath/src/uipath/agent/models/agent.py
@sankalp-uipath sankalp-uipath force-pushed the feat/agent-datafabric-ontology-binding branch 3 times, most recently from 9b6f320 to e98f5a1 Compare June 27, 2026 21:22
@sankalp-uipath sankalp-uipath force-pushed the feat/agent-datafabric-ontology-binding branch from e98f5a1 to 54e45ef Compare June 28, 2026 19:53
sankalp-uipath and others added 2 commits June 30, 2026 15:57
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread packages/uipath-platform/tests/services/test_entities_service.py
super().__init__(config=config, execution_context=execution_context)
self._folders_service = folders_service

async def get_file_async(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be called get_onotology_bundle_async

sankalp-uipath and others added 2 commits July 3, 2026 03:09
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-ontology-binding

# Conflicts:
#	packages/uipath-platform/pyproject.toml
#	packages/uipath-platform/uv.lock
#	packages/uipath/pyproject.toml
#	packages/uipath/uv.lock
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

🚨 Heads up: uipath-langchain cross-tests are FAILING 🚨

Your changes may break the uipath-langchain-python integration.

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build:dev Create a dev build from the pr test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants