feat(agent): add ontology binding to Data Fabric context config#1728
Open
sankalp-uipath wants to merge 4 commits into
Open
feat(agent): add ontology binding to Data Fabric context config#1728sankalp-uipath wants to merge 4 commits into
sankalp-uipath wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
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
DataFabricOntologyItemas a new config model for a single ontology binding. - Extends
AgentContextResourceConfigwith an optionalontologyfield (mirrorsentity_setas 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( |
milind-jain-uipath
requested changes
Jun 17, 2026
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
🚨 Heads up:
|
🚨 Heads up:
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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— addsDataFabricOntologyItemand anontology_setfield(alias
ontologySet) onAgentContextResourceConfig, a list mirroringentity_set.A context can attach one or more ontologies, each carrying its own
folderId.platform/entities/_entities_service.py— addsget_ontology_file_async(ontology_name, file_type="owl", folder_key=None)to the sharedEntitiesService: validates the name, builds the call viaRequestSpec/Endpoint, hitsGET 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
EntitiesServicefollows the existing entity pattern (validation + URLon the service, no separate client file). Each ontology carries its own
folderId, soontologies resolve from their own folders, independent of the entities (which can span
folders). A context is no longer restricted to a single ontology.
Notes
ontology_setdefaults toNone. The name isregex-validated (
^[a-z][a-z0-9-]{0,63}$) as a path-injection guard before it enters the URL.ontology_client.pyin favourof
get_ontology_file_async.main.ruffclean; the model round-trips theontologySetlist (parse +dump-by-alias) and the service module is import smoke-tested.
get_ontology_file_asyncrequest spec.