aip-agents-binary 0.5.11__py3-none-manylinux_2_31_x86_64.whl → 0.6.8__py3-none-manylinux_2_31_x86_64.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 (167) hide show
  1. aip_agents/a2a/server/langgraph_executor.py +4 -1
  2. aip_agents/agent/__init__.py +44 -4
  3. aip_agents/agent/base_langgraph_agent.py +169 -74
  4. aip_agents/agent/base_langgraph_agent.pyi +3 -2
  5. aip_agents/agent/hitl/manager.py +10 -0
  6. aip_agents/agent/hitl/manager.pyi +1 -0
  7. aip_agents/agent/hitl/registry.py +149 -0
  8. aip_agents/agent/hitl/registry.pyi +101 -0
  9. aip_agents/agent/langgraph_memory_enhancer_agent.py +368 -34
  10. aip_agents/agent/langgraph_memory_enhancer_agent.pyi +3 -2
  11. aip_agents/agent/langgraph_react_agent.py +424 -35
  12. aip_agents/agent/langgraph_react_agent.pyi +46 -2
  13. aip_agents/examples/{hello_world_langgraph_bosa_twitter.py → hello_world_langgraph_gl_connector_twitter.py} +10 -7
  14. aip_agents/examples/hello_world_langgraph_gl_connector_twitter.pyi +5 -0
  15. aip_agents/examples/hello_world_ptc.py +49 -0
  16. aip_agents/examples/hello_world_ptc.pyi +5 -0
  17. aip_agents/examples/hello_world_ptc_custom_tools.py +83 -0
  18. aip_agents/examples/hello_world_ptc_custom_tools.pyi +7 -0
  19. aip_agents/examples/hello_world_sentry.py +2 -2
  20. aip_agents/examples/hello_world_tool_output_client.py +9 -0
  21. aip_agents/examples/tools/multiply_tool.py +43 -0
  22. aip_agents/examples/tools/multiply_tool.pyi +18 -0
  23. aip_agents/guardrails/__init__.py +83 -0
  24. aip_agents/guardrails/__init__.pyi +6 -0
  25. aip_agents/guardrails/engines/__init__.py +69 -0
  26. aip_agents/guardrails/engines/__init__.pyi +4 -0
  27. aip_agents/guardrails/engines/base.py +90 -0
  28. aip_agents/guardrails/engines/base.pyi +61 -0
  29. aip_agents/guardrails/engines/nemo.py +101 -0
  30. aip_agents/guardrails/engines/nemo.pyi +46 -0
  31. aip_agents/guardrails/engines/phrase_matcher.py +113 -0
  32. aip_agents/guardrails/engines/phrase_matcher.pyi +48 -0
  33. aip_agents/guardrails/exceptions.py +39 -0
  34. aip_agents/guardrails/exceptions.pyi +23 -0
  35. aip_agents/guardrails/manager.py +163 -0
  36. aip_agents/guardrails/manager.pyi +42 -0
  37. aip_agents/guardrails/middleware.py +199 -0
  38. aip_agents/guardrails/middleware.pyi +87 -0
  39. aip_agents/guardrails/schemas.py +63 -0
  40. aip_agents/guardrails/schemas.pyi +43 -0
  41. aip_agents/guardrails/utils.py +45 -0
  42. aip_agents/guardrails/utils.pyi +19 -0
  43. aip_agents/mcp/client/__init__.py +38 -2
  44. aip_agents/mcp/client/connection_manager.py +36 -1
  45. aip_agents/mcp/client/connection_manager.pyi +3 -0
  46. aip_agents/mcp/client/persistent_session.py +318 -65
  47. aip_agents/mcp/client/persistent_session.pyi +9 -0
  48. aip_agents/mcp/client/transports.py +52 -4
  49. aip_agents/mcp/client/transports.pyi +9 -0
  50. aip_agents/memory/adapters/base_adapter.py +98 -0
  51. aip_agents/memory/adapters/base_adapter.pyi +25 -0
  52. aip_agents/middleware/base.py +8 -0
  53. aip_agents/middleware/base.pyi +4 -0
  54. aip_agents/middleware/manager.py +22 -0
  55. aip_agents/middleware/manager.pyi +4 -0
  56. aip_agents/ptc/__init__.py +87 -0
  57. aip_agents/ptc/__init__.pyi +14 -0
  58. aip_agents/ptc/custom_tools.py +473 -0
  59. aip_agents/ptc/custom_tools.pyi +184 -0
  60. aip_agents/ptc/custom_tools_payload.py +400 -0
  61. aip_agents/ptc/custom_tools_payload.pyi +31 -0
  62. aip_agents/ptc/custom_tools_templates/__init__.py +1 -0
  63. aip_agents/ptc/custom_tools_templates/__init__.pyi +0 -0
  64. aip_agents/ptc/custom_tools_templates/custom_build_function.py.template +23 -0
  65. aip_agents/ptc/custom_tools_templates/custom_init.py.template +15 -0
  66. aip_agents/ptc/custom_tools_templates/custom_invoke.py.template +60 -0
  67. aip_agents/ptc/custom_tools_templates/custom_registry.py.template +87 -0
  68. aip_agents/ptc/custom_tools_templates/custom_sources_init.py.template +7 -0
  69. aip_agents/ptc/custom_tools_templates/custom_wrapper.py.template +19 -0
  70. aip_agents/ptc/doc_gen.py +122 -0
  71. aip_agents/ptc/doc_gen.pyi +40 -0
  72. aip_agents/ptc/exceptions.py +57 -0
  73. aip_agents/ptc/exceptions.pyi +37 -0
  74. aip_agents/ptc/executor.py +261 -0
  75. aip_agents/ptc/executor.pyi +99 -0
  76. aip_agents/ptc/mcp/__init__.py +45 -0
  77. aip_agents/ptc/mcp/__init__.pyi +7 -0
  78. aip_agents/ptc/mcp/sandbox_bridge.py +668 -0
  79. aip_agents/ptc/mcp/sandbox_bridge.pyi +47 -0
  80. aip_agents/ptc/mcp/templates/__init__.py +1 -0
  81. aip_agents/ptc/mcp/templates/__init__.pyi +0 -0
  82. aip_agents/ptc/mcp/templates/mcp_client.py.template +239 -0
  83. aip_agents/ptc/naming.py +196 -0
  84. aip_agents/ptc/naming.pyi +85 -0
  85. aip_agents/ptc/payload.py +26 -0
  86. aip_agents/ptc/payload.pyi +15 -0
  87. aip_agents/ptc/prompt_builder.py +673 -0
  88. aip_agents/ptc/prompt_builder.pyi +59 -0
  89. aip_agents/ptc/ptc_helper.py +16 -0
  90. aip_agents/ptc/ptc_helper.pyi +1 -0
  91. aip_agents/ptc/sandbox_bridge.py +256 -0
  92. aip_agents/ptc/sandbox_bridge.pyi +38 -0
  93. aip_agents/ptc/template_utils.py +33 -0
  94. aip_agents/ptc/template_utils.pyi +13 -0
  95. aip_agents/ptc/templates/__init__.py +1 -0
  96. aip_agents/ptc/templates/__init__.pyi +0 -0
  97. aip_agents/ptc/templates/ptc_helper.py.template +134 -0
  98. aip_agents/ptc/tool_def_helpers.py +101 -0
  99. aip_agents/ptc/tool_def_helpers.pyi +38 -0
  100. aip_agents/ptc/tool_enrichment.py +163 -0
  101. aip_agents/ptc/tool_enrichment.pyi +60 -0
  102. aip_agents/sandbox/__init__.py +43 -0
  103. aip_agents/sandbox/__init__.pyi +5 -0
  104. aip_agents/sandbox/defaults.py +205 -0
  105. aip_agents/sandbox/defaults.pyi +30 -0
  106. aip_agents/sandbox/e2b_runtime.py +295 -0
  107. aip_agents/sandbox/e2b_runtime.pyi +57 -0
  108. aip_agents/sandbox/template_builder.py +131 -0
  109. aip_agents/sandbox/template_builder.pyi +36 -0
  110. aip_agents/sandbox/types.py +24 -0
  111. aip_agents/sandbox/types.pyi +14 -0
  112. aip_agents/sandbox/validation.py +50 -0
  113. aip_agents/sandbox/validation.pyi +20 -0
  114. aip_agents/sentry/__init__.py +1 -1
  115. aip_agents/sentry/sentry.py +33 -12
  116. aip_agents/sentry/sentry.pyi +5 -4
  117. aip_agents/tools/__init__.py +60 -2
  118. aip_agents/tools/__init__.pyi +9 -2
  119. aip_agents/tools/browser_use/__init__.py +1 -1
  120. aip_agents/tools/browser_use/browser_use_tool.py +8 -0
  121. aip_agents/tools/browser_use/streaming.py +2 -0
  122. aip_agents/tools/code_sandbox/__init__.py +1 -1
  123. aip_agents/tools/code_sandbox/e2b_cloud_sandbox_extended.py +80 -31
  124. aip_agents/tools/code_sandbox/e2b_cloud_sandbox_extended.pyi +25 -9
  125. aip_agents/tools/code_sandbox/e2b_sandbox_tool.py +6 -6
  126. aip_agents/tools/constants.py +24 -12
  127. aip_agents/tools/constants.pyi +14 -11
  128. aip_agents/tools/date_range_tool.py +554 -0
  129. aip_agents/tools/date_range_tool.pyi +21 -0
  130. aip_agents/tools/document_loader/__init__.py +8 -1
  131. aip_agents/tools/document_loader/base_reader.py +42 -2
  132. aip_agents/tools/document_loader/base_reader.pyi +15 -2
  133. aip_agents/tools/document_loader/docx_reader_tool.py +17 -2
  134. aip_agents/tools/document_loader/docx_reader_tool.pyi +5 -1
  135. aip_agents/tools/document_loader/excel_reader_tool.py +14 -3
  136. aip_agents/tools/document_loader/excel_reader_tool.pyi +1 -1
  137. aip_agents/tools/document_loader/pdf_reader_tool.py +17 -5
  138. aip_agents/tools/document_loader/pdf_reader_tool.pyi +1 -1
  139. aip_agents/tools/execute_ptc_code.py +357 -0
  140. aip_agents/tools/execute_ptc_code.pyi +90 -0
  141. aip_agents/tools/gl_connector/__init__.py +1 -1
  142. aip_agents/tools/gl_connector/tool.py +62 -30
  143. aip_agents/tools/gl_connector/tool.pyi +3 -3
  144. aip_agents/tools/gl_connector_tools.py +119 -0
  145. aip_agents/tools/gl_connector_tools.pyi +39 -0
  146. aip_agents/tools/memory_search/__init__.py +8 -1
  147. aip_agents/tools/memory_search/__init__.pyi +3 -3
  148. aip_agents/tools/memory_search/mem0.py +114 -1
  149. aip_agents/tools/memory_search/mem0.pyi +11 -1
  150. aip_agents/tools/memory_search/schema.py +33 -0
  151. aip_agents/tools/memory_search/schema.pyi +10 -0
  152. aip_agents/tools/memory_search_tool.py +8 -0
  153. aip_agents/tools/memory_search_tool.pyi +2 -2
  154. aip_agents/tools/time_tool.py +117 -0
  155. aip_agents/tools/time_tool.pyi +16 -0
  156. aip_agents/utils/langgraph/tool_managers/delegation_tool_manager.py +26 -1
  157. aip_agents/utils/langgraph/tool_output_management.py +80 -0
  158. aip_agents/utils/langgraph/tool_output_management.pyi +37 -0
  159. {aip_agents_binary-0.5.11.dist-info → aip_agents_binary-0.6.8.dist-info}/METADATA +17 -33
  160. {aip_agents_binary-0.5.11.dist-info → aip_agents_binary-0.6.8.dist-info}/RECORD +162 -72
  161. {aip_agents_binary-0.5.11.dist-info → aip_agents_binary-0.6.8.dist-info}/WHEEL +1 -1
  162. aip_agents/examples/demo_memory_recall.py +0 -401
  163. aip_agents/examples/demo_memory_recall.pyi +0 -58
  164. aip_agents/examples/hello_world_langgraph_bosa_twitter.pyi +0 -5
  165. aip_agents/tools/bosa_tools.py +0 -105
  166. aip_agents/tools/bosa_tools.pyi +0 -37
  167. {aip_agents_binary-0.5.11.dist-info → aip_agents_binary-0.6.8.dist-info}/top_level.txt +0 -0
@@ -255,6 +255,7 @@ class LangGraphA2AExecutor(BaseA2AExecutor, ABC):
255
255
  return []
256
256
 
257
257
  normalized_files: list[str | dict[str, Any]] = []
258
+ invalid_entry_logged = False
258
259
  for entry in raw_files:
259
260
  if isinstance(entry, str) and entry:
260
261
  normalized_files.append(entry)
@@ -262,6 +263,8 @@ class LangGraphA2AExecutor(BaseA2AExecutor, ABC):
262
263
  if isinstance(entry, dict):
263
264
  normalized_files.append(entry)
264
265
  continue
265
- logger.warning("Invalid file metadata entry received; expected string or dict.")
266
+ if not invalid_entry_logged:
267
+ logger.warning("Invalid file metadata entry received; expected string or dict.")
268
+ invalid_entry_logged = True
266
269
 
267
270
  return normalized_files
@@ -6,13 +6,25 @@ Author:
6
6
  Christian Trisno Sen Long Chen (christian.t.s.l.chen@gdplabs.id)
7
7
  """
8
8
 
9
+ from __future__ import annotations
10
+
11
+ from typing import TYPE_CHECKING, Any
12
+
9
13
  from aip_agents.agent.base_agent import BaseAgent
14
+
15
+ if TYPE_CHECKING:
16
+ from aip_agents.agent.google_adk_agent import GoogleADKAgent
17
+ from aip_agents.agent.langflow_agent import LangflowAgent
10
18
  from aip_agents.agent.base_langgraph_agent import BaseLangGraphAgent
11
- from aip_agents.agent.google_adk_agent import GoogleADKAgent
12
19
  from aip_agents.agent.interface import AgentInterface
13
- from aip_agents.agent.langflow_agent import LangflowAgent
14
- from aip_agents.agent.langgraph_memory_enhancer_agent import LangGraphMemoryEnhancerAgent
15
- from aip_agents.agent.langgraph_react_agent import LangChainAgent, LangGraphAgent, LangGraphReactAgent
20
+ from aip_agents.agent.langgraph_memory_enhancer_agent import (
21
+ LangGraphMemoryEnhancerAgent,
22
+ )
23
+ from aip_agents.agent.langgraph_react_agent import (
24
+ LangChainAgent,
25
+ LangGraphAgent,
26
+ LangGraphReactAgent,
27
+ )
16
28
 
17
29
  __all__ = [
18
30
  "AgentInterface",
@@ -25,3 +37,31 @@ __all__ = [
25
37
  "LangflowAgent",
26
38
  "LangGraphMemoryEnhancerAgent",
27
39
  ]
40
+
41
+
42
+ def __getattr__(name: str) -> Any:
43
+ """Lazy import of heavy agent implementations.
44
+
45
+ This avoids importing heavy dependencies (Google ADK, etc.)
46
+ when they are not needed.
47
+
48
+ Args:
49
+ name: Attribute name to import.
50
+
51
+ Returns:
52
+ The requested class.
53
+
54
+ Raises:
55
+ AttributeError: If attribute is not found.
56
+ """
57
+ if name == "GoogleADKAgent":
58
+ from aip_agents.agent.google_adk_agent import (
59
+ GoogleADKAgent as _GoogleADKAgent,
60
+ )
61
+
62
+ return _GoogleADKAgent
63
+ elif name == "LangflowAgent":
64
+ from aip_agents.agent.langflow_agent import LangflowAgent as _LangflowAgent
65
+
66
+ return _LangflowAgent
67
+ raise AttributeError(f"module '{__name__}' has no attribute '{name}'")