nvidia-nat 1.2.1__py3-none-any.whl → 1.3.0__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.
Files changed (257) hide show
  1. aiq/__init__.py +2 -2
  2. nat/agent/base.py +27 -18
  3. nat/agent/dual_node.py +9 -4
  4. nat/agent/prompt_optimizer/prompt.py +68 -0
  5. nat/agent/prompt_optimizer/register.py +149 -0
  6. nat/agent/react_agent/agent.py +81 -50
  7. nat/agent/react_agent/register.py +59 -40
  8. nat/agent/reasoning_agent/reasoning_agent.py +17 -15
  9. nat/agent/register.py +1 -1
  10. nat/agent/rewoo_agent/agent.py +327 -149
  11. nat/agent/rewoo_agent/prompt.py +19 -22
  12. nat/agent/rewoo_agent/register.py +64 -46
  13. nat/agent/tool_calling_agent/agent.py +152 -29
  14. nat/agent/tool_calling_agent/register.py +61 -38
  15. nat/authentication/api_key/api_key_auth_provider.py +2 -2
  16. nat/authentication/credential_validator/bearer_token_validator.py +557 -0
  17. nat/authentication/http_basic_auth/http_basic_auth_provider.py +1 -1
  18. nat/authentication/interfaces.py +5 -2
  19. nat/authentication/oauth2/oauth2_auth_code_flow_provider.py +69 -36
  20. nat/authentication/oauth2/oauth2_resource_server_config.py +124 -0
  21. nat/authentication/register.py +0 -1
  22. nat/builder/builder.py +56 -24
  23. nat/builder/component_utils.py +10 -6
  24. nat/builder/context.py +70 -18
  25. nat/builder/eval_builder.py +16 -11
  26. nat/builder/framework_enum.py +1 -0
  27. nat/builder/front_end.py +1 -1
  28. nat/builder/function.py +378 -8
  29. nat/builder/function_base.py +3 -3
  30. nat/builder/function_info.py +6 -8
  31. nat/builder/intermediate_step_manager.py +6 -2
  32. nat/builder/user_interaction_manager.py +2 -2
  33. nat/builder/workflow.py +13 -1
  34. nat/builder/workflow_builder.py +327 -79
  35. nat/cli/cli_utils/config_override.py +2 -2
  36. nat/cli/commands/evaluate.py +1 -1
  37. nat/cli/commands/info/info.py +16 -6
  38. nat/cli/commands/info/list_channels.py +1 -1
  39. nat/cli/commands/info/list_components.py +7 -8
  40. nat/cli/commands/mcp/__init__.py +14 -0
  41. nat/cli/commands/mcp/mcp.py +986 -0
  42. nat/cli/commands/object_store/__init__.py +14 -0
  43. nat/cli/commands/object_store/object_store.py +227 -0
  44. nat/cli/commands/optimize.py +90 -0
  45. nat/cli/commands/registry/publish.py +2 -2
  46. nat/cli/commands/registry/pull.py +2 -2
  47. nat/cli/commands/registry/remove.py +2 -2
  48. nat/cli/commands/registry/search.py +15 -17
  49. nat/cli/commands/start.py +16 -5
  50. nat/cli/commands/uninstall.py +1 -1
  51. nat/cli/commands/workflow/templates/config.yml.j2 +14 -13
  52. nat/cli/commands/workflow/templates/pyproject.toml.j2 +5 -2
  53. nat/cli/commands/workflow/templates/register.py.j2 +2 -3
  54. nat/cli/commands/workflow/templates/workflow.py.j2 +35 -21
  55. nat/cli/commands/workflow/workflow_commands.py +105 -19
  56. nat/cli/entrypoint.py +17 -11
  57. nat/cli/main.py +3 -0
  58. nat/cli/register_workflow.py +38 -4
  59. nat/cli/type_registry.py +79 -10
  60. nat/control_flow/__init__.py +0 -0
  61. nat/control_flow/register.py +20 -0
  62. nat/control_flow/router_agent/__init__.py +0 -0
  63. nat/control_flow/router_agent/agent.py +329 -0
  64. nat/control_flow/router_agent/prompt.py +48 -0
  65. nat/control_flow/router_agent/register.py +91 -0
  66. nat/control_flow/sequential_executor.py +166 -0
  67. nat/data_models/agent.py +34 -0
  68. nat/data_models/api_server.py +196 -67
  69. nat/data_models/authentication.py +23 -9
  70. nat/data_models/common.py +1 -1
  71. nat/data_models/component.py +2 -0
  72. nat/data_models/component_ref.py +11 -0
  73. nat/data_models/config.py +42 -18
  74. nat/data_models/dataset_handler.py +1 -1
  75. nat/data_models/discovery_metadata.py +4 -4
  76. nat/data_models/evaluate.py +4 -1
  77. nat/data_models/function.py +34 -0
  78. nat/data_models/function_dependencies.py +14 -6
  79. nat/data_models/gated_field_mixin.py +242 -0
  80. nat/data_models/intermediate_step.py +3 -3
  81. nat/data_models/optimizable.py +119 -0
  82. nat/data_models/optimizer.py +149 -0
  83. nat/data_models/span.py +41 -3
  84. nat/data_models/swe_bench_model.py +1 -1
  85. nat/data_models/temperature_mixin.py +44 -0
  86. nat/data_models/thinking_mixin.py +86 -0
  87. nat/data_models/top_p_mixin.py +44 -0
  88. nat/embedder/azure_openai_embedder.py +46 -0
  89. nat/embedder/nim_embedder.py +1 -1
  90. nat/embedder/openai_embedder.py +2 -3
  91. nat/embedder/register.py +1 -1
  92. nat/eval/config.py +3 -1
  93. nat/eval/dataset_handler/dataset_handler.py +71 -7
  94. nat/eval/evaluate.py +86 -31
  95. nat/eval/evaluator/base_evaluator.py +1 -1
  96. nat/eval/evaluator/evaluator_model.py +13 -0
  97. nat/eval/intermediate_step_adapter.py +1 -1
  98. nat/eval/rag_evaluator/evaluate.py +9 -6
  99. nat/eval/rag_evaluator/register.py +3 -3
  100. nat/eval/register.py +4 -1
  101. nat/eval/remote_workflow.py +3 -3
  102. nat/eval/runtime_evaluator/__init__.py +14 -0
  103. nat/eval/runtime_evaluator/evaluate.py +123 -0
  104. nat/eval/runtime_evaluator/register.py +100 -0
  105. nat/eval/swe_bench_evaluator/evaluate.py +6 -6
  106. nat/eval/trajectory_evaluator/evaluate.py +1 -1
  107. nat/eval/trajectory_evaluator/register.py +1 -1
  108. nat/eval/tunable_rag_evaluator/evaluate.py +4 -7
  109. nat/eval/utils/eval_trace_ctx.py +89 -0
  110. nat/eval/utils/weave_eval.py +18 -9
  111. nat/experimental/decorators/experimental_warning_decorator.py +27 -7
  112. nat/experimental/test_time_compute/functions/execute_score_select_function.py +1 -1
  113. nat/experimental/test_time_compute/functions/plan_select_execute_function.py +7 -3
  114. nat/experimental/test_time_compute/functions/ttc_tool_orchestration_function.py +3 -3
  115. nat/experimental/test_time_compute/functions/ttc_tool_wrapper_function.py +3 -3
  116. nat/experimental/test_time_compute/models/strategy_base.py +5 -4
  117. nat/experimental/test_time_compute/register.py +0 -1
  118. nat/experimental/test_time_compute/selection/llm_based_output_merging_selector.py +1 -3
  119. nat/front_ends/console/authentication_flow_handler.py +82 -30
  120. nat/front_ends/console/console_front_end_plugin.py +19 -7
  121. nat/front_ends/fastapi/auth_flow_handlers/http_flow_handler.py +1 -1
  122. nat/front_ends/fastapi/auth_flow_handlers/websocket_flow_handler.py +52 -17
  123. nat/front_ends/fastapi/dask_client_mixin.py +65 -0
  124. nat/front_ends/fastapi/fastapi_front_end_config.py +36 -5
  125. nat/front_ends/fastapi/fastapi_front_end_controller.py +4 -4
  126. nat/front_ends/fastapi/fastapi_front_end_plugin.py +135 -4
  127. nat/front_ends/fastapi/fastapi_front_end_plugin_worker.py +455 -282
  128. nat/front_ends/fastapi/job_store.py +518 -99
  129. nat/front_ends/fastapi/main.py +11 -19
  130. nat/front_ends/fastapi/message_handler.py +74 -50
  131. nat/front_ends/fastapi/message_validator.py +20 -21
  132. nat/front_ends/fastapi/response_helpers.py +4 -4
  133. nat/front_ends/fastapi/step_adaptor.py +2 -2
  134. nat/front_ends/fastapi/utils.py +57 -0
  135. nat/front_ends/mcp/introspection_token_verifier.py +73 -0
  136. nat/front_ends/mcp/mcp_front_end_config.py +47 -3
  137. nat/front_ends/mcp/mcp_front_end_plugin.py +48 -13
  138. nat/front_ends/mcp/mcp_front_end_plugin_worker.py +120 -8
  139. nat/front_ends/mcp/tool_converter.py +44 -14
  140. nat/front_ends/register.py +0 -1
  141. nat/front_ends/simple_base/simple_front_end_plugin_base.py +3 -1
  142. nat/llm/aws_bedrock_llm.py +24 -12
  143. nat/llm/azure_openai_llm.py +57 -0
  144. nat/llm/litellm_llm.py +69 -0
  145. nat/llm/nim_llm.py +20 -8
  146. nat/llm/openai_llm.py +14 -6
  147. nat/llm/register.py +5 -1
  148. nat/llm/utils/env_config_value.py +2 -3
  149. nat/llm/utils/thinking.py +215 -0
  150. nat/meta/pypi.md +9 -9
  151. nat/object_store/register.py +0 -1
  152. nat/observability/exporter/base_exporter.py +3 -3
  153. nat/observability/exporter/file_exporter.py +1 -1
  154. nat/observability/exporter/processing_exporter.py +309 -81
  155. nat/observability/exporter/span_exporter.py +35 -15
  156. nat/observability/exporter_manager.py +7 -7
  157. nat/observability/mixin/file_mixin.py +7 -7
  158. nat/observability/mixin/redaction_config_mixin.py +42 -0
  159. nat/observability/mixin/tagging_config_mixin.py +62 -0
  160. nat/observability/mixin/type_introspection_mixin.py +420 -107
  161. nat/observability/processor/batching_processor.py +5 -7
  162. nat/observability/processor/falsy_batch_filter_processor.py +55 -0
  163. nat/observability/processor/processor.py +3 -0
  164. nat/observability/processor/processor_factory.py +70 -0
  165. nat/observability/processor/redaction/__init__.py +24 -0
  166. nat/observability/processor/redaction/contextual_redaction_processor.py +125 -0
  167. nat/observability/processor/redaction/contextual_span_redaction_processor.py +66 -0
  168. nat/observability/processor/redaction/redaction_processor.py +177 -0
  169. nat/observability/processor/redaction/span_header_redaction_processor.py +92 -0
  170. nat/observability/processor/span_tagging_processor.py +68 -0
  171. nat/observability/register.py +22 -4
  172. nat/profiler/calc/calc_runner.py +3 -4
  173. nat/profiler/callbacks/agno_callback_handler.py +1 -1
  174. nat/profiler/callbacks/langchain_callback_handler.py +14 -7
  175. nat/profiler/callbacks/llama_index_callback_handler.py +3 -3
  176. nat/profiler/callbacks/semantic_kernel_callback_handler.py +3 -3
  177. nat/profiler/data_frame_row.py +1 -1
  178. nat/profiler/decorators/framework_wrapper.py +62 -13
  179. nat/profiler/decorators/function_tracking.py +160 -3
  180. nat/profiler/forecasting/models/forecasting_base_model.py +3 -1
  181. nat/profiler/forecasting/models/linear_model.py +1 -1
  182. nat/profiler/forecasting/models/random_forest_regressor.py +1 -1
  183. nat/profiler/inference_optimization/bottleneck_analysis/nested_stack_analysis.py +1 -1
  184. nat/profiler/inference_optimization/bottleneck_analysis/simple_stack_analysis.py +1 -1
  185. nat/profiler/inference_optimization/data_models.py +3 -3
  186. nat/profiler/inference_optimization/experimental/prefix_span_analysis.py +8 -9
  187. nat/profiler/inference_optimization/token_uniqueness.py +1 -1
  188. nat/profiler/parameter_optimization/__init__.py +0 -0
  189. nat/profiler/parameter_optimization/optimizable_utils.py +93 -0
  190. nat/profiler/parameter_optimization/optimizer_runtime.py +67 -0
  191. nat/profiler/parameter_optimization/parameter_optimizer.py +164 -0
  192. nat/profiler/parameter_optimization/parameter_selection.py +107 -0
  193. nat/profiler/parameter_optimization/pareto_visualizer.py +395 -0
  194. nat/profiler/parameter_optimization/prompt_optimizer.py +384 -0
  195. nat/profiler/parameter_optimization/update_helpers.py +66 -0
  196. nat/profiler/profile_runner.py +14 -9
  197. nat/profiler/utils.py +4 -2
  198. nat/registry_handlers/local/local_handler.py +2 -2
  199. nat/registry_handlers/package_utils.py +1 -2
  200. nat/registry_handlers/pypi/pypi_handler.py +23 -26
  201. nat/registry_handlers/register.py +3 -4
  202. nat/registry_handlers/rest/rest_handler.py +12 -13
  203. nat/retriever/milvus/retriever.py +2 -2
  204. nat/retriever/nemo_retriever/retriever.py +1 -1
  205. nat/retriever/register.py +0 -1
  206. nat/runtime/loader.py +2 -2
  207. nat/runtime/runner.py +105 -8
  208. nat/runtime/session.py +69 -8
  209. nat/settings/global_settings.py +16 -5
  210. nat/tool/chat_completion.py +5 -2
  211. nat/tool/code_execution/local_sandbox/local_sandbox_server.py +3 -3
  212. nat/tool/datetime_tools.py +49 -9
  213. nat/tool/document_search.py +2 -2
  214. nat/tool/github_tools.py +450 -0
  215. nat/tool/memory_tools/add_memory_tool.py +3 -3
  216. nat/tool/memory_tools/delete_memory_tool.py +3 -4
  217. nat/tool/memory_tools/get_memory_tool.py +4 -4
  218. nat/tool/nvidia_rag.py +1 -1
  219. nat/tool/register.py +2 -9
  220. nat/tool/retriever.py +3 -2
  221. nat/utils/callable_utils.py +70 -0
  222. nat/utils/data_models/schema_validator.py +3 -3
  223. nat/utils/decorators.py +210 -0
  224. nat/utils/exception_handlers/automatic_retries.py +104 -51
  225. nat/utils/exception_handlers/schemas.py +1 -1
  226. nat/utils/io/yaml_tools.py +2 -2
  227. nat/utils/log_levels.py +25 -0
  228. nat/utils/reactive/base/observable_base.py +2 -2
  229. nat/utils/reactive/base/observer_base.py +1 -1
  230. nat/utils/reactive/observable.py +2 -2
  231. nat/utils/reactive/observer.py +4 -4
  232. nat/utils/reactive/subscription.py +1 -1
  233. nat/utils/settings/global_settings.py +6 -8
  234. nat/utils/type_converter.py +12 -3
  235. nat/utils/type_utils.py +9 -5
  236. nvidia_nat-1.3.0.dist-info/METADATA +195 -0
  237. {nvidia_nat-1.2.1.dist-info → nvidia_nat-1.3.0.dist-info}/RECORD +244 -200
  238. {nvidia_nat-1.2.1.dist-info → nvidia_nat-1.3.0.dist-info}/entry_points.txt +1 -0
  239. nat/cli/commands/info/list_mcp.py +0 -304
  240. nat/tool/github_tools/create_github_commit.py +0 -133
  241. nat/tool/github_tools/create_github_issue.py +0 -87
  242. nat/tool/github_tools/create_github_pr.py +0 -106
  243. nat/tool/github_tools/get_github_file.py +0 -106
  244. nat/tool/github_tools/get_github_issue.py +0 -166
  245. nat/tool/github_tools/get_github_pr.py +0 -256
  246. nat/tool/github_tools/update_github_issue.py +0 -100
  247. nat/tool/mcp/exceptions.py +0 -142
  248. nat/tool/mcp/mcp_client.py +0 -255
  249. nat/tool/mcp/mcp_tool.py +0 -96
  250. nat/utils/exception_handlers/mcp.py +0 -211
  251. nvidia_nat-1.2.1.dist-info/METADATA +0 -365
  252. /nat/{tool/github_tools → agent/prompt_optimizer}/__init__.py +0 -0
  253. /nat/{tool/mcp → authentication/credential_validator}/__init__.py +0 -0
  254. {nvidia_nat-1.2.1.dist-info → nvidia_nat-1.3.0.dist-info}/WHEEL +0 -0
  255. {nvidia_nat-1.2.1.dist-info → nvidia_nat-1.3.0.dist-info}/licenses/LICENSE-3rd-party.txt +0 -0
  256. {nvidia_nat-1.2.1.dist-info → nvidia_nat-1.3.0.dist-info}/licenses/LICENSE.md +0 -0
  257. {nvidia_nat-1.2.1.dist-info → nvidia_nat-1.3.0.dist-info}/top_level.txt +0 -0
@@ -1,211 +0,0 @@
1
- # SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
- # SPDX-License-Identifier: Apache-2.0
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
- import logging
17
- import ssl
18
- import sys
19
- from collections.abc import Callable
20
- from functools import wraps
21
- from typing import Any
22
-
23
- import httpx
24
-
25
- from nat.tool.mcp.exceptions import MCPAuthenticationError
26
- from nat.tool.mcp.exceptions import MCPConnectionError
27
- from nat.tool.mcp.exceptions import MCPError
28
- from nat.tool.mcp.exceptions import MCPProtocolError
29
- from nat.tool.mcp.exceptions import MCPRequestError
30
- from nat.tool.mcp.exceptions import MCPSSLError
31
- from nat.tool.mcp.exceptions import MCPTimeoutError
32
- from nat.tool.mcp.exceptions import MCPToolNotFoundError
33
-
34
- logger = logging.getLogger(__name__)
35
-
36
-
37
- def format_mcp_error(error: MCPError, include_traceback: bool = False) -> None:
38
- """Format MCP errors for CLI display with structured logging and user guidance.
39
-
40
- Logs structured error information for debugging and displays user-friendly
41
- error messages with actionable suggestions to stderr.
42
-
43
- Args:
44
- error (MCPError): MCPError instance containing message, url, category, suggestions, and original_exception
45
- include_traceback (bool, optional): Whether to include the traceback in the error message. Defaults to False.
46
- """
47
- # Log structured error information for debugging
48
- logger.error("MCP operation failed: %s", error, exc_info=include_traceback)
49
-
50
- # Display user-friendly suggestions
51
- for suggestion in error.suggestions:
52
- print(f" → {suggestion}", file=sys.stderr)
53
-
54
-
55
- def _extract_url(args: tuple, kwargs: dict[str, Any], url_param: str, func_name: str) -> str:
56
- """Extract URL from function arguments using clean fallback chain.
57
-
58
- Args:
59
- args: Function positional arguments
60
- kwargs: Function keyword arguments
61
- url_param (str): Parameter name containing the URL
62
- func_name (str): Function name for logging
63
-
64
- Returns:
65
- str: URL string or "unknown" if extraction fails
66
- """
67
- # Try keyword arguments first
68
- if url_param in kwargs:
69
- return kwargs[url_param]
70
-
71
- # Try self attribute (e.g., self.url)
72
- if args and hasattr(args[0], url_param):
73
- return getattr(args[0], url_param)
74
-
75
- # Try common case: url as second parameter after self
76
- if len(args) > 1 and url_param == "url":
77
- return args[1]
78
-
79
- # Fallback with warning
80
- logger.warning("Could not extract URL for error handling in %s", func_name)
81
- return "unknown"
82
-
83
-
84
- def extract_primary_exception(exceptions: list[Exception]) -> Exception:
85
- """Extract the most relevant exception from a group.
86
-
87
- Prioritizes connection errors over others for better user experience.
88
-
89
- Args:
90
- exceptions (list[Exception]): List of exceptions from ExceptionGroup
91
-
92
- Returns:
93
- Exception: Most relevant exception for user feedback
94
- """
95
- # Prioritize connection errors
96
- for exc in exceptions:
97
- if isinstance(exc, (httpx.ConnectError, ConnectionError)):
98
- return exc
99
-
100
- # Then timeout errors
101
- for exc in exceptions:
102
- if isinstance(exc, httpx.TimeoutException):
103
- return exc
104
-
105
- # Then SSL errors
106
- for exc in exceptions:
107
- if isinstance(exc, ssl.SSLError):
108
- return exc
109
-
110
- # Fall back to first exception
111
- return exceptions[0]
112
-
113
-
114
- def convert_to_mcp_error(exception: Exception, url: str) -> MCPError:
115
- """Convert single exception to appropriate MCPError.
116
-
117
- Args:
118
- exception (Exception): Single exception to convert
119
- url (str): MCP server URL for context
120
-
121
- Returns:
122
- MCPError: Appropriate MCPError subclass
123
- """
124
- match exception:
125
- case httpx.ConnectError() | ConnectionError():
126
- return MCPConnectionError(url, exception)
127
- case httpx.TimeoutException():
128
- return MCPTimeoutError(url, exception)
129
- case ssl.SSLError():
130
- return MCPSSLError(url, exception)
131
- case httpx.RequestError():
132
- return MCPRequestError(url, exception)
133
- case ValueError() if "Tool" in str(exception) and "not available" in str(exception):
134
- # Extract tool name from error message if possible
135
- tool_name = str(exception).split("Tool ")[1].split(" not available")[0] if "Tool " in str(
136
- exception) else "unknown"
137
- return MCPToolNotFoundError(tool_name, url, exception)
138
- case _:
139
- # Handle TaskGroup error message specifically
140
- if "unhandled errors in a TaskGroup" in str(exception):
141
- return MCPProtocolError(url, "Failed to connect to MCP server", exception)
142
- if "unauthorized" in str(exception).lower() or "forbidden" in str(exception).lower():
143
- return MCPAuthenticationError(url, exception)
144
- return MCPError(f"Unexpected error: {exception}", url, original_exception=exception)
145
-
146
-
147
- def handle_mcp_exceptions(url_param: str = "url") -> Callable[..., Any]:
148
- """Decorator that handles exceptions and converts them to MCPErrors.
149
-
150
- This decorator wraps MCP client methods and converts low-level exceptions
151
- to structured MCPError instances with helpful user guidance.
152
-
153
- Args:
154
- url_param (str): Name of the parameter or attribute containing the MCP server URL
155
-
156
- Returns:
157
- Callable[..., Any]: Decorated function
158
-
159
- Example:
160
- .. code-block:: python
161
-
162
- @handle_mcp_exceptions("url")
163
- async def get_tools(self, url: str):
164
- # Method implementation
165
- pass
166
-
167
- @handle_mcp_exceptions("url") # Uses self.url
168
- async def get_tool(self):
169
- # Method implementation
170
- pass
171
- """
172
-
173
- def decorator(func: Callable[..., Any]) -> Callable[..., Any]:
174
-
175
- @wraps(func)
176
- async def wrapper(*args, **kwargs):
177
- try:
178
- return await func(*args, **kwargs)
179
- except MCPError:
180
- # Re-raise MCPErrors as-is
181
- raise
182
- except Exception as e:
183
- url = _extract_url(args, kwargs, url_param, func.__name__)
184
-
185
- # Handle ExceptionGroup by extracting most relevant exception
186
- if isinstance(e, ExceptionGroup): # noqa: F821
187
- primary_exception = extract_primary_exception(list(e.exceptions))
188
- mcp_error = convert_to_mcp_error(primary_exception, url)
189
- else:
190
- mcp_error = convert_to_mcp_error(e, url)
191
-
192
- raise mcp_error from e
193
-
194
- return wrapper
195
-
196
- return decorator
197
-
198
-
199
- def mcp_exception_handler(func: Callable[..., Any]) -> Callable[..., Any]:
200
- """Simplified decorator for methods that have self.url attribute.
201
-
202
- This is a convenience decorator that assumes the URL is available as self.url.
203
- Follows the same pattern as schema_exception_handler in this directory.
204
-
205
- Args:
206
- func (Callable[..., Any]): The function to decorate
207
-
208
- Returns:
209
- Callable[..., Any]: Decorated function
210
- """
211
- return handle_mcp_exceptions("url")(func)
@@ -1,365 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: nvidia-nat
3
- Version: 1.2.1
4
- Summary: NVIDIA NeMo Agent toolkit
5
- Author: NVIDIA Corporation
6
- Maintainer: NVIDIA Corporation
7
- License: Apache License
8
- Version 2.0, January 2004
9
- http://www.apache.org/licenses/
10
-
11
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
12
-
13
- 1. Definitions.
14
-
15
- "License" shall mean the terms and conditions for use, reproduction,
16
- and distribution as defined by Sections 1 through 9 of this document.
17
-
18
- "Licensor" shall mean the copyright owner or entity authorized by
19
- the copyright owner that is granting the License.
20
-
21
- "Legal Entity" shall mean the union of the acting entity and all
22
- other entities that control, are controlled by, or are under common
23
- control with that entity. For the purposes of this definition,
24
- "control" means (i) the power, direct or indirect, to cause the
25
- direction or management of such entity, whether by contract or
26
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
27
- outstanding shares, or (iii) beneficial ownership of such entity.
28
-
29
- "You" (or "Your") shall mean an individual or Legal Entity
30
- exercising permissions granted by this License.
31
-
32
- "Source" form shall mean the preferred form for making modifications,
33
- including but not limited to software source code, documentation
34
- source, and configuration files.
35
-
36
- "Object" form shall mean any form resulting from mechanical
37
- transformation or translation of a Source form, including but
38
- not limited to compiled object code, generated documentation,
39
- and conversions to other media types.
40
-
41
- "Work" shall mean the work of authorship, whether in Source or
42
- Object form, made available under the License, as indicated by a
43
- copyright notice that is included in or attached to the work
44
- (an example is provided in the Appendix below).
45
-
46
- "Derivative Works" shall mean any work, whether in Source or Object
47
- form, that is based on (or derived from) the Work and for which the
48
- editorial revisions, annotations, elaborations, or other modifications
49
- represent, as a whole, an original work of authorship. For the purposes
50
- of this License, Derivative Works shall not include works that remain
51
- separable from, or merely link (or bind by name) to the interfaces of,
52
- the Work and Derivative Works thereof.
53
-
54
- "Contribution" shall mean any work of authorship, including
55
- the original version of the Work and any modifications or additions
56
- to that Work or Derivative Works thereof, that is intentionally
57
- submitted to Licensor for inclusion in the Work by the copyright owner
58
- or by an individual or Legal Entity authorized to submit on behalf of
59
- the copyright owner. For the purposes of this definition, "submitted"
60
- means any form of electronic, verbal, or written communication sent
61
- to the Licensor or its representatives, including but not limited to
62
- communication on electronic mailing lists, source code control systems,
63
- and issue tracking systems that are managed by, or on behalf of, the
64
- Licensor for the purpose of discussing and improving the Work, but
65
- excluding communication that is conspicuously marked or otherwise
66
- designated in writing by the copyright owner as "Not a Contribution."
67
-
68
- "Contributor" shall mean Licensor and any individual or Legal Entity
69
- on behalf of whom a Contribution has been received by Licensor and
70
- subsequently incorporated within the Work.
71
-
72
- 2. Grant of Copyright License. Subject to the terms and conditions of
73
- this License, each Contributor hereby grants to You a perpetual,
74
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
75
- copyright license to reproduce, prepare Derivative Works of,
76
- publicly display, publicly perform, sublicense, and distribute the
77
- Work and such Derivative Works in Source or Object form.
78
-
79
- 3. Grant of Patent License. Subject to the terms and conditions of
80
- this License, each Contributor hereby grants to You a perpetual,
81
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
82
- (except as stated in this section) patent license to make, have made,
83
- use, offer to sell, sell, import, and otherwise transfer the Work,
84
- where such license applies only to those patent claims licensable
85
- by such Contributor that are necessarily infringed by their
86
- Contribution(s) alone or by combination of their Contribution(s)
87
- with the Work to which such Contribution(s) was submitted. If You
88
- institute patent litigation against any entity (including a
89
- cross-claim or counterclaim in a lawsuit) alleging that the Work
90
- or a Contribution incorporated within the Work constitutes direct
91
- or contributory patent infringement, then any patent licenses
92
- granted to You under this License for that Work shall terminate
93
- as of the date such litigation is filed.
94
-
95
- 4. Redistribution. You may reproduce and distribute copies of the
96
- Work or Derivative Works thereof in any medium, with or without
97
- modifications, and in Source or Object form, provided that You
98
- meet the following conditions:
99
-
100
- (a) You must give any other recipients of the Work or
101
- Derivative Works a copy of this License; and
102
-
103
- (b) You must cause any modified files to carry prominent notices
104
- stating that You changed the files; and
105
-
106
- (c) You must retain, in the Source form of any Derivative Works
107
- that You distribute, all copyright, patent, trademark, and
108
- attribution notices from the Source form of the Work,
109
- excluding those notices that do not pertain to any part of
110
- the Derivative Works; and
111
-
112
- (d) If the Work includes a "NOTICE" text file as part of its
113
- distribution, then any Derivative Works that You distribute must
114
- include a readable copy of the attribution notices contained
115
- within such NOTICE file, excluding those notices that do not
116
- pertain to any part of the Derivative Works, in at least one
117
- of the following places: within a NOTICE text file distributed
118
- as part of the Derivative Works; within the Source form or
119
- documentation, if provided along with the Derivative Works; or,
120
- within a display generated by the Derivative Works, if and
121
- wherever such third-party notices normally appear. The contents
122
- of the NOTICE file are for informational purposes only and
123
- do not modify the License. You may add Your own attribution
124
- notices within Derivative Works that You distribute, alongside
125
- or as an addendum to the NOTICE text from the Work, provided
126
- that such additional attribution notices cannot be construed
127
- as modifying the License.
128
-
129
- You may add Your own copyright statement to Your modifications and
130
- may provide additional or different license terms and conditions
131
- for use, reproduction, or distribution of Your modifications, or
132
- for any such Derivative Works as a whole, provided Your use,
133
- reproduction, and distribution of the Work otherwise complies with
134
- the conditions stated in this License.
135
-
136
- 5. Submission of Contributions. Unless You explicitly state otherwise,
137
- any Contribution intentionally submitted for inclusion in the Work
138
- by You to the Licensor shall be under the terms and conditions of
139
- this License, without any additional terms or conditions.
140
- Notwithstanding the above, nothing herein shall supersede or modify
141
- the terms of any separate license agreement you may have executed
142
- with Licensor regarding such Contributions.
143
-
144
- 6. Trademarks. This License does not grant permission to use the trade
145
- names, trademarks, service marks, or product names of the Licensor,
146
- except as required for reasonable and customary use in describing the
147
- origin of the Work and reproducing the content of the NOTICE file.
148
-
149
- 7. Disclaimer of Warranty. Unless required by applicable law or
150
- agreed to in writing, Licensor provides the Work (and each
151
- Contributor provides its Contributions) on an "AS IS" BASIS,
152
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
153
- implied, including, without limitation, any warranties or conditions
154
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
155
- PARTICULAR PURPOSE. You are solely responsible for determining the
156
- appropriateness of using or redistributing the Work and assume any
157
- risks associated with Your exercise of permissions under this License.
158
-
159
- 8. Limitation of Liability. In no event and under no legal theory,
160
- whether in tort (including negligence), contract, or otherwise,
161
- unless required by applicable law (such as deliberate and grossly
162
- negligent acts) or agreed to in writing, shall any Contributor be
163
- liable to You for damages, including any direct, indirect, special,
164
- incidental, or consequential damages of any character arising as a
165
- result of this License or out of the use or inability to use the
166
- Work (including but not limited to damages for loss of goodwill,
167
- work stoppage, computer failure or malfunction, or any and all
168
- other commercial damages or losses), even if such Contributor
169
- has been advised of the possibility of such damages.
170
-
171
- 9. Accepting Warranty or Additional Liability. While redistributing
172
- the Work or Derivative Works thereof, You may choose to offer,
173
- and charge a fee for, acceptance of support, warranty, indemnity,
174
- or other liability obligations and/or rights consistent with this
175
- License. However, in accepting such obligations, You may act only
176
- on Your own behalf and on Your sole responsibility, not on behalf
177
- of any other Contributor, and only if You agree to indemnify,
178
- defend, and hold each Contributor harmless for any liability
179
- incurred by, or claims asserted against, such Contributor by reason
180
- of your accepting any such warranty or additional liability.
181
-
182
- END OF TERMS AND CONDITIONS
183
-
184
- APPENDIX: How to apply the Apache License to your work.
185
-
186
- To apply the Apache License to your work, attach the following
187
- boilerplate notice, with the fields enclosed by brackets "[]"
188
- replaced with your own identifying information. (Don't include
189
- the brackets!) The text should be enclosed in the appropriate
190
- comment syntax for the file format. We also recommend that a
191
- file or class name and description of purpose be included on the
192
- same "printed page" as the copyright notice for easier
193
- identification within third-party archives.
194
-
195
- Copyright [yyyy] [name of copyright owner]
196
-
197
- Licensed under the Apache License, Version 2.0 (the "License");
198
- you may not use this file except in compliance with the License.
199
- You may obtain a copy of the License at
200
-
201
- http://www.apache.org/licenses/LICENSE-2.0
202
-
203
- Unless required by applicable law or agreed to in writing, software
204
- distributed under the License is distributed on an "AS IS" BASIS,
205
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
206
- See the License for the specific language governing permissions and
207
- limitations under the License.
208
- Keywords: ai,rag,agents
209
- Classifier: Programming Language :: Python
210
- Requires-Python: <3.13,>=3.11
211
- Description-Content-Type: text/markdown
212
- License-File: LICENSE-3rd-party.txt
213
- License-File: LICENSE.md
214
- Requires-Dist: aioboto3>=11.0.0
215
- Requires-Dist: authlib~=1.3.1
216
- Requires-Dist: click~=8.1
217
- Requires-Dist: colorama~=0.4.6
218
- Requires-Dist: datasets~=4.0
219
- Requires-Dist: expandvars~=1.0
220
- Requires-Dist: fastapi~=0.115.5
221
- Requires-Dist: httpx~=0.27
222
- Requires-Dist: jinja2~=3.1
223
- Requires-Dist: jsonpath-ng~=1.7
224
- Requires-Dist: mcp~=1.10
225
- Requires-Dist: networkx~=3.4
226
- Requires-Dist: numpy~=1.26
227
- Requires-Dist: openinference-semantic-conventions~=0.1.14
228
- Requires-Dist: openpyxl~=3.1
229
- Requires-Dist: pkce==1.0.3
230
- Requires-Dist: pkginfo~=1.12
231
- Requires-Dist: platformdirs~=4.3
232
- Requires-Dist: pydantic==2.10.*
233
- Requires-Dist: pymilvus~=2.4
234
- Requires-Dist: PyYAML~=6.0
235
- Requires-Dist: ragas~=0.2.14
236
- Requires-Dist: rich~=13.9
237
- Requires-Dist: tabulate~=0.9
238
- Requires-Dist: uvicorn[standard]~=0.32.0
239
- Requires-Dist: wikipedia~=1.4
240
- Provides-Extra: all
241
- Requires-Dist: nvidia-nat-all; extra == "all"
242
- Provides-Extra: agno
243
- Requires-Dist: nvidia-nat-agno; extra == "agno"
244
- Provides-Extra: crewai
245
- Requires-Dist: nvidia-nat-crewai; extra == "crewai"
246
- Provides-Extra: ingestion
247
- Requires-Dist: nvidia-nat-ingestion; extra == "ingestion"
248
- Provides-Extra: langchain
249
- Requires-Dist: nvidia-nat-langchain; extra == "langchain"
250
- Provides-Extra: llama-index
251
- Requires-Dist: nvidia-nat-llama-index; extra == "llama-index"
252
- Provides-Extra: mem0ai
253
- Requires-Dist: nvidia-nat-mem0ai; extra == "mem0ai"
254
- Provides-Extra: opentelemetry
255
- Requires-Dist: nvidia-nat-opentelemetry; extra == "opentelemetry"
256
- Provides-Extra: phoenix
257
- Requires-Dist: nvidia-nat-phoenix; extra == "phoenix"
258
- Provides-Extra: profiling
259
- Requires-Dist: nvidia-nat-profiling; extra == "profiling"
260
- Provides-Extra: ragaai
261
- Requires-Dist: nvidia-nat-ragaai; extra == "ragaai"
262
- Provides-Extra: mysql
263
- Requires-Dist: nvidia-nat-mysql; extra == "mysql"
264
- Provides-Extra: redis
265
- Requires-Dist: nvidia-nat-redis; extra == "redis"
266
- Provides-Extra: s3
267
- Requires-Dist: nvidia-nat-s3; extra == "s3"
268
- Provides-Extra: semantic-kernel
269
- Requires-Dist: nvidia-nat-semantic-kernel; extra == "semantic-kernel"
270
- Provides-Extra: telemetry
271
- Requires-Dist: nvidia-nat-opentelemetry; extra == "telemetry"
272
- Requires-Dist: nvidia-nat-phoenix; extra == "telemetry"
273
- Requires-Dist: nvidia-nat-weave; extra == "telemetry"
274
- Requires-Dist: nvidia-nat-ragaai; extra == "telemetry"
275
- Provides-Extra: weave
276
- Requires-Dist: nvidia-nat-weave; extra == "weave"
277
- Provides-Extra: zep-cloud
278
- Requires-Dist: nvidia-nat-zep-cloud; extra == "zep-cloud"
279
- Provides-Extra: examples
280
- Requires-Dist: nat_agno_personal_finance; extra == "examples"
281
- Requires-Dist: nat_alert_triage_agent; extra == "examples"
282
- Requires-Dist: nat_automated_description_generation; extra == "examples"
283
- Requires-Dist: nat_email_phishing_analyzer; extra == "examples"
284
- Requires-Dist: nat_multi_frameworks; extra == "examples"
285
- Requires-Dist: nat_first_search_agent; extra == "examples"
286
- Requires-Dist: nat_plot_charts; extra == "examples"
287
- Requires-Dist: nat_por_to_jiratickets; extra == "examples"
288
- Requires-Dist: nat_profiler_agent; extra == "examples"
289
- Requires-Dist: nat_redact_pii; extra == "examples"
290
- Requires-Dist: nat_retail_sales_agent; extra == "examples"
291
- Requires-Dist: nat_semantic_kernel_demo; extra == "examples"
292
- Requires-Dist: nat_simple_auth; extra == "examples"
293
- Requires-Dist: nat_simple_web_query; extra == "examples"
294
- Requires-Dist: nat_simple_web_query_eval; extra == "examples"
295
- Requires-Dist: nat_simple_calculator; extra == "examples"
296
- Requires-Dist: nat_simple_calculator_custom_routes; extra == "examples"
297
- Requires-Dist: nat_simple_calculator_eval; extra == "examples"
298
- Requires-Dist: nat_simple_calculator_mcp; extra == "examples"
299
- Requires-Dist: nat_simple_calculator_observability; extra == "examples"
300
- Requires-Dist: nat_simple_calculator_hitl; extra == "examples"
301
- Requires-Dist: nat_simple_rag; extra == "examples"
302
- Requires-Dist: nat_swe_bench; extra == "examples"
303
- Requires-Dist: nat_user_report; extra == "examples"
304
- Provides-Extra: gunicorn
305
- Requires-Dist: gunicorn~=23.0; extra == "gunicorn"
306
- Dynamic: license-file
307
-
308
- <!--
309
- SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
310
- SPDX-License-Identifier: Apache-2.0
311
-
312
- Licensed under the Apache License, Version 2.0 (the "License");
313
- you may not use this file except in compliance with the License.
314
- You may obtain a copy of the License at
315
-
316
- http://www.apache.org/licenses/LICENSE-2.0
317
-
318
- Unless required by applicable law or agreed to in writing, software
319
- distributed under the License is distributed on an "AS IS" BASIS,
320
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
321
- See the License for the specific language governing permissions and
322
- limitations under the License.
323
- -->
324
-
325
- ![NVIDIA NeMo Agent Toolkit](https://media.githubusercontent.com/media/NVIDIA/NeMo-Agent-Toolkit/refs/heads/main/docs/source/_static/banner.png "NeMo Agent toolkit banner image")
326
-
327
- # NVIDIA NeMo Agent Toolkit
328
-
329
- NeMo Agent toolkit is a flexible library designed to seamlessly integrate your enterprise agents—regardless of framework—with various data sources and tools. By treating agents, tools, and agentic workflows as simple function calls, NeMo Agent toolkit enables true composability: build once and reuse anywhere.
330
-
331
- ## Key Features
332
-
333
- - [**Framework Agnostic:**](https://docs.nvidia.com/nemo/agent-toolkit/1.2/extend/plugins.html) Works with any agentic framework, so you can use your current technology stack without replatforming.
334
- - [**Reusability:**](https://docs.nvidia.com/nemo/agent-toolkit/1.2/extend/sharing-components.html) Every agent, tool, or workflow can be combined and repurposed, allowing developers to leverage existing work in new scenarios.
335
- - [**Rapid Development:**](https://docs.nvidia.com/nemo/agent-toolkit/1.2/tutorials/index.html) Start with a pre-built agent, tool, or workflow, and customize it to your needs.
336
- - [**Profiling:**](https://docs.nvidia.com/nemo/agent-toolkit/1.2/workflows/profiler.html) Profile entire workflows down to the tool and agent level, track input/output tokens and timings, and identify bottlenecks.
337
- - [**Observability:**](https://docs.nvidia.com/nemo/agent-toolkit/1.2/workflows/observe/observe-workflow-with-phoenix.html) Monitor and debug your workflows with any OpenTelemetry-compatible observability tool, with examples using [Phoenix](https://docs.nvidia.com/nemo/agent-toolkit/1.2/workflows/observe/observe-workflow-with-phoenix.html) and [W&B Weave](https://docs.nvidia.com/nemo/agent-toolkit/1.2/workflows/observe/observe-workflow-with-weave.html).
338
- - [**Evaluation System:**](https://docs.nvidia.com/nemo/agent-toolkit/1.2/workflows/evaluate.html) Validate and maintain accuracy of agentic workflows with built-in evaluation tools.
339
- - [**User Interface:**](https://docs.nvidia.com/nemo/agent-toolkit/1.2/quick-start/launching-ui.html) Use the NeMo Agent toolkit UI chat interface to interact with your agents, visualize output, and debug workflows.
340
- - [**MCP Compatibility**](https://docs.nvidia.com/nemo/agent-toolkit/1.2/workflows/mcp/mcp-client.html) Compatible with Model Context Protocol (MCP), allowing tools served by MCP Servers to be used as NeMo Agent toolkit functions.
341
-
342
- With NeMo Agent toolkit, you can move quickly, experiment freely, and ensure reliability across all your agent-driven projects.
343
-
344
- ## Links
345
- * [Documentation](https://docs.nvidia.com/nemo/agent-toolkit/1.2/index.html): Explore the full documentation for NeMo Agent toolkit.
346
-
347
- ## First time user?
348
- If this is your first time using NeMo Agent toolkit, it is recommended to install the latest version from the [source repository](https://github.com/NVIDIA/NeMo-Agent-Toolkit?tab=readme-ov-file#quick-start) on GitHub. This package is intended for users who are familiar with NeMo Agent toolkit applications and need to add NeMo Agent toolkit as a dependency to their project.
349
-
350
- ## Feedback
351
-
352
- We would love to hear from you! Please file an issue on [GitHub](https://github.com/NVIDIA/NeMo-Agent-Toolkit/issues) if you have any feedback or feature requests.
353
-
354
- ## Acknowledgements
355
-
356
- We would like to thank the following open source projects that made NeMo Agent toolkit possible:
357
-
358
- - [CrewAI](https://github.com/crewAIInc/crewAI)
359
- - [FastAPI](https://github.com/tiangolo/fastapi)
360
- - [LangChain](https://github.com/langchain-ai/langchain)
361
- - [Llama-Index](https://github.com/run-llama/llama_index)
362
- - [Mem0ai](https://github.com/mem0ai/mem0)
363
- - [Ragas](https://github.com/explodinggradients/ragas)
364
- - [Semantic Kernel](https://github.com/microsoft/semantic-kernel)
365
- - [uv](https://github.com/astral-sh/uv)