Skip to content

Commit de11d14

Browse files
Merge pull request #1035 from UiPath/feat/add-internal-tools
feat: add internal tool types [PC-3568]
2 parents f16845c + 4983882 commit de11d14

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath"
3-
version = "2.2.39"
3+
version = "2.2.40"
44
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

src/uipath/agent/models/agent.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,16 @@ class AgentToolType(str, Enum):
3737
API = "Api"
3838
PROCESS_ORCHESTRATION = "ProcessOrchestration"
3939
INTEGRATION = "Integration"
40+
INTERNAL = "Internal"
4041
UNKNOWN = "Unknown" # fallback branch discriminator
4142

4243

44+
class AgentInternalToolType(str, Enum):
45+
"""Agent internal tool type enumeration."""
46+
47+
ANALYZE_FILES = "analyze-attachments"
48+
49+
4350
class AgentEscalationRecipientType(str, Enum):
4451
"""Agent escalation recipient type enumeration."""
4552

@@ -343,6 +350,14 @@ class AgentIntegrationToolProperties(BaseResourceProperties):
343350
)
344351

345352

353+
class AgentInternalToolProperties(BaseResourceProperties):
354+
"""Agent internal tool properties model."""
355+
356+
tool_type: Literal[AgentInternalToolType.ANALYZE_FILES] = Field(
357+
..., alias="toolType"
358+
)
359+
360+
346361
class AgentIntegrationToolResourceConfig(BaseAgentToolResourceConfig):
347362
"""Agent integration tool resource configuration model."""
348363

@@ -355,6 +370,17 @@ class AgentIntegrationToolResourceConfig(BaseAgentToolResourceConfig):
355370
output_schema: Optional[Dict[str, Any]] = Field(None, alias="outputSchema")
356371

357372

373+
class AgentInternalToolResourceConfig(BaseAgentToolResourceConfig):
374+
"""Agent internal tool resource configuration model."""
375+
376+
type: Literal[AgentToolType.INTERNAL] = AgentToolType.INTERNAL
377+
properties: AgentInternalToolProperties
378+
settings: Optional[AgentToolSettings] = Field(None)
379+
arguments: Optional[Dict[str, Any]] = Field(default_factory=dict)
380+
is_enabled: Optional[bool] = Field(None, alias="isEnabled")
381+
output_schema: Dict[str, Any] = Field(..., alias="outputSchema")
382+
383+
358384
class AgentUnknownToolResourceConfig(BaseAgentToolResourceConfig):
359385
"""Fallback for unknown tool types (parent normalizer sets type='Unknown')."""
360386

@@ -367,6 +393,7 @@ class AgentUnknownToolResourceConfig(BaseAgentToolResourceConfig):
367393
Union[
368394
AgentProcessToolResourceConfig,
369395
AgentIntegrationToolResourceConfig,
396+
AgentInternalToolResourceConfig,
370397
AgentUnknownToolResourceConfig, # when parent sets type="Unknown"
371398
],
372399
Field(discriminator="type"),
@@ -699,6 +726,7 @@ def _normalize_resources(v: Dict[str, Any]) -> None:
699726
"api": "Api",
700727
"processorchestration": "ProcessOrchestration",
701728
"integration": "Integration",
729+
"internal": "Internal",
702730
"unknown": "Unknown",
703731
}
704732
CONTEXT_MODE_MAP = {

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)