xpander-sdk 2.0.218__py3-none-any.whl → 2.0.220__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.
- xpander_sdk/models/orchestrations.py +37 -3
- xpander_sdk/modules/agents/sub_modules/agent.py +3 -0
- xpander_sdk/modules/backend/frameworks/agno.py +1 -1
- xpander_sdk/modules/tasks/sub_modules/task.py +2 -0
- xpander_sdk/modules/tasks/tasks_module.py +3 -0
- {xpander_sdk-2.0.218.dist-info → xpander_sdk-2.0.220.dist-info}/METADATA +1 -1
- {xpander_sdk-2.0.218.dist-info → xpander_sdk-2.0.220.dist-info}/RECORD +10 -10
- {xpander_sdk-2.0.218.dist-info → xpander_sdk-2.0.220.dist-info}/WHEEL +0 -0
- {xpander_sdk-2.0.218.dist-info → xpander_sdk-2.0.220.dist-info}/licenses/LICENSE +0 -0
- {xpander_sdk-2.0.218.dist-info → xpander_sdk-2.0.220.dist-info}/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@ including various node types, execution strategies, and control flow conditions.
|
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
from enum import Enum
|
|
8
|
-
from typing import Dict, List, Literal, Optional, Union
|
|
8
|
+
from typing import Any, Dict, List, Literal, Optional, Union
|
|
9
9
|
from uuid import uuid4
|
|
10
10
|
|
|
11
11
|
from pydantic import Field
|
|
@@ -45,6 +45,17 @@ class OrchestrationNodeType(str, Enum):
|
|
|
45
45
|
Summarizer = "summarizer"
|
|
46
46
|
SendToEnd = "send_to_end"
|
|
47
47
|
|
|
48
|
+
class OrchestrationPointerNodeInstructionsMode(str, Enum):
|
|
49
|
+
"""Modes for instruction usage in pointer node.
|
|
50
|
+
|
|
51
|
+
Attributes:
|
|
52
|
+
Replace: Replaces the traget asset instructions.
|
|
53
|
+
Append: Appends to the traget asset instructions.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
Replace = "replace"
|
|
57
|
+
Append = "append"
|
|
58
|
+
|
|
48
59
|
class OrchestrationConditionType(str, Enum):
|
|
49
60
|
"""Types of conditions for orchestration control flow.
|
|
50
61
|
|
|
@@ -52,11 +63,26 @@ class OrchestrationConditionType(str, Enum):
|
|
|
52
63
|
Regex: Condition based on regular expression matching.
|
|
53
64
|
Contains: Condition based on substring containment.
|
|
54
65
|
Else: Fallback condition that always matches (executed when no other conditions match).
|
|
66
|
+
Equal: Condition based on equality comparison (path == value).
|
|
67
|
+
NotEqual: Condition based on inequality comparison (path != value).
|
|
68
|
+
GreaterThan: Condition based on greater than comparison (path > value).
|
|
69
|
+
LessThan: Condition based on less than comparison (path < value).
|
|
70
|
+
GreaterThanOrEqual: Condition based on greater than or equal comparison (path >= value).
|
|
71
|
+
LessThanOrEqual: Condition based on less than or equal comparison (path <= value).
|
|
72
|
+
NotEmpty: Condition that checks if a path value is not empty/null.
|
|
55
73
|
"""
|
|
56
74
|
|
|
57
75
|
Regex = "regex"
|
|
58
76
|
Contains = "contains"
|
|
59
77
|
Else = "else"
|
|
78
|
+
# Classic comparison operators
|
|
79
|
+
Equal = "equal"
|
|
80
|
+
NotEqual = "not_equal"
|
|
81
|
+
GreaterThan = "gt"
|
|
82
|
+
LessThan = "lt"
|
|
83
|
+
GreaterThanOrEqual = "gte"
|
|
84
|
+
LessThanOrEqual = "lte"
|
|
85
|
+
NotEmpty = "not_empty"
|
|
60
86
|
|
|
61
87
|
class OrchestrationWaitNodeType(str, Enum):
|
|
62
88
|
"""Types of wait nodes in orchestration workflows.
|
|
@@ -73,15 +99,21 @@ class OrchestrationCondition(XPanderSharedModel):
|
|
|
73
99
|
"""Condition for controlling orchestration flow.
|
|
74
100
|
|
|
75
101
|
Attributes:
|
|
76
|
-
type: Type of condition (regex, contains, or
|
|
77
|
-
term: The pattern or string to match against.
|
|
102
|
+
type: Type of condition (regex, contains, else, or comparison operators).
|
|
103
|
+
term: The pattern or string to match against. Used for 'regex' and 'contains' types.
|
|
78
104
|
group_id: Optional group ID for group-based classifier routing.
|
|
79
105
|
When set, routing matches by group ID instead of term matching.
|
|
106
|
+
path: Path to extract value from input data (e.g., "input.client_id" or "client_id").
|
|
107
|
+
Used for comparison operators (equal, not_equal, gt, lt, gte, lte, not_empty).
|
|
108
|
+
value: Value to compare against. Used with comparison operators.
|
|
109
|
+
Not required for 'not_empty' type.
|
|
80
110
|
"""
|
|
81
111
|
|
|
82
112
|
type: OrchestrationConditionType
|
|
83
113
|
term: Optional[str] = None
|
|
84
114
|
group_id: Optional[str] = None
|
|
115
|
+
path: Optional[str] = None
|
|
116
|
+
value: Optional[Any] = None
|
|
85
117
|
|
|
86
118
|
class OrchestrationRetryStrategy(XPanderSharedModel):
|
|
87
119
|
"""Strategy for retrying failed orchestration nodes.
|
|
@@ -165,6 +197,7 @@ class OrchestrationPointerNode(XPanderSharedModel):
|
|
|
165
197
|
output_type: Expected output format. Defaults to Text.
|
|
166
198
|
output_schema: JSON schema for structured output validation.
|
|
167
199
|
instructions: Optional instructions for the pointer node (Action only).
|
|
200
|
+
instructions_mode: Mode to use for pointer node, specifically for agent nodes.
|
|
168
201
|
ignore_response: Should ignore the node result and proceed with previous result?.
|
|
169
202
|
schema_override: Optional schema override with permanentValue fields for fixed values.
|
|
170
203
|
"""
|
|
@@ -180,6 +213,7 @@ class OrchestrationPointerNode(XPanderSharedModel):
|
|
|
180
213
|
output_type: Optional[OutputFormat] = OutputFormat.Text
|
|
181
214
|
output_schema: Optional[Dict] = None
|
|
182
215
|
instructions: Optional[str] = None
|
|
216
|
+
instructions_mode: Optional[OrchestrationPointerNodeInstructionsMode] = OrchestrationPointerNodeInstructionsMode.Append
|
|
183
217
|
ignore_response: Optional[bool] = False
|
|
184
218
|
schema_override: Optional[SchemaOverride] = None
|
|
185
219
|
|
|
@@ -413,6 +413,7 @@ class Agent(XPanderSharedModel):
|
|
|
413
413
|
output_schema: Optional[Dict] = None,
|
|
414
414
|
events_streaming: Optional[bool] = False,
|
|
415
415
|
additional_context: Optional[str] = None,
|
|
416
|
+
additional_instructions: Optional[str] = None,
|
|
416
417
|
expected_output: Optional[str] = None,
|
|
417
418
|
mcp_servers: Optional[List[MCPServerDetails]] = [],
|
|
418
419
|
triggering_agent_id: Optional[str] = None,
|
|
@@ -438,6 +439,7 @@ class Agent(XPanderSharedModel):
|
|
|
438
439
|
output_schema (Optional[Dict]): Schema defining structure of output.
|
|
439
440
|
events_streaming (Optional[bool]): Flag idicating for events are required for this task.
|
|
440
441
|
additional_context (Optional[str]): Additional context to be passed to the agent.
|
|
442
|
+
additional_instructions (Optional[str]): Additional instructions to be appended to the agent's system prompt.
|
|
441
443
|
expected_output (Optional[str]): Expected output of the execution.
|
|
442
444
|
mcp_servers (Optional[List[MCPServerDetails]]): Optional list of mcp servers to use.
|
|
443
445
|
triggering_agent_id (Optional[str]): Optional triggering agent id.
|
|
@@ -473,6 +475,7 @@ class Agent(XPanderSharedModel):
|
|
|
473
475
|
"run_locally": run_locally,
|
|
474
476
|
"events_streaming": events_streaming,
|
|
475
477
|
"additional_context": additional_context,
|
|
478
|
+
"additional_instructions": additional_instructions,
|
|
476
479
|
"expected_output": expected_output,
|
|
477
480
|
"mcp_servers": [server.model_dump() for server in mcp_servers],
|
|
478
481
|
"triggering_agent_id": triggering_agent_id,
|
|
@@ -130,7 +130,7 @@ async def build_agent_args(
|
|
|
130
130
|
"name": xpander_agent.name,
|
|
131
131
|
"model": model,
|
|
132
132
|
"description": xpander_agent.instructions.description,
|
|
133
|
-
"instructions": xpander_agent.instructions.instructions,
|
|
133
|
+
"instructions": xpander_agent.instructions.instructions + (f"\n<additional_overriding_instructions>{task.additional_instructions}</additional_overriding_instructions>" if task.additional_instructions else ""),
|
|
134
134
|
"expected_output": (
|
|
135
135
|
task.expected_output
|
|
136
136
|
if task and task.expected_output
|
|
@@ -132,6 +132,7 @@ class Task(XPanderSharedModel):
|
|
|
132
132
|
output_schema (Optional[Dict]): Schema for the task's output.
|
|
133
133
|
events_streaming (Optional[bool]): Flag indicating if the task has events streaming.
|
|
134
134
|
additional_context (Optional[str]): Additional context to be passed to the agent.
|
|
135
|
+
additional_instructions (Optional[str]): Additional instructions to be appended to the agent's system prompt.
|
|
135
136
|
expected_output (Optional[str]): Expected output of the execution.
|
|
136
137
|
mcp_servers (Optional[List[MCPServerDetails]]): Optional list of mcp servers to use.
|
|
137
138
|
triggering_agent_id (Optional[str]): Optional triggering agent id.
|
|
@@ -180,6 +181,7 @@ class Task(XPanderSharedModel):
|
|
|
180
181
|
events_streaming: Optional[bool] = False
|
|
181
182
|
is_orchestration: Optional[bool] = False
|
|
182
183
|
additional_context: Optional[str] = None
|
|
184
|
+
additional_instructions: Optional[str] = None
|
|
183
185
|
expected_output: Optional[str] = (None,)
|
|
184
186
|
mcp_servers: Optional[List[MCPServerDetails]] = ([],)
|
|
185
187
|
triggering_agent_id: Optional[str] = (None,)
|
|
@@ -234,6 +234,7 @@ class Tasks(ModuleBase):
|
|
|
234
234
|
output_schema: Optional[Dict] = None,
|
|
235
235
|
events_streaming: Optional[bool] = False,
|
|
236
236
|
additional_context: Optional[str] = None,
|
|
237
|
+
additional_instructions: Optional[str] = None,
|
|
237
238
|
expected_output: Optional[str] = None,
|
|
238
239
|
mcp_servers: Optional[List[MCPServerDetails]] = [],
|
|
239
240
|
triggering_agent_id: Optional[str] = None,
|
|
@@ -263,6 +264,7 @@ class Tasks(ModuleBase):
|
|
|
263
264
|
output_schema (Optional[Dict]): Schema defining the expected output structure.
|
|
264
265
|
events_streaming (Optional[bool]): Flag idicating for events are required for this task.
|
|
265
266
|
additional_context (Optional[str]): Additional context to be passed to the agent.
|
|
267
|
+
additional_instructions (Optional[str]): Additional instructions to be appended to the agent's system prompt.
|
|
266
268
|
expected_output (Optional[str]): Expected output of the execution.
|
|
267
269
|
mcp_servers (Optional[List[MCPServerDetails]]): Optional list of mcp servers to use.
|
|
268
270
|
triggering_agent_id (Optional[str]): Optional triggering agent id.
|
|
@@ -309,6 +311,7 @@ class Tasks(ModuleBase):
|
|
|
309
311
|
"run_locally": run_locally,
|
|
310
312
|
"events_streaming": events_streaming,
|
|
311
313
|
"additional_context": additional_context,
|
|
314
|
+
"additional_instructions": additional_instructions,
|
|
312
315
|
"expected_output": expected_output,
|
|
313
316
|
"mcp_servers": [server.model_dump() for server in mcp_servers],
|
|
314
317
|
"triggering_agent_id": triggering_agent_id,
|
|
@@ -16,7 +16,7 @@ xpander_sdk/models/events.py,sha256=HnootQSUIIRM4BIdaTbuPUEJ55hLVtA7KDCSsnHeBKw,
|
|
|
16
16
|
xpander_sdk/models/frameworks.py,sha256=-7W_m5cvgS1qLp0gGAFP4noNWT82IT1ZqtQv5WuOC2k,2939
|
|
17
17
|
xpander_sdk/models/generic.py,sha256=yw5rBRdZ-6ucTI4AwtskenddepOooiFRM--9xx5jrL8,681
|
|
18
18
|
xpander_sdk/models/notifications.py,sha256=ryc0VDXoiuZDEh791LYzW73GC0qH1y2hYl8Fj5Xv0FU,4141
|
|
19
|
-
xpander_sdk/models/orchestrations.py,sha256=
|
|
19
|
+
xpander_sdk/models/orchestrations.py,sha256=W6lY1QQpuKdMAgrUF_RUw_ClAvgg3vMUdPcw_F-YeSw,15161
|
|
20
20
|
xpander_sdk/models/shared.py,sha256=gW88kA_UslNinUjtQKpLVF0sHDZnckwLWexRapxPivU,3125
|
|
21
21
|
xpander_sdk/models/user.py,sha256=_FTG0JO6iTrbcvJp-BBJ6nuj281zhyQB5ldQkBCyYDU,749
|
|
22
22
|
xpander_sdk/modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -27,7 +27,7 @@ xpander_sdk/modules/agents/models/agent.py,sha256=9foTMH4UOfgT9mPfObpeRxHEJButyQ
|
|
|
27
27
|
xpander_sdk/modules/agents/models/agent_list.py,sha256=byEayS2uLwDKaVT3lAHltrFocQFKpr8XEwQ6NTEEEMo,4081
|
|
28
28
|
xpander_sdk/modules/agents/models/knowledge_bases.py,sha256=YimpjVJxWe8YTbGMD6oGQOA_YV8ztHQHTTBOaBB44ZM,1037
|
|
29
29
|
xpander_sdk/modules/agents/sub_modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
-
xpander_sdk/modules/agents/sub_modules/agent.py,sha256=
|
|
30
|
+
xpander_sdk/modules/agents/sub_modules/agent.py,sha256=7-HRZT7vhUbkpiaG4gLnsUYl6-9j8d3zYnLiP9ANOL0,37380
|
|
31
31
|
xpander_sdk/modules/agents/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
xpander_sdk/modules/agents/utils/generic.py,sha256=XbG4OeHMQo4gVYCsasMlW_b8OoqS1xL3MlUZSjXivu0,81
|
|
33
33
|
xpander_sdk/modules/backend/__init__.py,sha256=-NjikuZgHBhOM9xHML2vKsG0ICX9S2RKHktrWaODCBE,171
|
|
@@ -36,7 +36,7 @@ xpander_sdk/modules/backend/events_registry.py,sha256=d0V-lsz3I3G1QB643EM1i-a5oJ
|
|
|
36
36
|
xpander_sdk/modules/backend/decorators/__init__.py,sha256=ub9c8G0Ll6AuCvfcFB6rqR8iamMJxtcW7QjWw3WSkPU,106
|
|
37
37
|
xpander_sdk/modules/backend/decorators/on_auth_event.py,sha256=Xt_x9nncujMcF_SgM5hG6M-iZ6B-rDS97EPmgZkGdMk,4715
|
|
38
38
|
xpander_sdk/modules/backend/frameworks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
|
-
xpander_sdk/modules/backend/frameworks/agno.py,sha256=
|
|
39
|
+
xpander_sdk/modules/backend/frameworks/agno.py,sha256=yVMKvWAgCXU8BS_42BjwuAl5GGTJl3r6znz5Vquodsw,43989
|
|
40
40
|
xpander_sdk/modules/backend/frameworks/dispatch.py,sha256=ht9hT5-cHATofQbWsbWeTARx51Hne3TNNNjw6KECRtA,1814
|
|
41
41
|
xpander_sdk/modules/backend/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
42
|
xpander_sdk/modules/backend/utils/mcp_oauth.py,sha256=5sYJcw557V3pSgutxUFzkBp5YxUJFUoB1V1rEe814pc,5430
|
|
@@ -62,12 +62,12 @@ xpander_sdk/modules/knowledge_bases/sub_modules/knowledge_base.py,sha256=0HTUYjC
|
|
|
62
62
|
xpander_sdk/modules/knowledge_bases/sub_modules/knowledge_base_document_item.py,sha256=oLQApvsd573ZfYGV7Ji4XB5bNUyUFIeZWPIhZS1DIM4,1815
|
|
63
63
|
xpander_sdk/modules/knowledge_bases/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
64
|
xpander_sdk/modules/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
65
|
-
xpander_sdk/modules/tasks/tasks_module.py,sha256=
|
|
65
|
+
xpander_sdk/modules/tasks/tasks_module.py,sha256=Wa1lxWmyd-k_uGFKKFZxQC0K8UK38QtAmNec2TsD6jI,20875
|
|
66
66
|
xpander_sdk/modules/tasks/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
67
67
|
xpander_sdk/modules/tasks/models/task.py,sha256=pYzXg0jnE6ft4pVFvxiVexO5eMUFkg1VxXybzFtL1ys,4483
|
|
68
68
|
xpander_sdk/modules/tasks/models/tasks_list.py,sha256=8V1T0vCtGN79qLMPwe37pOA7Wvuf8pbJNOhWL0BPo-8,5126
|
|
69
69
|
xpander_sdk/modules/tasks/sub_modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
70
|
-
xpander_sdk/modules/tasks/sub_modules/task.py,sha256=
|
|
70
|
+
xpander_sdk/modules/tasks/sub_modules/task.py,sha256=yDGJEyxG-ZXOwB5AtOnb53FUQr_MlQM5Hvr2MMEe5T8,38127
|
|
71
71
|
xpander_sdk/modules/tasks/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
72
|
xpander_sdk/modules/tasks/utils/files.py,sha256=KqqwSQSrwim2-H3XP5wOadDDfngAyEI034tA7Oon-vc,3631
|
|
73
73
|
xpander_sdk/modules/tools_repository/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -90,8 +90,8 @@ xpander_sdk/utils/generic.py,sha256=XrRj2-L8c0YWpfPdDyXE-pVL-6lKF9VpyZzKHQ4wuCc,
|
|
|
90
90
|
xpander_sdk/utils/tools.py,sha256=lyFkq2yP7DxBkyXYVlnFRwDhQCvf0fZZMDm5fBycze4,1244
|
|
91
91
|
xpander_sdk/utils/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
92
|
xpander_sdk/utils/agents/compactization_agent.py,sha256=S_U1dSmDC7I0JUsp_THUYjfutEI5QMBaMPJEXGp0_Sw,14389
|
|
93
|
-
xpander_sdk-2.0.
|
|
94
|
-
xpander_sdk-2.0.
|
|
95
|
-
xpander_sdk-2.0.
|
|
96
|
-
xpander_sdk-2.0.
|
|
97
|
-
xpander_sdk-2.0.
|
|
93
|
+
xpander_sdk-2.0.220.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
94
|
+
xpander_sdk-2.0.220.dist-info/METADATA,sha256=qwMfStmf8KHPgM2JnXp5HRwN1b14awrwZ79hBj_p7pQ,17952
|
|
95
|
+
xpander_sdk-2.0.220.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
96
|
+
xpander_sdk-2.0.220.dist-info/top_level.txt,sha256=UCjnxQpsMy5Zoe7lmRuVDO6DI2V_6PgRFfm4oizRbVs,12
|
|
97
|
+
xpander_sdk-2.0.220.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|