uipath 2.1.101__py3-none-any.whl → 2.1.102__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,11 +53,11 @@ class BaseAgentToolResourceConfig(BaseAgentResourceConfig):
53
53
  class AgentToolType(str, Enum):
54
54
  """Agent tool type."""
55
55
 
56
- AGENT = "agent"
57
- PROCESS = "process"
58
- API = "api"
59
- PROCESS_ORCHESTRATION = "processorchestration"
60
- INTEGRATION = "integration"
56
+ AGENT = "Agent"
57
+ PROCESS = "Process"
58
+ API = "Api"
59
+ PROCESS_ORCHESTRATION = "ProcessOrchestration"
60
+ INTEGRATION = "Integration"
61
61
 
62
62
 
63
63
  class AgentToolSettings(BaseModel):
@@ -116,9 +116,15 @@ class AgentProcessToolResourceConfig(BaseAgentToolResourceConfig):
116
116
  @field_validator("type", mode="before")
117
117
  @classmethod
118
118
  def normalize_type(cls, v: Any) -> str:
119
- """Normalize tool type to lowercase format."""
119
+ """Normalize tool type from lowercase to properly cased enum values."""
120
120
  if isinstance(v, str):
121
- return v.lower()
121
+ lowercase_mapping = {
122
+ "agent": AgentToolType.AGENT,
123
+ "process": AgentToolType.PROCESS,
124
+ "api": AgentToolType.API,
125
+ "processorchestration": AgentToolType.PROCESS_ORCHESTRATION,
126
+ }
127
+ return lowercase_mapping.get(v.lower(), v)
122
128
  return v
123
129
 
124
130
  model_config = ConfigDict(
@@ -173,6 +179,7 @@ class AgentIntegrationToolResourceConfig(BaseAgentToolResourceConfig):
173
179
 
174
180
  type: Literal[AgentToolType.INTEGRATION] = AgentToolType.INTEGRATION
175
181
  properties: AgentIntegrationToolProperties
182
+ settings: Optional[AgentToolSettings] = Field(None, description="Tool settings")
176
183
  arguments: Optional[Dict[str, Any]] = Field(
177
184
  default_factory=dict, description="Tool arguments"
178
185
  )
@@ -181,9 +188,9 @@ class AgentIntegrationToolResourceConfig(BaseAgentToolResourceConfig):
181
188
  @field_validator("type", mode="before")
182
189
  @classmethod
183
190
  def normalize_type(cls, v: Any) -> str:
184
- """Normalize tool type to lowercase format."""
185
- if isinstance(v, str):
186
- return v.lower()
191
+ """Normalize tool type from lowercase to properly cased enum values."""
192
+ if isinstance(v, str) and v.lower() == "integration":
193
+ return AgentToolType.INTEGRATION
187
194
  return v
188
195
 
189
196
  model_config = ConfigDict(
@@ -378,15 +385,20 @@ def custom_discriminator(data: Any) -> str:
378
385
  return "AgentMcpResourceConfig"
379
386
  elif resource_type == AgentResourceType.TOOL:
380
387
  tool_type = data.get("type")
381
- if tool_type in [
382
- AgentToolType.AGENT,
383
- AgentToolType.PROCESS,
384
- AgentToolType.API,
385
- AgentToolType.PROCESS_ORCHESTRATION,
386
- ]:
387
- return "AgentProcessToolResourceConfig"
388
- elif tool_type == AgentToolType.INTEGRATION:
389
- return "AgentIntegrationToolResourceConfig"
388
+ if isinstance(tool_type, str):
389
+ tool_type_lower = tool_type.lower()
390
+ process_tool_types = {
391
+ AgentToolType.AGENT.value.lower(),
392
+ AgentToolType.PROCESS.value.lower(),
393
+ AgentToolType.API.value.lower(),
394
+ AgentToolType.PROCESS_ORCHESTRATION.value.lower(),
395
+ }
396
+ if tool_type_lower in process_tool_types:
397
+ return "AgentProcessToolResourceConfig"
398
+ elif tool_type_lower == AgentToolType.INTEGRATION.value.lower():
399
+ return "AgentIntegrationToolResourceConfig"
400
+ else:
401
+ return "AgentUnknownToolResourceConfig"
390
402
  else:
391
403
  return "AgentUnknownToolResourceConfig"
392
404
  else:
@@ -0,0 +1,22 @@
1
+ """UiPath ReAct Agent Constructs.
2
+
3
+ This module includes UiPath ReAct Agent Loop constructs such as prompts, tools
4
+ """
5
+
6
+ from .prompts import AGENT_SYSTEM_PROMPT_TEMPLATE
7
+ from .tools import (
8
+ END_EXECUTION_TOOL,
9
+ RAISE_ERROR_TOOL,
10
+ EndExecutionToolSchemaModel,
11
+ FlowControlToolConfig,
12
+ RaiseErrorToolSchemaModel,
13
+ )
14
+
15
+ __all__ = [
16
+ "AGENT_SYSTEM_PROMPT_TEMPLATE",
17
+ "FlowControlToolConfig",
18
+ "END_EXECUTION_TOOL",
19
+ "RAISE_ERROR_TOOL",
20
+ "EndExecutionToolSchemaModel",
21
+ "RaiseErrorToolSchemaModel",
22
+ ]
@@ -1,4 +1,4 @@
1
- """LowCode Agent Prompts."""
1
+ """ReAct Agent Meta Prompts."""
2
2
 
3
3
  AGENT_SYSTEM_PROMPT_TEMPLATE = """
4
4
  You are an advanced automatic agent equipped with a variety of tools to assist users.
@@ -1,9 +1,28 @@
1
- """LowCode Agent Tools."""
1
+ """UiPath ReAct Agent Control Flow Tools."""
2
+
3
+ from dataclasses import dataclass
4
+ from enum import Enum
2
5
 
3
6
  from pydantic import BaseModel, ConfigDict, Field
4
7
 
5
- TOOL_FLOW_CONTROL_END_EXECUTION = "end_execution"
6
- TOOL_FLOW_CONTROL_RAISE_ERROR = "raise_error"
8
+
9
+ class FlowControlToolName(str, Enum):
10
+ """Names of control flow tools."""
11
+
12
+ END_EXECUTION = "end_execution"
13
+ RAISE_ERROR = "raise_error"
14
+
15
+
16
+ @dataclass(frozen=True)
17
+ class FlowControlToolConfig:
18
+ """Flow control tool configuration.
19
+
20
+ Encapsulates the information needed to create a flow control tool
21
+ """
22
+
23
+ name: str
24
+ description: str
25
+ args_schema: type[BaseModel]
7
26
 
8
27
 
9
28
  class EndExecutionToolSchemaModel(BaseModel):
@@ -40,3 +59,16 @@ class RaiseErrorToolSchemaModel(BaseModel):
40
59
  )
41
60
 
42
61
  model_config = ConfigDict(extra="forbid")
62
+
63
+
64
+ END_EXECUTION_TOOL = FlowControlToolConfig(
65
+ name=FlowControlToolName.END_EXECUTION,
66
+ description="Ends the execution of the agent",
67
+ args_schema=EndExecutionToolSchemaModel,
68
+ )
69
+
70
+ RAISE_ERROR_TOOL = FlowControlToolConfig(
71
+ name=FlowControlToolName.RAISE_ERROR,
72
+ description="Raises an error and ends the execution of the agent",
73
+ args_schema=RaiseErrorToolSchemaModel,
74
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath
3
- Version: 2.1.101
3
+ Version: 2.1.102
4
4
  Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
5
5
  Project-URL: Homepage, https://uipath.com
6
6
  Project-URL: Repository, https://github.com/UiPath/uipath-python
@@ -141,11 +141,11 @@ uipath/agent/conversation/exchange.py,sha256=nuk1tEMBHc_skrraT17d8U6AtyJ3h07ExGQ
141
141
  uipath/agent/conversation/message.py,sha256=1ZkEs146s79TrOAWCQwzBAEJvjAu4lQBpJ64tKXDgGE,2142
142
142
  uipath/agent/conversation/meta.py,sha256=3t0eS9UHoAPHre97QTUeVbjDhnMX4zj4-qG6ju0B8wY,315
143
143
  uipath/agent/conversation/tool.py,sha256=ol8XI8AVd-QNn5auXNBPcCzOkh9PPFtL7hTK3kqInkU,2191
144
- uipath/agent/loop/__init__.py,sha256=EZlNqrh8xod0VtTJqc-1pyUofaeS6PKjbsDfWoveVtI,424
145
- uipath/agent/loop/prompts.py,sha256=qPwyd6Ple2m-Kt0m2foa6ZEmxD3kyCXOmGfXvzHi8Rc,3372
146
- uipath/agent/loop/tools.py,sha256=OsT3x431KqOEzLi2jLxy2B9xXbcFq16xMfmyAqFaqZQ,1351
147
- uipath/agent/models/agent.py,sha256=o_nkrFtZFQdSNMK5NH9rCo346ABZcQLfW5h2Wv9yUhg,17791
144
+ uipath/agent/models/agent.py,sha256=lCSXE2ctZOSQfK27dk7y5cl0VARE7iGb0UredBIigTM,18613
148
145
  uipath/agent/models/evals.py,sha256=QMIqwCuwabD_vYF0KgJpip5BV0pFLf9ZKUd9AL5eU2w,1843
146
+ uipath/agent/react/__init__.py,sha256=0Ci-uf0gSOReoHQyx3QImY-om3q_SgLT-bJUSlzS3B8,527
147
+ uipath/agent/react/prompts.py,sha256=0a06TJz2XqZuLK-yC_bvZV9ULXpY6UGtybjjbyVzXII,3375
148
+ uipath/agent/react/tools.py,sha256=X3t95LisIjkucfAxK5Au-RQ7_BYe4MTcr2IaQ656p58,2109
149
149
  uipath/eval/_helpers/__init__.py,sha256=GSmZMryjuO3Wo_zdxZdrHCRRsgOxsVFYkYgJ15YNC3E,86
150
150
  uipath/eval/_helpers/helpers.py,sha256=iE2HHdMiAdAMLqxHkPKHpfecEtAuN5BTBqvKFTI8ciE,1315
151
151
  uipath/eval/evaluators/__init__.py,sha256=DJAAhgv0I5UfBod4sGnSiKerfrz1iMmk7GNFb71V8eI,494
@@ -189,8 +189,8 @@ uipath/tracing/_utils.py,sha256=X-LFsyIxDeNOGuHPvkb6T5o9Y8ElYhr_rP3CEBJSu4s,1383
189
189
  uipath/utils/__init__.py,sha256=VD-KXFpF_oWexFg6zyiWMkxl2HM4hYJMIUDZ1UEtGx0,105
190
190
  uipath/utils/_endpoints_manager.py,sha256=tnF_FiCx8qI2XaJDQgYkMN_gl9V0VqNR1uX7iawuLp8,8230
191
191
  uipath/utils/dynamic_schema.py,sha256=w0u_54MoeIAB-mf3GmwX1A_X8_HDrRy6p998PvX9evY,3839
192
- uipath-2.1.101.dist-info/METADATA,sha256=sAfz81Fb7m1qDTK7fBG_T10L_uR_YQETQFI_WFFG9gk,6626
193
- uipath-2.1.101.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
194
- uipath-2.1.101.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
195
- uipath-2.1.101.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
196
- uipath-2.1.101.dist-info/RECORD,,
192
+ uipath-2.1.102.dist-info/METADATA,sha256=PHCMM28vCj3vTI7svQmDPoKJkg7J-YlGWUyLPFDFD-s,6626
193
+ uipath-2.1.102.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
194
+ uipath-2.1.102.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
195
+ uipath-2.1.102.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
196
+ uipath-2.1.102.dist-info/RECORD,,
@@ -1,17 +0,0 @@
1
- """LowCode Agent Loop Constructs.
2
-
3
- This module includes agentic loop constructs specific to LowCode Agent
4
- such as prompts, tools
5
- """
6
-
7
- from uipath.agent.loop.prompts import AGENT_SYSTEM_PROMPT_TEMPLATE
8
- from uipath.agent.loop.tools import (
9
- EndExecutionToolSchemaModel,
10
- RaiseErrorToolSchemaModel,
11
- )
12
-
13
- __all__ = [
14
- "AGENT_SYSTEM_PROMPT_TEMPLATE",
15
- "EndExecutionToolSchemaModel",
16
- "RaiseErrorToolSchemaModel",
17
- ]