ibm-watsonx-orchestrate 1.2.0__tar.gz → 1.4.2__tar.gz
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.
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/PKG-INFO +6 -2
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/pyproject.toml +6 -2
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/__init__.py +1 -1
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/agents/types.py +6 -1
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/knowledge_bases/knowledge_base.py +16 -3
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/knowledge_bases/knowledge_base_requests.py +4 -20
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/knowledge_bases/types.py +13 -15
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/agent_builder/toolkits/base_toolkit.py +32 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/agent_builder/toolkits/types.py +42 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/tools/openapi_tool.py +14 -13
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/tools/python_tool.py +4 -2
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/tools/types.py +2 -1
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/agents/agents_command.py +29 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/agents/agents_controller.py +273 -12
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/knowledge_bases/knowledge_bases_command.py +2 -2
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/knowledge_bases/knowledge_bases_controller.py +79 -39
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/cli/commands/models/env_file_model_provider_mapper.py +180 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/cli/commands/models/models_command.py +314 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/server/server_command.py +117 -48
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/cli/commands/server/types.py +105 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/cli/commands/toolkit/toolkit_command.py +119 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/toolkit/toolkit_controller.py +123 -42
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/tools/tools_command.py +22 -1
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/tools/tools_controller.py +209 -25
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/cli/init_helper.py +43 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/main.py +3 -1
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/agents/agent_client.py +4 -1
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/agents/assistant_agent_client.py +5 -1
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/agents/external_agent_client.py +5 -1
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/analytics/llm/analytics_llm_client.py +2 -6
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/base_api_client.py +5 -2
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/connections/connections_client.py +15 -21
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/client/model_policies/model_policies_client.py +47 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/client/model_policies/types.py +36 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/client/models/models_client.py +46 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/client/models/types.py +177 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/toolkit/toolkit_client.py +15 -6
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/client/tools/tempus_client.py +40 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/tools/tool_client.py +8 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/docker/compose-lite.yml +68 -13
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/docker/default.env +22 -12
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/docker/tempus/common-config.yaml +1 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/experimental/flow_builder/flows/__init__.py +41 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/experimental/flow_builder/flows/constants.py +17 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/experimental/flow_builder/flows/data_map.py +91 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/experimental/flow_builder/flows/decorators.py +143 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/experimental/flow_builder/flows/events.py +72 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/experimental/flow_builder/flows/flow.py +1288 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/experimental/flow_builder/node.py +97 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/experimental/flow_builder/resources/flow_status.openapi.yml +98 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/experimental/flow_builder/types.py +492 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/experimental/flow_builder/utils.py +113 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/run/__init__.py +0 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/utils/__init__.py +0 -0
- ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/utils/logging/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/utils/utils.py +5 -2
- ibm_watsonx_orchestrate-1.2.0/src/ibm_watsonx_orchestrate/cli/commands/models/models_command.py +0 -128
- ibm_watsonx_orchestrate-1.2.0/src/ibm_watsonx_orchestrate/cli/commands/toolkit/toolkit_command.py +0 -71
- ibm_watsonx_orchestrate-1.2.0/src/ibm_watsonx_orchestrate/docker/tempus/common-config.yaml +0 -1
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/.gitignore +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/LICENSE +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/agents/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/agents/agent.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/agents/assistant_agent.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/agents/external_agent.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/connections/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/connections/connections.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/connections/types.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/tools/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/tools/base_tool.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/utils/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/agent_builder/utils/pydantic_utils.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/channels/channels_command.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/channels/channels_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/channels/types.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/channels/webchat/channels_webchat_command.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/channels/webchat/channels_webchat_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/chat/chat_command.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/connections/connections_command.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/connections/connections_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/environment/environment_command.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/environment/environment_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/environment/types.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/login/login_command.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/settings/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/langfuse/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/langfuse/langfuse_command.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/observability_command.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/settings/settings_command.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/commands/tools/types.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/cli/config.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/analytics/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/analytics/llm/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/base_service_instance.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/client.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/client_errors.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/connections/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/connections/utils.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/credentials.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/knowledge_bases/knowledge_base_client.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/local_service_instance.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0/src/ibm_watsonx_orchestrate/run → ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/client/model_policies}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0/src/ibm_watsonx_orchestrate/utils → ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/client/models}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/service_instance.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/client/utils.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/docker/sdk/ibm_watsonx_orchestrate-0.6.0-py3-none-any.whl +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/docker/sdk/ibm_watsonx_orchestrate-0.6.0.tar.gz +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/docker/start-up.sh +0 -0
- {ibm_watsonx_orchestrate-1.2.0/src/ibm_watsonx_orchestrate/utils/logging → ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/experimental/flow_builder}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/run/connections.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/utils/logging/logger.py +0 -0
- {ibm_watsonx_orchestrate-1.2.0 → ibm_watsonx_orchestrate-1.4.2}/src/ibm_watsonx_orchestrate/utils/logging/logging.yaml +0 -0
@@ -1,25 +1,29 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ibm-watsonx-orchestrate
|
3
|
-
Version: 1.2
|
3
|
+
Version: 1.4.2
|
4
4
|
Summary: IBM watsonx.orchestrate SDK
|
5
5
|
Author-email: IBM <support@ibm.com>
|
6
6
|
License: MIT License
|
7
7
|
License-File: LICENSE
|
8
8
|
Requires-Python: <3.14,>=3.11
|
9
9
|
Requires-Dist: certifi>=2024.8.30
|
10
|
+
Requires-Dist: click<8.2.0,>=8.0.0
|
10
11
|
Requires-Dist: docstring-parser<1.0,>=0.16
|
11
12
|
Requires-Dist: httpx<1.0.0,>=0.28.1
|
12
13
|
Requires-Dist: ibm-cloud-sdk-core>=3.22.0
|
13
14
|
Requires-Dist: jsonref==1.1.0
|
14
15
|
Requires-Dist: jsonschema<5.0.0,>=4.23.0
|
15
16
|
Requires-Dist: langchain-community<1.0.0,>=0.3.12
|
17
|
+
Requires-Dist: munch>=4.0.0
|
16
18
|
Requires-Dist: numpy>=1.26.0
|
17
19
|
Requires-Dist: packaging>=24.2
|
18
20
|
Requires-Dist: pydantic<3.0.0,>=2.10.3
|
19
21
|
Requires-Dist: pyjwt<3.0.0,>=2.10.1
|
20
22
|
Requires-Dist: python-dotenv>=1.0.0
|
23
|
+
Requires-Dist: pytz>=2025.2
|
21
24
|
Requires-Dist: pyyaml<7.0.0,>=6.0.2
|
22
|
-
Requires-Dist:
|
25
|
+
Requires-Dist: redis>=6.0.0
|
26
|
+
Requires-Dist: requests>=2.32.0
|
23
27
|
Requires-Dist: rich<14.0.0,>=13.9.4
|
24
28
|
Requires-Dist: typer<1.0.0,>=0.15.1
|
25
29
|
Requires-Dist: urllib3>=2.2.3
|
@@ -17,6 +17,7 @@ requires-python = ">=3.11, <3.14"
|
|
17
17
|
classifiers = []
|
18
18
|
dependencies = [
|
19
19
|
"certifi>=2024.8.30",
|
20
|
+
"click>=8.0.0,<8.2.0",
|
20
21
|
"docstring-parser>=0.16,<1.0",
|
21
22
|
"httpx>=0.28.1,<1.0.0",
|
22
23
|
"ibm-cloud-sdk-core>=3.22.0",
|
@@ -29,10 +30,13 @@ dependencies = [
|
|
29
30
|
"pyjwt>=2.10.1,<3.0.0",
|
30
31
|
"python-dotenv>=1.0.0",
|
31
32
|
"pyyaml>=6.0.2,<7.0.0",
|
32
|
-
"requests>=2.32.
|
33
|
+
"requests>=2.32.0",
|
33
34
|
"rich>=13.9.4,<14.0.0",
|
34
35
|
"typer>=0.15.1,<1.0.0",
|
35
|
-
"urllib3>=2.2.3"
|
36
|
+
"urllib3>=2.2.3",
|
37
|
+
"munch>=4.0.0",
|
38
|
+
"pytz>=2025.2",
|
39
|
+
"redis>=6.0.0"
|
36
40
|
]
|
37
41
|
|
38
42
|
[project.optional-dependencies]
|
@@ -5,6 +5,7 @@ from typing import List, Optional, Dict
|
|
5
5
|
from pydantic import BaseModel, model_validator, ConfigDict
|
6
6
|
from ibm_watsonx_orchestrate.agent_builder.tools import BaseTool
|
7
7
|
from ibm_watsonx_orchestrate.agent_builder.knowledge_bases.types import KnowledgeBaseSpec
|
8
|
+
from ibm_watsonx_orchestrate.agent_builder.knowledge_bases.knowledge_base import KnowledgeBase
|
8
9
|
from pydantic import Field, AliasChoices
|
9
10
|
from typing import Annotated
|
10
11
|
|
@@ -45,6 +46,7 @@ class BaseAgentSpec(BaseModel):
|
|
45
46
|
kind: AgentKind
|
46
47
|
id: Optional[Annotated[str, Field(json_schema_extra={"min_length_str": 1})]] = None
|
47
48
|
name: Annotated[str, Field(json_schema_extra={"min_length_str":1})]
|
49
|
+
display_name: Annotated[Optional[str], Field(json_schema_extra={"min_length_str":1})] = None
|
48
50
|
description: Annotated[str, Field(json_schema_extra={"min_length_str":1})]
|
49
51
|
|
50
52
|
def dump_spec(self, file: str) -> None:
|
@@ -68,6 +70,7 @@ class BaseAgentSpec(BaseModel):
|
|
68
70
|
class AgentStyle(str, Enum):
|
69
71
|
DEFAULT = "default"
|
70
72
|
REACT = "react"
|
73
|
+
PLANNER = "planner"
|
71
74
|
|
72
75
|
class AgentSpec(BaseAgentSpec):
|
73
76
|
model_config = ConfigDict(arbitrary_types_allowed=True)
|
@@ -85,6 +88,8 @@ class AgentSpec(BaseAgentSpec):
|
|
85
88
|
def __init__(self, *args, **kwargs):
|
86
89
|
if "tools" in kwargs and kwargs["tools"]:
|
87
90
|
kwargs["tools"] = [x.__tool_spec__.name if isinstance(x, BaseTool) else x for x in kwargs["tools"]]
|
91
|
+
if "knowledge_base" in kwargs and kwargs["knowledge_base"]:
|
92
|
+
kwargs["knowledge_base"] = [x.name if isinstance(x, KnowledgeBase) else x for x in kwargs["knowledge_base"]]
|
88
93
|
if "collaborators" in kwargs and kwargs["collaborators"]:
|
89
94
|
kwargs["collaborators"] = [x.name if isinstance(x, BaseAgentSpec) else x for x in kwargs["collaborators"]]
|
90
95
|
super().__init__(*args, **kwargs)
|
@@ -101,7 +106,7 @@ class AgentSpec(BaseAgentSpec):
|
|
101
106
|
|
102
107
|
def validate_agent_fields(values: dict) -> dict:
|
103
108
|
# Check for empty strings or whitespace
|
104
|
-
for field in ["id", "name", "kind", "description", "collaborators", "tools"]:
|
109
|
+
for field in ["id", "name", "kind", "description", "collaborators", "tools", "knowledge_base"]:
|
105
110
|
value = values.get(field)
|
106
111
|
if value and not str(value).strip():
|
107
112
|
raise ValueError(f"{field} cannot be empty or just whitespace")
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import json
|
2
2
|
from ibm_watsonx_orchestrate.utils.utils import yaml_safe_load
|
3
|
-
from .types import KnowledgeBaseSpec
|
4
|
-
|
3
|
+
from .types import KnowledgeBaseSpec, KnowledgeBaseKind
|
4
|
+
from pydantic import model_validator
|
5
5
|
|
6
6
|
class KnowledgeBase(KnowledgeBaseSpec):
|
7
7
|
|
@@ -24,4 +24,17 @@ class KnowledgeBase(KnowledgeBaseSpec):
|
|
24
24
|
return f"KnowledgeBase(id='{self.id}', name='{self.name}', description='{self.description}')"
|
25
25
|
|
26
26
|
def __str__(self):
|
27
|
-
return self.__repr__()
|
27
|
+
return self.__repr__()
|
28
|
+
|
29
|
+
# Not a model validator since we only want to validate this on import
|
30
|
+
def validate_documents_or_index_exists(self):
|
31
|
+
if self.documents and self.conversational_search_tool and self.conversational_search_tool.index_config or \
|
32
|
+
(not self.documents and (not self.conversational_search_tool or not self.conversational_search_tool.index_config)):
|
33
|
+
raise ValueError("Must provide either \"documents\" or \"conversational_search_tool.index_config\", but not both")
|
34
|
+
return self
|
35
|
+
|
36
|
+
@model_validator(mode="after")
|
37
|
+
def validate_kind(self):
|
38
|
+
if self.kind != KnowledgeBaseKind.KNOWLEDGE_BASE:
|
39
|
+
raise ValueError(f"The specified kind '{self.kind}' cannot be used to create a knowledge base")
|
40
|
+
return self
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import json
|
2
2
|
from ibm_watsonx_orchestrate.utils.utils import yaml_safe_load
|
3
|
-
from .types import
|
3
|
+
from .types import KnowledgeBaseSpec, PatchKnowledgeBase, KnowledgeBaseKind
|
4
4
|
|
5
5
|
|
6
|
-
class KnowledgeBaseCreateRequest(
|
6
|
+
class KnowledgeBaseCreateRequest(KnowledgeBaseSpec):
|
7
7
|
|
8
8
|
@staticmethod
|
9
|
-
def from_spec(file: str) -> '
|
9
|
+
def from_spec(file: str) -> 'KnowledgeBaseSpec':
|
10
10
|
with open(file, 'r') as f:
|
11
11
|
if file.endswith('.yaml') or file.endswith('.yml'):
|
12
12
|
content = yaml_safe_load(f)
|
@@ -15,20 +15,10 @@ class KnowledgeBaseCreateRequest(CreateKnowledgeBase):
|
|
15
15
|
else:
|
16
16
|
raise ValueError('file must end in .json, .yaml, or .yml')
|
17
17
|
|
18
|
-
if (content.get('documents') and content.get("conversational_search_tool", {}).get("index_config")) or \
|
19
|
-
(not content.get('documents') and not content.get("conversational_search_tool", {}).get("index_config")):
|
20
|
-
raise ValueError("Must provide either \"documents\" or \"conversational_search_tool.index_config\", but not both")
|
21
|
-
|
22
18
|
if not content.get("spec_version"):
|
23
19
|
raise ValueError(f"Field 'spec_version' not provided. Please ensure provided spec conforms to a valid spec format")
|
24
20
|
|
25
|
-
|
26
|
-
raise ValueError(f"Field 'kind' not provided. Should be 'knowledge_base'")
|
27
|
-
|
28
|
-
if content.get("kind") != KnowledgeBaseKind.KNOWLEDGE_BASE:
|
29
|
-
raise ValueError(f"Field 'kind' should be 'knowledge_base', but is set to '{content.get('kind')}'")
|
30
|
-
|
31
|
-
knowledge_base = CreateKnowledgeBase.model_validate(content)
|
21
|
+
knowledge_base = KnowledgeBaseSpec.model_validate(content)
|
32
22
|
|
33
23
|
return knowledge_base
|
34
24
|
|
@@ -48,12 +38,6 @@ class KnowledgeBaseUpdateRequest(PatchKnowledgeBase):
|
|
48
38
|
if not content.get("spec_version"):
|
49
39
|
raise ValueError(f"Field 'spec_version' not provided. Please ensure provided spec conforms to a valid spec format")
|
50
40
|
|
51
|
-
if not content.get("kind"):
|
52
|
-
raise ValueError(f"Field 'kind' not provided. Should be 'knowledge_base'")
|
53
|
-
|
54
|
-
if content.get("kind") != KnowledgeBaseKind.KNOWLEDGE_BASE:
|
55
|
-
raise ValueError(f"Field 'kind' should be 'knowledge_base', but is set to '{content.get('kind')}'")
|
56
|
-
|
57
41
|
patch = PatchKnowledgeBase.model_validate(content)
|
58
42
|
|
59
43
|
return patch
|
@@ -3,8 +3,7 @@ from datetime import datetime
|
|
3
3
|
from uuid import UUID
|
4
4
|
from enum import Enum
|
5
5
|
|
6
|
-
from pydantic import BaseModel,
|
7
|
-
|
6
|
+
from pydantic import BaseModel, model_validator
|
8
7
|
|
9
8
|
class SpecVersion(str, Enum):
|
10
9
|
V1 = "v1"
|
@@ -206,16 +205,6 @@ class KnowledgeBaseBuiltInVectorIndexConfig(BaseModel):
|
|
206
205
|
chunk_overlap: Optional[int] = None
|
207
206
|
limit: Optional[int] = None
|
208
207
|
|
209
|
-
class CreateKnowledgeBase(BaseModel):
|
210
|
-
"""request payload schema"""
|
211
|
-
name: Optional[str] = None
|
212
|
-
description: Optional[str] = None
|
213
|
-
documents: list[str] = None
|
214
|
-
vector_index: Optional[KnowledgeBaseBuiltInVectorIndexConfig] = None
|
215
|
-
conversational_search_tool: Optional[ConversationalSearchConfig] = None
|
216
|
-
prioritize_built_in_index: Optional[bool] = None
|
217
|
-
|
218
|
-
|
219
208
|
class PatchKnowledgeBase(BaseModel):
|
220
209
|
"""request payload schema"""
|
221
210
|
description: Optional[str] = None
|
@@ -223,7 +212,14 @@ class PatchKnowledgeBase(BaseModel):
|
|
223
212
|
conversational_search_tool: Optional[ConversationalSearchConfig] = None
|
224
213
|
prioritize_built_in_index: Optional[bool] = None
|
225
214
|
representation: Optional[KnowledgeBaseRepresentation] = None
|
226
|
-
|
215
|
+
|
216
|
+
@model_validator(mode="after")
|
217
|
+
def validate_fields(self):
|
218
|
+
if self.documents and self.conversational_search_tool and self.conversational_search_tool.index_config:
|
219
|
+
raise ValueError("Must not provide both \"documents\" or \"conversational_search_tool.index_config\"")
|
220
|
+
if self.conversational_search_tool and self.conversational_search_tool.index_config and len(self.conversational_search_tool.index_config) != 1:
|
221
|
+
raise ValueError(f"Must provide exactly one conversational_search_tool.index_config. Provided {len(self.conversational_search_tool.index_config)}.")
|
222
|
+
return self
|
227
223
|
|
228
224
|
class KnowledgeBaseSpec(BaseModel):
|
229
225
|
"""Schema for a complete knowledge-base."""
|
@@ -231,13 +227,15 @@ class KnowledgeBaseSpec(BaseModel):
|
|
231
227
|
kind: KnowledgeBaseKind = KnowledgeBaseKind.KNOWLEDGE_BASE
|
232
228
|
id: Optional[UUID] = None
|
233
229
|
tenant_id: Optional[str] = None
|
234
|
-
name:
|
230
|
+
name: str
|
235
231
|
description: Optional[str] = None
|
236
232
|
vector_index: Optional[KnowledgeBaseBuiltInVectorIndexConfig] = None
|
237
233
|
conversational_search_tool: Optional[ConversationalSearchConfig] | Optional[UUID] = None
|
238
234
|
prioritize_built_in_index: Optional[bool] = None
|
235
|
+
representation: Optional[KnowledgeBaseRepresentation] = None
|
239
236
|
vector_index_id: Optional[UUID] = None
|
240
237
|
created_by: Optional[str] = None
|
241
238
|
created_on: Optional[datetime] = None
|
242
239
|
updated_at: Optional[datetime] = None
|
243
|
-
|
240
|
+
# For import/update
|
241
|
+
documents: list[str] = None
|
ibm_watsonx_orchestrate-1.4.2/src/ibm_watsonx_orchestrate/agent_builder/toolkits/base_toolkit.py
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
import json
|
2
|
+
|
3
|
+
import yaml
|
4
|
+
|
5
|
+
from .types import ToolkitSpec
|
6
|
+
|
7
|
+
|
8
|
+
class BaseToolkit:
|
9
|
+
__toolkit_spec__: ToolkitSpec
|
10
|
+
|
11
|
+
def __init__(self, spec: ToolkitSpec):
|
12
|
+
self.__toolkit_spec__ = spec
|
13
|
+
|
14
|
+
def __call__(self, **kwargs):
|
15
|
+
pass
|
16
|
+
|
17
|
+
def dump_spec(self, file: str) -> None:
|
18
|
+
dumped = self.__toolkit_spec__.model_dump(mode='json', exclude_unset=True, exclude_none=True, by_alias=True)
|
19
|
+
with open(file, 'w') as f:
|
20
|
+
if file.endswith('.yaml') or file.endswith('.yml'):
|
21
|
+
yaml.dump(dumped, f)
|
22
|
+
elif file.endswith('.json'):
|
23
|
+
json.dump(dumped, f, indent=2)
|
24
|
+
else:
|
25
|
+
raise ValueError('file must end in .json, .yaml, or .yml')
|
26
|
+
|
27
|
+
def dumps_spec(self) -> str:
|
28
|
+
dumped = self.__toolkit_spec__.model_dump(mode='json', exclude_unset=True, exclude_none=True, by_alias=True)
|
29
|
+
return json.dumps(dumped, indent=2)
|
30
|
+
|
31
|
+
def __repr__(self):
|
32
|
+
return f"Toolkit(name='{self.__toolkit_spec__.name}', description='{self.__toolkit_spec__.description}')"
|
@@ -0,0 +1,42 @@
|
|
1
|
+
from typing import List, Dict, Optional
|
2
|
+
from enum import Enum
|
3
|
+
from pydantic import BaseModel, model_validator
|
4
|
+
|
5
|
+
class ToolkitKind(str, Enum):
|
6
|
+
MCP = "mcp"
|
7
|
+
|
8
|
+
class Language(str, Enum):
|
9
|
+
NODE = "node"
|
10
|
+
PYTHON ="python"
|
11
|
+
|
12
|
+
class ToolkitSource(str, Enum):
|
13
|
+
FILES = "files"
|
14
|
+
PUBLIC_REGISTRY = "public-registry"
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
class McpModel(BaseModel):
|
19
|
+
source: str
|
20
|
+
command: str
|
21
|
+
args: List[str]
|
22
|
+
tools: List[str]
|
23
|
+
connections: Dict[str, str]
|
24
|
+
|
25
|
+
|
26
|
+
class ToolkitSpec(BaseModel):
|
27
|
+
id: str
|
28
|
+
tenant_id: str
|
29
|
+
name: str
|
30
|
+
description: Optional[str]
|
31
|
+
created_on: str
|
32
|
+
updated_at: str
|
33
|
+
created_by: str
|
34
|
+
created_by_username: str
|
35
|
+
tools: List[str] | None
|
36
|
+
mcp: McpModel
|
37
|
+
|
38
|
+
@model_validator(mode='after')
|
39
|
+
def validate_tools_and_mcp(self) -> 'ToolkitSpec':
|
40
|
+
if self.mcp.source not in {"files", "public-registry"}:
|
41
|
+
raise ValueError("MCP source must be either 'files' or 'public-registry'.")
|
42
|
+
return self
|
@@ -115,17 +115,9 @@ def create_openapi_json_tool(
|
|
115
115
|
raise ValueError(
|
116
116
|
f"Path {http_path} did not have an http_method {http_method}. Available methods are {list(route.keys())}")
|
117
117
|
|
118
|
-
operation_id = (
|
119
|
-
|
120
|
-
|
121
|
-
'_',
|
122
|
-
re.sub(
|
123
|
-
r'[^a-zA-Z_]',
|
124
|
-
'_',
|
125
|
-
route_spec.get('operationId', None)
|
126
|
-
)
|
127
|
-
)
|
128
|
-
) if route_spec.get('operationId', None) is not None else None
|
118
|
+
operation_id = re.sub( r'(\W|_)+', '_', route_spec.get('operationId') ) \
|
119
|
+
if route_spec.get('operationId', None) else None
|
120
|
+
|
129
121
|
spec_name = name or operation_id
|
130
122
|
spec_permission = permission or _action_to_perm(route_spec.get('x-ibm-operation', {}).get('action'))
|
131
123
|
if spec_name is None:
|
@@ -142,7 +134,7 @@ def create_openapi_json_tool(
|
|
142
134
|
description=spec_description,
|
143
135
|
permission=spec_permission
|
144
136
|
)
|
145
|
-
|
137
|
+
|
146
138
|
spec.input_schema = input_schema or ToolRequestBody(
|
147
139
|
type='object',
|
148
140
|
properties={},
|
@@ -301,7 +293,7 @@ async def create_openapi_json_tool_from_uri(
|
|
301
293
|
description=description,
|
302
294
|
input_schema=input_schema,
|
303
295
|
output_schema=output_schema,
|
304
|
-
|
296
|
+
connection_id=app_id
|
305
297
|
)
|
306
298
|
|
307
299
|
|
@@ -310,6 +302,15 @@ async def create_openapi_json_tools_from_uri(
|
|
310
302
|
connection_id: str = None
|
311
303
|
) -> List[OpenAPITool]:
|
312
304
|
openapi_contents = await _get_openapi_spec_from_uri(openapi_uri)
|
305
|
+
tools: List[OpenAPITool] = await create_openapi_json_tools_from_content(openapi_contents, connection_id)
|
306
|
+
|
307
|
+
return tools
|
308
|
+
|
309
|
+
async def create_openapi_json_tools_from_content(
|
310
|
+
openapi_contents: dict,
|
311
|
+
connection_id: str = None
|
312
|
+
) -> List[OpenAPITool]:
|
313
|
+
|
313
314
|
tools: List[OpenAPITool] = []
|
314
315
|
|
315
316
|
for path, methods in openapi_contents.get('paths', {}).items():
|
@@ -47,7 +47,7 @@ class PythonTool(BaseTool):
|
|
47
47
|
return PythonTool(fn=fn, spec=spec)
|
48
48
|
|
49
49
|
def __repr__(self):
|
50
|
-
return f"PythonTool(fn={self.__tool_spec__.binding.python.function}, name='{self.__tool_spec__.name}', description='{self.__tool_spec__.description}')"
|
50
|
+
return f"PythonTool(fn={self.__tool_spec__.binding.python.function}, name='{self.__tool_spec__.name}', display_name='{self.__tool_spec__.display_name or ''}', description='{self.__tool_spec__.description}')"
|
51
51
|
|
52
52
|
def __str__(self):
|
53
53
|
return self.__repr__()
|
@@ -99,7 +99,8 @@ def tool(
|
|
99
99
|
input_schema: ToolRequestBody = None,
|
100
100
|
output_schema: ToolResponseBody = None,
|
101
101
|
permission: ToolPermission = ToolPermission.READ_ONLY,
|
102
|
-
expected_credentials: List[ExpectedCredentials] = None
|
102
|
+
expected_credentials: List[ExpectedCredentials] = None,
|
103
|
+
display_name: str = None
|
103
104
|
) -> Callable[[{__name__, __doc__}], PythonTool]:
|
104
105
|
"""
|
105
106
|
Decorator to convert a python function into a callable tool.
|
@@ -125,6 +126,7 @@ def tool(
|
|
125
126
|
|
126
127
|
spec = ToolSpec(
|
127
128
|
name=name or fn.__name__,
|
129
|
+
display_name=display_name,
|
128
130
|
description=_desc,
|
129
131
|
permission=permission
|
130
132
|
)
|
@@ -137,7 +137,7 @@ class ClientSideToolBinding(BaseModel):
|
|
137
137
|
class McpToolBinding(BaseModel):
|
138
138
|
server_url: Optional[str] = None
|
139
139
|
source: str
|
140
|
-
connections: Dict[str, str]
|
140
|
+
connections: Dict[str, str] | None
|
141
141
|
|
142
142
|
class ToolBinding(BaseModel):
|
143
143
|
openapi: OpenApiToolBinding = None
|
@@ -166,6 +166,7 @@ class ToolBinding(BaseModel):
|
|
166
166
|
|
167
167
|
class ToolSpec(BaseModel):
|
168
168
|
name: str
|
169
|
+
display_name: str | None = None
|
169
170
|
description: str
|
170
171
|
permission: ToolPermission
|
171
172
|
input_schema: ToolRequestBody = None
|
@@ -190,3 +190,32 @@ def remove_agent(
|
|
190
190
|
):
|
191
191
|
agents_controller = AgentsController()
|
192
192
|
agents_controller.remove_agent(name=name, kind=kind)
|
193
|
+
|
194
|
+
@agents_app.command(name="export", help='Export an agent and its dependencies to a zip file or yaml')
|
195
|
+
def export_agent(
|
196
|
+
name: Annotated[
|
197
|
+
str,
|
198
|
+
typer.Option("--name", "-n", help="Name of the agent you wish to export"),
|
199
|
+
],
|
200
|
+
kind: Annotated[
|
201
|
+
AgentKind,
|
202
|
+
typer.Option("--kind", "-k", help="The kind of agent you wish to export"),
|
203
|
+
],
|
204
|
+
output_file: Annotated[
|
205
|
+
str,
|
206
|
+
typer.Option(
|
207
|
+
"--output",
|
208
|
+
"-o",
|
209
|
+
help="Path to a where the file containing the exported data should be saved",
|
210
|
+
),
|
211
|
+
],
|
212
|
+
agent_only_flag: Annotated[
|
213
|
+
bool,
|
214
|
+
typer.Option(
|
215
|
+
"--agent-only",
|
216
|
+
help="Export only the yaml to the specified agent, excluding its dependencies",
|
217
|
+
),
|
218
|
+
]=False
|
219
|
+
):
|
220
|
+
agents_controller = AgentsController()
|
221
|
+
agents_controller.export_agent(name=name, kind=kind, output_path=output_file, agent_only_flag=agent_only_flag)
|