aip-agents-binary 0.6.4__py3-none-manylinux_2_31_x86_64.whl → 0.6.5__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.
Potentially problematic release.
This version of aip-agents-binary might be problematic. Click here for more details.
- aip_agents/agent/__init__.py +44 -4
- aip_agents/mcp/client/__init__.py +38 -2
- aip_agents/sentry/sentry.py +29 -8
- {aip_agents_binary-0.6.4.dist-info → aip_agents_binary-0.6.5.dist-info}/METADATA +1 -1
- {aip_agents_binary-0.6.4.dist-info → aip_agents_binary-0.6.5.dist-info}/RECORD +7 -305
- aip_agents/__init__.pyi +0 -19
- aip_agents/a2a/__init__.pyi +0 -3
- aip_agents/a2a/server/__init__.pyi +0 -4
- aip_agents/a2a/server/base_executor.pyi +0 -73
- aip_agents/a2a/server/google_adk_executor.pyi +0 -51
- aip_agents/a2a/server/langflow_executor.pyi +0 -43
- aip_agents/a2a/server/langgraph_executor.pyi +0 -47
- aip_agents/a2a/types.pyi +0 -132
- aip_agents/agent/__init__.pyi +0 -9
- aip_agents/agent/base_agent.pyi +0 -221
- aip_agents/agent/base_langgraph_agent.pyi +0 -233
- aip_agents/agent/google_adk_agent.pyi +0 -141
- aip_agents/agent/google_adk_constants.pyi +0 -3
- aip_agents/agent/hitl/__init__.pyi +0 -6
- aip_agents/agent/hitl/config.pyi +0 -15
- aip_agents/agent/hitl/langgraph_hitl_mixin.pyi +0 -42
- aip_agents/agent/hitl/manager.pyi +0 -200
- aip_agents/agent/hitl/models.pyi +0 -3
- aip_agents/agent/hitl/prompt/__init__.pyi +0 -4
- aip_agents/agent/hitl/prompt/base.pyi +0 -24
- aip_agents/agent/hitl/prompt/deferred.pyi +0 -30
- aip_agents/agent/hitl/registry.pyi +0 -101
- aip_agents/agent/interface.pyi +0 -81
- aip_agents/agent/interfaces.pyi +0 -44
- aip_agents/agent/langflow_agent.pyi +0 -133
- aip_agents/agent/langgraph_memory_enhancer_agent.pyi +0 -50
- aip_agents/agent/langgraph_react_agent.pyi +0 -170
- aip_agents/agent/system_instruction_context.pyi +0 -13
- aip_agents/clients/__init__.pyi +0 -4
- aip_agents/clients/langflow/__init__.pyi +0 -4
- aip_agents/clients/langflow/client.pyi +0 -140
- aip_agents/clients/langflow/types.pyi +0 -7
- aip_agents/constants.pyi +0 -7
- aip_agents/examples/__init__.pyi +0 -0
- aip_agents/examples/compare_streaming_client.pyi +0 -48
- aip_agents/examples/compare_streaming_server.pyi +0 -18
- aip_agents/examples/hello_world_a2a_google_adk_client.pyi +0 -9
- aip_agents/examples/hello_world_a2a_google_adk_client_agent.pyi +0 -9
- aip_agents/examples/hello_world_a2a_google_adk_client_streaming.pyi +0 -9
- aip_agents/examples/hello_world_a2a_google_adk_server.pyi +0 -15
- aip_agents/examples/hello_world_a2a_langchain_client.pyi +0 -5
- aip_agents/examples/hello_world_a2a_langchain_client_agent.pyi +0 -5
- aip_agents/examples/hello_world_a2a_langchain_client_lm_invoker.pyi +0 -5
- aip_agents/examples/hello_world_a2a_langchain_client_streaming.pyi +0 -5
- aip_agents/examples/hello_world_a2a_langchain_reference_client_streaming.pyi +0 -5
- aip_agents/examples/hello_world_a2a_langchain_reference_server.pyi +0 -15
- aip_agents/examples/hello_world_a2a_langchain_server.pyi +0 -15
- aip_agents/examples/hello_world_a2a_langchain_server_lm_invoker.pyi +0 -15
- aip_agents/examples/hello_world_a2a_langflow_client.pyi +0 -9
- aip_agents/examples/hello_world_a2a_langflow_server.pyi +0 -14
- aip_agents/examples/hello_world_a2a_langgraph_artifact_client.pyi +0 -5
- aip_agents/examples/hello_world_a2a_langgraph_artifact_client_streaming.pyi +0 -5
- aip_agents/examples/hello_world_a2a_langgraph_artifact_server.pyi +0 -16
- aip_agents/examples/hello_world_a2a_langgraph_client.pyi +0 -9
- aip_agents/examples/hello_world_a2a_langgraph_client_agent.pyi +0 -9
- aip_agents/examples/hello_world_a2a_langgraph_client_agent_lm_invoker.pyi +0 -2
- aip_agents/examples/hello_world_a2a_langgraph_client_streaming.pyi +0 -9
- aip_agents/examples/hello_world_a2a_langgraph_client_streaming_lm_invoker.pyi +0 -5
- aip_agents/examples/hello_world_a2a_langgraph_client_streaming_tool_streaming.pyi +0 -5
- aip_agents/examples/hello_world_a2a_langgraph_server.pyi +0 -14
- aip_agents/examples/hello_world_a2a_langgraph_server_lm_invoker.pyi +0 -15
- aip_agents/examples/hello_world_a2a_langgraph_server_tool_streaming.pyi +0 -15
- aip_agents/examples/hello_world_a2a_mcp_langgraph.pyi +0 -48
- aip_agents/examples/hello_world_a2a_three_level_agent_hierarchy_client.pyi +0 -48
- aip_agents/examples/hello_world_a2a_three_level_agent_hierarchy_server.pyi +0 -45
- aip_agents/examples/hello_world_a2a_with_metadata_langchain_client.pyi +0 -5
- aip_agents/examples/hello_world_a2a_with_metadata_langchain_server_lm_invoker.pyi +0 -15
- aip_agents/examples/hello_world_google_adk.pyi +0 -5
- aip_agents/examples/hello_world_google_adk_mcp_http.pyi +0 -5
- aip_agents/examples/hello_world_google_adk_mcp_http_stream.pyi +0 -5
- aip_agents/examples/hello_world_google_adk_mcp_sse.pyi +0 -5
- aip_agents/examples/hello_world_google_adk_mcp_sse_stream.pyi +0 -5
- aip_agents/examples/hello_world_google_adk_mcp_stdio.pyi +0 -5
- aip_agents/examples/hello_world_google_adk_mcp_stdio_stream.pyi +0 -5
- aip_agents/examples/hello_world_google_adk_stream.pyi +0 -5
- aip_agents/examples/hello_world_langchain.pyi +0 -5
- aip_agents/examples/hello_world_langchain_lm_invoker.pyi +0 -2
- aip_agents/examples/hello_world_langchain_mcp_http.pyi +0 -5
- aip_agents/examples/hello_world_langchain_mcp_http_interactive.pyi +0 -16
- aip_agents/examples/hello_world_langchain_mcp_http_stream.pyi +0 -5
- aip_agents/examples/hello_world_langchain_mcp_multi_server.pyi +0 -18
- aip_agents/examples/hello_world_langchain_mcp_sse.pyi +0 -5
- aip_agents/examples/hello_world_langchain_mcp_sse_stream.pyi +0 -5
- aip_agents/examples/hello_world_langchain_mcp_stdio.pyi +0 -5
- aip_agents/examples/hello_world_langchain_mcp_stdio_stream.pyi +0 -5
- aip_agents/examples/hello_world_langchain_stream.pyi +0 -5
- aip_agents/examples/hello_world_langchain_stream_lm_invoker.pyi +0 -5
- aip_agents/examples/hello_world_langflow_agent.pyi +0 -35
- aip_agents/examples/hello_world_langgraph.pyi +0 -5
- aip_agents/examples/hello_world_langgraph_gl_connector_twitter.pyi +0 -5
- aip_agents/examples/hello_world_langgraph_mcp_http.pyi +0 -5
- aip_agents/examples/hello_world_langgraph_mcp_http_stream.pyi +0 -5
- aip_agents/examples/hello_world_langgraph_mcp_sse.pyi +0 -5
- aip_agents/examples/hello_world_langgraph_mcp_sse_stream.pyi +0 -5
- aip_agents/examples/hello_world_langgraph_mcp_stdio.pyi +0 -5
- aip_agents/examples/hello_world_langgraph_mcp_stdio_stream.pyi +0 -5
- aip_agents/examples/hello_world_langgraph_stream.pyi +0 -5
- aip_agents/examples/hello_world_langgraph_stream_lm_invoker.pyi +0 -5
- aip_agents/examples/hello_world_model_switch_cli.pyi +0 -30
- aip_agents/examples/hello_world_multi_agent_adk.pyi +0 -6
- aip_agents/examples/hello_world_multi_agent_langchain.pyi +0 -5
- aip_agents/examples/hello_world_multi_agent_langgraph.pyi +0 -5
- aip_agents/examples/hello_world_multi_agent_langgraph_lm_invoker.pyi +0 -5
- aip_agents/examples/hello_world_pii_logger.pyi +0 -5
- aip_agents/examples/hello_world_ptc.pyi +0 -5
- aip_agents/examples/hello_world_sentry.pyi +0 -21
- aip_agents/examples/hello_world_step_limits.pyi +0 -17
- aip_agents/examples/hello_world_stock_a2a_server.pyi +0 -17
- aip_agents/examples/hello_world_tool_output_client.pyi +0 -5
- aip_agents/examples/hello_world_tool_output_server.pyi +0 -19
- aip_agents/examples/hitl_demo.pyi +0 -67
- aip_agents/examples/pii_demo_langgraph_client.pyi +0 -5
- aip_agents/examples/pii_demo_langgraph_server.pyi +0 -20
- aip_agents/examples/pii_demo_multi_agent_client.pyi +0 -5
- aip_agents/examples/pii_demo_multi_agent_server.pyi +0 -40
- aip_agents/examples/todolist_planning_a2a_langchain_client.pyi +0 -5
- aip_agents/examples/todolist_planning_a2a_langgraph_server.pyi +0 -19
- aip_agents/examples/tools/__init__.pyi +0 -9
- aip_agents/examples/tools/adk_arithmetic_tools.pyi +0 -24
- aip_agents/examples/tools/adk_weather_tool.pyi +0 -18
- aip_agents/examples/tools/data_generator_tool.pyi +0 -15
- aip_agents/examples/tools/data_visualization_tool.pyi +0 -19
- aip_agents/examples/tools/image_artifact_tool.pyi +0 -26
- aip_agents/examples/tools/langchain_arithmetic_tools.pyi +0 -17
- aip_agents/examples/tools/langchain_currency_exchange_tool.pyi +0 -20
- aip_agents/examples/tools/langchain_graph_artifact_tool.pyi +0 -25
- aip_agents/examples/tools/langchain_weather_tool.pyi +0 -19
- aip_agents/examples/tools/langgraph_streaming_tool.pyi +0 -43
- aip_agents/examples/tools/mock_retrieval_tool.pyi +0 -13
- aip_agents/examples/tools/pii_demo_tools.pyi +0 -54
- aip_agents/examples/tools/random_chart_tool.pyi +0 -20
- aip_agents/examples/tools/serper_tool.pyi +0 -16
- aip_agents/examples/tools/stock_tools.pyi +0 -36
- aip_agents/examples/tools/table_generator_tool.pyi +0 -22
- aip_agents/examples/tools/time_tool.pyi +0 -15
- aip_agents/examples/tools/weather_forecast_tool.pyi +0 -14
- aip_agents/guardrails/__init__.pyi +0 -6
- aip_agents/guardrails/engines/__init__.pyi +0 -4
- aip_agents/guardrails/engines/base.pyi +0 -61
- aip_agents/guardrails/engines/nemo.pyi +0 -46
- aip_agents/guardrails/engines/phrase_matcher.pyi +0 -48
- aip_agents/guardrails/exceptions.pyi +0 -23
- aip_agents/guardrails/manager.pyi +0 -42
- aip_agents/guardrails/middleware.pyi +0 -87
- aip_agents/guardrails/schemas.pyi +0 -43
- aip_agents/guardrails/utils.pyi +0 -19
- aip_agents/mcp/__init__.pyi +0 -0
- aip_agents/mcp/client/__init__.pyi +0 -5
- aip_agents/mcp/client/base_mcp_client.pyi +0 -148
- aip_agents/mcp/client/connection_manager.pyi +0 -51
- aip_agents/mcp/client/google_adk/__init__.pyi +0 -3
- aip_agents/mcp/client/google_adk/client.pyi +0 -75
- aip_agents/mcp/client/langchain/__init__.pyi +0 -3
- aip_agents/mcp/client/langchain/client.pyi +0 -48
- aip_agents/mcp/client/persistent_session.pyi +0 -122
- aip_agents/mcp/client/session_pool.pyi +0 -101
- aip_agents/mcp/client/transports.pyi +0 -132
- aip_agents/mcp/utils/__init__.pyi +0 -0
- aip_agents/mcp/utils/config_validator.pyi +0 -82
- aip_agents/memory/__init__.pyi +0 -5
- aip_agents/memory/adapters/__init__.pyi +0 -4
- aip_agents/memory/adapters/base_adapter.pyi +0 -176
- aip_agents/memory/adapters/mem0.pyi +0 -22
- aip_agents/memory/base.pyi +0 -60
- aip_agents/memory/constants.pyi +0 -25
- aip_agents/memory/factory.pyi +0 -24
- aip_agents/memory/guidance.pyi +0 -3
- aip_agents/memory/simple_memory.pyi +0 -23
- aip_agents/middleware/__init__.pyi +0 -5
- aip_agents/middleware/base.pyi +0 -75
- aip_agents/middleware/manager.pyi +0 -84
- aip_agents/middleware/todolist.pyi +0 -125
- aip_agents/ptc/__init__.pyi +0 -10
- aip_agents/ptc/doc_gen.pyi +0 -40
- aip_agents/ptc/exceptions.pyi +0 -22
- aip_agents/ptc/executor.pyi +0 -73
- aip_agents/ptc/mcp/__init__.pyi +0 -7
- aip_agents/ptc/mcp/sandbox_bridge.pyi +0 -47
- aip_agents/ptc/mcp/templates/__init__.pyi +0 -0
- aip_agents/ptc/naming.pyi +0 -76
- aip_agents/ptc/payload.pyi +0 -15
- aip_agents/ptc/prompt_builder.pyi +0 -55
- aip_agents/ptc/ptc_helper.pyi +0 -1
- aip_agents/ptc/sandbox_bridge.pyi +0 -25
- aip_agents/ptc/template_utils.pyi +0 -13
- aip_agents/ptc/templates/__init__.pyi +0 -0
- aip_agents/sandbox/__init__.pyi +0 -5
- aip_agents/sandbox/defaults.pyi +0 -2
- aip_agents/sandbox/e2b_runtime.pyi +0 -51
- aip_agents/sandbox/template_builder.pyi +0 -36
- aip_agents/sandbox/types.pyi +0 -14
- aip_agents/sandbox/validation.pyi +0 -20
- aip_agents/schema/__init__.pyi +0 -9
- aip_agents/schema/a2a.pyi +0 -40
- aip_agents/schema/agent.pyi +0 -65
- aip_agents/schema/hitl.pyi +0 -89
- aip_agents/schema/langgraph.pyi +0 -28
- aip_agents/schema/model_id.pyi +0 -54
- aip_agents/schema/step_limit.pyi +0 -63
- aip_agents/schema/storage.pyi +0 -21
- aip_agents/sentry/__init__.pyi +0 -3
- aip_agents/sentry/sentry.pyi +0 -48
- aip_agents/storage/__init__.pyi +0 -8
- aip_agents/storage/base.pyi +0 -58
- aip_agents/storage/clients/__init__.pyi +0 -3
- aip_agents/storage/clients/minio_client.pyi +0 -137
- aip_agents/storage/config.pyi +0 -29
- aip_agents/storage/providers/__init__.pyi +0 -5
- aip_agents/storage/providers/base.pyi +0 -88
- aip_agents/storage/providers/memory.pyi +0 -79
- aip_agents/storage/providers/object_storage.pyi +0 -98
- aip_agents/tools/__init__.pyi +0 -11
- aip_agents/tools/browser_use/__init__.pyi +0 -14
- aip_agents/tools/browser_use/action_parser.pyi +0 -18
- aip_agents/tools/browser_use/browser_use_tool.pyi +0 -50
- aip_agents/tools/browser_use/llm_config.pyi +0 -52
- aip_agents/tools/browser_use/minio_storage.pyi +0 -109
- aip_agents/tools/browser_use/schemas.pyi +0 -32
- aip_agents/tools/browser_use/session.pyi +0 -4
- aip_agents/tools/browser_use/session_errors.pyi +0 -53
- aip_agents/tools/browser_use/steel_session_recording.pyi +0 -63
- aip_agents/tools/browser_use/streaming.pyi +0 -81
- aip_agents/tools/browser_use/structured_data_parser.pyi +0 -86
- aip_agents/tools/browser_use/structured_data_recovery.pyi +0 -43
- aip_agents/tools/browser_use/types.pyi +0 -45
- aip_agents/tools/code_sandbox/__init__.pyi +0 -3
- aip_agents/tools/code_sandbox/constant.pyi +0 -4
- aip_agents/tools/code_sandbox/e2b_cloud_sandbox_extended.pyi +0 -102
- aip_agents/tools/code_sandbox/e2b_sandbox_tool.pyi +0 -29
- aip_agents/tools/constants.pyi +0 -138
- aip_agents/tools/date_range_tool.pyi +0 -21
- aip_agents/tools/document_loader/__init__.pyi +0 -7
- aip_agents/tools/document_loader/base_reader.pyi +0 -75
- aip_agents/tools/document_loader/docx_reader_tool.pyi +0 -10
- aip_agents/tools/document_loader/excel_reader_tool.pyi +0 -26
- aip_agents/tools/document_loader/pdf_reader_tool.pyi +0 -11
- aip_agents/tools/document_loader/pdf_splitter.pyi +0 -18
- aip_agents/tools/execute_ptc_code.pyi +0 -90
- aip_agents/tools/gl_connector/__init__.pyi +0 -3
- aip_agents/tools/gl_connector/tool.pyi +0 -74
- aip_agents/tools/gl_connector_tools.pyi +0 -39
- aip_agents/tools/memory_search/__init__.pyi +0 -5
- aip_agents/tools/memory_search/base.pyi +0 -69
- aip_agents/tools/memory_search/mem0.pyi +0 -29
- aip_agents/tools/memory_search/schema.pyi +0 -25
- aip_agents/tools/memory_search_tool.pyi +0 -3
- aip_agents/tools/time_tool.pyi +0 -16
- aip_agents/tools/tool_config_injector.pyi +0 -26
- aip_agents/tools/web_search/__init__.pyi +0 -3
- aip_agents/tools/web_search/serper_tool.pyi +0 -19
- aip_agents/types/__init__.pyi +0 -36
- aip_agents/types/a2a_events.pyi +0 -3
- aip_agents/utils/__init__.pyi +0 -11
- aip_agents/utils/a2a_connector.pyi +0 -146
- aip_agents/utils/artifact_helpers.pyi +0 -203
- aip_agents/utils/constants.pyi +0 -10
- aip_agents/utils/datetime/__init__.pyi +0 -4
- aip_agents/utils/datetime/normalization.pyi +0 -95
- aip_agents/utils/datetime/timezone.pyi +0 -48
- aip_agents/utils/env_loader.pyi +0 -10
- aip_agents/utils/event_handler_registry.pyi +0 -23
- aip_agents/utils/file_prompt_utils.pyi +0 -21
- aip_agents/utils/final_response_builder.pyi +0 -34
- aip_agents/utils/formatter_llm_client.pyi +0 -71
- aip_agents/utils/langgraph/__init__.pyi +0 -3
- aip_agents/utils/langgraph/converter.pyi +0 -49
- aip_agents/utils/langgraph/tool_managers/__init__.pyi +0 -5
- aip_agents/utils/langgraph/tool_managers/a2a_tool_manager.pyi +0 -35
- aip_agents/utils/langgraph/tool_managers/base_tool_manager.pyi +0 -48
- aip_agents/utils/langgraph/tool_managers/delegation_tool_manager.pyi +0 -56
- aip_agents/utils/langgraph/tool_output_management.pyi +0 -329
- aip_agents/utils/logger.pyi +0 -60
- aip_agents/utils/metadata/__init__.pyi +0 -5
- aip_agents/utils/metadata/activity_metadata_helper.pyi +0 -25
- aip_agents/utils/metadata/activity_narrative/__init__.pyi +0 -7
- aip_agents/utils/metadata/activity_narrative/builder.pyi +0 -35
- aip_agents/utils/metadata/activity_narrative/constants.pyi +0 -10
- aip_agents/utils/metadata/activity_narrative/context.pyi +0 -32
- aip_agents/utils/metadata/activity_narrative/formatters.pyi +0 -48
- aip_agents/utils/metadata/activity_narrative/utils.pyi +0 -12
- aip_agents/utils/metadata/schemas/__init__.pyi +0 -4
- aip_agents/utils/metadata/schemas/activity_schema.pyi +0 -18
- aip_agents/utils/metadata/schemas/thinking_schema.pyi +0 -20
- aip_agents/utils/metadata/thinking_metadata_helper.pyi +0 -4
- aip_agents/utils/metadata_helper.pyi +0 -117
- aip_agents/utils/name_preprocessor/__init__.pyi +0 -6
- aip_agents/utils/name_preprocessor/base_name_preprocessor.pyi +0 -52
- aip_agents/utils/name_preprocessor/google_name_preprocessor.pyi +0 -38
- aip_agents/utils/name_preprocessor/name_preprocessor.pyi +0 -41
- aip_agents/utils/name_preprocessor/openai_name_preprocessor.pyi +0 -34
- aip_agents/utils/pii/__init__.pyi +0 -5
- aip_agents/utils/pii/pii_handler.pyi +0 -96
- aip_agents/utils/pii/pii_helper.pyi +0 -78
- aip_agents/utils/pii/uuid_deanonymizer_mapping.pyi +0 -73
- aip_agents/utils/reference_helper.pyi +0 -81
- aip_agents/utils/sse_chunk_transformer.pyi +0 -166
- aip_agents/utils/step_limit_manager.pyi +0 -112
- aip_agents/utils/token_usage_helper.pyi +0 -60
- {aip_agents_binary-0.6.4.dist-info → aip_agents_binary-0.6.5.dist-info}/WHEEL +0 -0
- {aip_agents_binary-0.6.4.dist-info → aip_agents_binary-0.6.5.dist-info}/top_level.txt +0 -0
aip_agents/agent/__init__.py
CHANGED
|
@@ -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.
|
|
14
|
-
|
|
15
|
-
|
|
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}'")
|
|
@@ -7,8 +7,44 @@ Authors:
|
|
|
7
7
|
Putu Ravindra Wiguna (putu.r.wiguna@gdplabs.id)
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
from typing import TYPE_CHECKING, Any
|
|
13
|
+
|
|
10
14
|
from aip_agents.mcp.client.base_mcp_client import BaseMCPClient
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
|
|
16
|
+
if TYPE_CHECKING:
|
|
17
|
+
from aip_agents.mcp.client.google_adk.client import GoogleADKMCPClient
|
|
18
|
+
from aip_agents.mcp.client.langchain.client import LangchainMCPClient
|
|
13
19
|
|
|
14
20
|
__all__ = ["GoogleADKMCPClient", "LangchainMCPClient", "BaseMCPClient"]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def __getattr__(name: str) -> Any:
|
|
24
|
+
"""Lazy import of MCP client implementations.
|
|
25
|
+
|
|
26
|
+
This avoids importing heavy dependencies (Google ADK, Vertex AI, etc.)
|
|
27
|
+
when they are not needed.
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
name: Attribute name to import.
|
|
31
|
+
|
|
32
|
+
Returns:
|
|
33
|
+
The requested class.
|
|
34
|
+
|
|
35
|
+
Raises:
|
|
36
|
+
AttributeError: If attribute is not found.
|
|
37
|
+
"""
|
|
38
|
+
if name == "GoogleADKMCPClient":
|
|
39
|
+
from aip_agents.mcp.client.google_adk.client import (
|
|
40
|
+
GoogleADKMCPClient as _GoogleADKMCPClient,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
return _GoogleADKMCPClient
|
|
44
|
+
elif name == "LangchainMCPClient":
|
|
45
|
+
from aip_agents.mcp.client.langchain.client import (
|
|
46
|
+
LangchainMCPClient as _LangchainMCPClient,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
return _LangchainMCPClient
|
|
50
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
aip_agents/sentry/sentry.py
CHANGED
|
@@ -6,6 +6,7 @@ Authors:
|
|
|
6
6
|
|
|
7
7
|
import inspect
|
|
8
8
|
import os
|
|
9
|
+
from typing import Any
|
|
9
10
|
|
|
10
11
|
from bosa_core.telemetry import (
|
|
11
12
|
FastAPIConfig,
|
|
@@ -20,7 +21,7 @@ from bosa_core.telemetry.opentelemetry.instrument.functions import (
|
|
|
20
21
|
from dotenv import load_dotenv
|
|
21
22
|
from fastapi import FastAPI
|
|
22
23
|
|
|
23
|
-
from aip_agents.agent import BaseAgent,
|
|
24
|
+
from aip_agents.agent import BaseAgent, LangChainAgent, LangGraphAgent
|
|
24
25
|
from aip_agents.utils.logger import get_logger
|
|
25
26
|
|
|
26
27
|
load_dotenv()
|
|
@@ -35,12 +36,32 @@ VERSION_NUMBER = os.getenv("VERSION_NUMBER", "0.0.0")
|
|
|
35
36
|
BUILD_NUMBER = os.getenv("BUILD_NUMBER", "0")
|
|
36
37
|
USE_OPENTELEMETRY = os.getenv("USE_OPENTELEMETRY", "true").lower() == "true"
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
# Lazy import of GoogleADKAgent to avoid heavy dependencies when not needed.
|
|
40
|
+
# This is initialized lazily by _get_classes_to_instrument() and can be
|
|
41
|
+
# patched by tests for mocking purposes.
|
|
42
|
+
CLASSES_TO_INSTRUMENT: list[type[Any]] | None = None
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _get_classes_to_instrument() -> list[type[Any]]:
|
|
46
|
+
"""Get the list of classes to instrument.
|
|
47
|
+
|
|
48
|
+
This lazily imports GoogleADKAgent only when telemetry is being set up,
|
|
49
|
+
avoiding the heavy Google ADK dependencies during module import.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
List of agent classes to instrument.
|
|
53
|
+
"""
|
|
54
|
+
global CLASSES_TO_INSTRUMENT
|
|
55
|
+
if CLASSES_TO_INSTRUMENT is None:
|
|
56
|
+
from aip_agents.agent import GoogleADKAgent
|
|
57
|
+
|
|
58
|
+
CLASSES_TO_INSTRUMENT = [
|
|
59
|
+
BaseAgent,
|
|
60
|
+
LangGraphAgent,
|
|
61
|
+
LangChainAgent,
|
|
62
|
+
GoogleADKAgent,
|
|
63
|
+
]
|
|
64
|
+
return CLASSES_TO_INSTRUMENT
|
|
44
65
|
|
|
45
66
|
|
|
46
67
|
def get_all_methods(cls: type) -> list:
|
|
@@ -66,7 +87,7 @@ def instrument_gl_functions() -> None:
|
|
|
66
87
|
if BOSAFunctionsInstrumentor is None:
|
|
67
88
|
return
|
|
68
89
|
agent_methods = []
|
|
69
|
-
for cls in
|
|
90
|
+
for cls in _get_classes_to_instrument():
|
|
70
91
|
agent_methods.extend(get_all_methods(cls))
|
|
71
92
|
BOSAFunctionsInstrumentor().instrument(methods=agent_methods)
|
|
72
93
|
|