Skip to content

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

Open
sankalp-uipath wants to merge 16 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 16 commits into
mainfrom
feat/agent-datafabric-ontology-binding

Conversation

@sankalp-uipath

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

Copy link
Copy Markdown

What

Makes a Data Fabric ontology a standalone, first-class agent resource that a context references, plus the SDK method to fetch its files:

  • agent/models/agent.py — adds AgentOntologyResourceConfig ($resourceType: "ontology", carrying its own name + folderId) as a top-level resource, and ontology_refs (alias ontologyRefs) on AgentContextResourceConfig. A context references ontologies by name; the ontology is defined once and can be shared across contexts/agents.
  • platform/entities/_entities_service.pyget_ontology_file_async(ontology_name, file_type="owl", folder_key=None) on EntitiesService: validates name and file_type, hits GET datafabric_/api/ontologies/{name}/files/{type} on the authenticated, folder-scoped client, returns the JSON wrapper.

Why

An ontology is reusable domain knowledge, not a property of one entity set — so it's a resource, and the consumer (context) references it via ontologyRefs, keeping the ontology a clean, shareable artifact. This replaces the earlier nested ontologySet field.

Notes

  • Additive + backward compatible: ontology_refs defaults to None.
  • Normalizer fix: AgentDefinition._normalize_resources now keeps "ontology" in its known-resource set — otherwise $resourceType:"ontology" was coerced to Unknown before the union discriminated, so refs never resolved at runtime. The new regression test goes through the full AgentDefinition parse (the path the per-resource union tests missed).
  • Path-injection guard: ontology name (^[a-z][a-z0-9-]{0,63}$) and file_type (owl/r2rml/shacl/summary/context) are allowlisted before entering the URL.
  • Tests: standalone resource parse/dump + required folderId, context ontologyRefs, and full-definition normalization; get_ontology_file_async covered for spec, folder header, file types, and rejected name/type.
  • Consumed by uipath-langchain PR feat: add integration service invocation support #911 (resolves ontology_refs → standalone resources).
  • Release: uipath2.11.11, uipath-platform0.1.74, pin uipath-platform>=0.1.74; lockfiles relocked. PR feat: add integration service invocation support #911 consumes the real uipath 2.11.11 once this merges; the build:dev TestPyPI builds below are for optional pre-merge integration testing only.

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.

Comment on lines +1112 to +1113
async def get_ontology_file_async(
self,
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 →

@github-actions

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 →

…-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.

@sonarqubecloud

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.

3 participants