Skip to content

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

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

Conversation

@sankalp-uipath

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

Copy link
Copy Markdown

What

Two additive changes that make ontologies a first-class, multi-valued binding on a
Data Fabric context, resolved the same way entities are:

  • agent/models/agent.py — adds DataFabricOntologyItem and an ontology_set field
    (alias ontologySet) on AgentContextResourceConfig, a list mirroring entity_set.
    A context can attach one or more ontologies, each carrying its own folderId.
  • platform/entities/_entities_service.py — adds
    get_ontology_file_async(ontology_name, file_type="owl", folder_key=None) to the shared
    EntitiesService: validates the name, builds the call via RequestSpec/Endpoint, hits
    GET datafabric_/api/ontologies/{name}/files/{type} on the already-authenticated client,
    and returns the JSON wrapper.

Why

The DF agent tool needs to resolve ontologies like it resolves entities — from agent.json,
not env vars — and to fetch the OWL through the same authenticated, folder-scoped client.
Keeping the fetch on EntitiesService follows the existing entity pattern (validation + URL
on the service, no separate client file). Each ontology carries its own folderId, so
ontologies resolve from their own folders, independent of the entities (which can span
folders). A context is no longer restricted to a single ontology.

Notes

  • Additive + backward compatible: ontology_set defaults to None. The name is
    regex-validated (^[a-z][a-z0-9-]{0,63}$) as a path-injection guard before it enters the URL.
  • Consumed by uipath-langchain PR feat: add integration service invocation support #911, which drops its local ontology_client.py in favour
    of get_ontology_file_async.
  • Merged latest main. ruff clean; the model round-trips the ontologySet list (parse +
    dump-by-alias) and the service module is import smoke-tested.
  • Review only — not for merge. Follow-up: unit tests for the model round-trip and the
    get_ontology_file_async request spec.

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

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

Adds first-class, typed support for binding a single Data Fabric ontology onto an agent context configuration (agent.json), aligning ontology resolution with existing entitySet handling.

Changes:

  • Introduces DataFabricOntologyItem as a new config model for a single ontology binding.
  • Extends AgentContextResourceConfig with an optional ontology field (mirrors entity_set as a typed field).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +428 to +430
name: str = Field(..., alias="name")
folder_key: Optional[str] = Field(None, alias="folderId")
description: Optional[str] = Field(None, alias="description")
"""

id: Optional[str] = Field(None, alias="id")
reference_key: Optional[str] = Field(None, alias="referenceKey")
Comment on lines 445 to +450
entity_set: Optional[List[DataFabricEntityItem]] = Field(None, alias="entitySet")
ontology: Optional[DataFabricOntologyItem] = Field(
None,
alias="ontology",
description="A single ontology attached to this context (at most one).",
)
None, description="Context settings"
)
entity_set: Optional[List[DataFabricEntityItem]] = Field(None, alias="entitySet")
ontology: Optional[DataFabricOntologyItem] = Field(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

List

sankalp-uipath and others added 3 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
@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 →

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
65.2% Coverage on New Code (required ≥ 90%)

See analysis details on SonarQube Cloud

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

Labels

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