Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/uipath-platform/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ sdk.mcp # McpService
sdk.resource_catalog # ResourceCatalogService
sdk.automation_tracker # AutomationTrackerService
sdk.business_rules # BusinessRulesService
sdk.ontology # OntologyService
```

### Authentication
Expand Down Expand Up @@ -103,6 +104,7 @@ Services provide both sync and async variants (e.g., `.invoke()` and `.invoke_as
| `context_grounding/` | RAG services (DeepRAG, batch RAG, ephemeral indexes) |
| `documents/` | Document Understanding (IXP) |
| `entities/` | Data Service entity management |
| `ontology/` | Ontology service: an ontology by id, its artifact files, its graph, SQL over its objects |
| `guardrails/` | LLM output guardrails |
| `resource_catalog/` | Resource discovery and metadata |
| `resume_triggers/` | HITL trigger creation/reading protocols |
Expand Down
2 changes: 1 addition & 1 deletion packages/uipath-platform/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath-platform"
version = "0.3.10"
version = "0.3.11"
description = "HTTP client library for programmatic access to UiPath Platform"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
Expand Down
5 changes: 5 additions & 0 deletions packages/uipath-platform/src/uipath/platform/_uipath.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from .governance import GovernanceService
from .guardrails import GuardrailsService
from .memory import MemoryService
from .ontology import OntologyService
from .orchestrator import (
AssetsService,
AttachmentsService,
Expand Down Expand Up @@ -166,6 +167,10 @@ def entities(self) -> EntitiesService:
self._config, self._execution_context, folders_service=self.folders
)

@cached_property
def ontology(self) -> OntologyService:
return OntologyService(self._config, self._execution_context)

@cached_property
def resource_catalog(self) -> ResourceCatalogService:
return ResourceCatalogService(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ class GenericResourceOverwrite(ResourceOverwrite):
"remoteA2aAgent",
"memorySpace",
"businessRule",
# The Agents packager fills an ontology binding's folderPath with the folder
# key (a GUID); OntologyService sends a GUID folder as the key, not a path.
"ontology",

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.

Question on the folder value this override will carry at runtime. GenericResourceOverwrite only has folderPath, and the decorator on OntologyService sends that straight through as the folder path header, which the Ontology service resolves via Orchestrator and 404s (FOLDER_NOT_FOUND) when it doesn't match a path.

The Agents packager fills folderPath from the item's folderId, and for ontologies that field holds the service's folderId, which is the folder key GUID. On the entity side both runtimes already treat that value as an id rather than a path: the C# handler reads the folderPath key into overwriteFolderId, and the Python planner tries path resolution and falls back to using the raw value as a key (#1548 explains why).

Do we know the ontology override will always have been rewritten to a real path by the time it reaches resourceOverwrites? If a GUID can get through (debug runs, or a deploy that keeps the default), the decorator should send it as folder_key instead, or the override should accept folderId the way EntityResourceOverwrite does. If Solutions guarantees a path here, a short note on the model would save the next person the same question.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Right, the packager puts the folder key there. If the value is a GUID, it now goes as the folder key instead of the path. Addressed it

]
name: str = Field(alias="name")
folder_path: str = Field(alias="folderPath")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,10 @@ async def delete_record_v3_async(self, entity_key: str, record_id: str) -> None:
"""Async variant of `delete_record_v3()`."""
await self._data.delete_record_async(entity_key, record_id, use_v3=True)

@deprecated(
"Deprecated; ontologies live in the Ontology service. Use "
"UiPath().ontology.download_artifacts_async(ontology_id, artifact_type)."
)
async def get_ontology_file_async(
self,
ontology_name: str,
Expand All @@ -1450,6 +1454,9 @@ async def get_ontology_file_async(
) -> Dict[str, Any]:
"""Fetch one file of an ontology from Data Fabric.

Deprecated: ontologies are served by the Ontology service by id; use
:class:`uipath.platform.ontology.OntologyService` instead.

!!! warning "Preview Feature"
This method is currently experimental. Behavior and parameters are
subject to change in future versions.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
"""Ontology-side operations for the Data Fabric entities surface.

Deprecated: ontologies are served by the Ontology service (``ontology_/api/v1``)
and addressed by id; use :class:`uipath.platform.ontology.OntologyService`. This
module stays for callers of ``EntitiesService.get_ontology_file_async`` until they
move.

Handles retrieval of ontology component files (OWL schema, R2RML mapping, and
other typed files). Entity schema and record operations are managed by
`EntitySchemaService` / `EntityDataService` and exposed alongside
other typed files) from Data Fabric. Entity schema and record operations are
managed by `EntitySchemaService` / `EntityDataService` and exposed alongside
ontology operations through `EntitiesService`.
"""

Expand Down
36 changes: 36 additions & 0 deletions packages/uipath-platform/src/uipath/platform/ontology/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""Ontology service package.

Provides the ``OntologyService`` client for reading a deployed ontology by id,
downloading the artifact files it was installed from, reading its graph and
running SQL over its objects, plus the Pydantic models for those answers.
"""

from ._ontology_service import (
DEFAULT_MAX_ARTIFACT_BYTES,
OntologyService,
)
from .ontology import (
ONTOLOGY_DEPLOYED_STATE,
ArtifactDownload,
OntologyArtifact,
OntologyArtifactContent,
OntologyArtifactIntegrityError,
OntologyDetails,
SkippedArtifact,
SqlColumn,
SqlResult,
)

__all__ = [
"ArtifactDownload",
"DEFAULT_MAX_ARTIFACT_BYTES",
"ONTOLOGY_DEPLOYED_STATE",
"OntologyArtifact",
"OntologyArtifactContent",
"OntologyArtifactIntegrityError",
"OntologyDetails",
"OntologyService",
"SkippedArtifact",
"SqlColumn",
"SqlResult",
]
Loading
Loading