solace-agent-mesh 1.11.2__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.
- solace_agent_mesh/__init__.py +0 -0
- solace_agent_mesh/agent/__init__.py +0 -0
- solace_agent_mesh/agent/adk/__init__.py +0 -0
- solace_agent_mesh/agent/adk/adk_llm.txt +226 -0
- solace_agent_mesh/agent/adk/adk_llm_detail.txt +566 -0
- solace_agent_mesh/agent/adk/alembic/README +74 -0
- solace_agent_mesh/agent/adk/alembic/env.py +77 -0
- solace_agent_mesh/agent/adk/alembic/script.py.mako +28 -0
- solace_agent_mesh/agent/adk/alembic/versions/e2902798564d_adk_session_db_upgrade.py +52 -0
- solace_agent_mesh/agent/adk/alembic.ini +112 -0
- solace_agent_mesh/agent/adk/app_llm_agent.py +52 -0
- solace_agent_mesh/agent/adk/artifacts/__init__.py +1 -0
- solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +171 -0
- solace_agent_mesh/agent/adk/artifacts/filesystem_artifact_service.py +545 -0
- solace_agent_mesh/agent/adk/artifacts/s3_artifact_service.py +609 -0
- solace_agent_mesh/agent/adk/callbacks.py +2318 -0
- solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +406 -0
- solace_agent_mesh/agent/adk/intelligent_mcp_callbacks.py +415 -0
- solace_agent_mesh/agent/adk/mcp_content_processor.py +666 -0
- solace_agent_mesh/agent/adk/models/lite_llm.py +1026 -0
- solace_agent_mesh/agent/adk/models/models_llm.txt +189 -0
- solace_agent_mesh/agent/adk/models/oauth2_token_manager.py +132 -0
- solace_agent_mesh/agent/adk/runner.py +390 -0
- solace_agent_mesh/agent/adk/schema_migration.py +88 -0
- solace_agent_mesh/agent/adk/services.py +468 -0
- solace_agent_mesh/agent/adk/setup.py +1325 -0
- solace_agent_mesh/agent/adk/stream_parser.py +415 -0
- solace_agent_mesh/agent/adk/tool_wrapper.py +165 -0
- solace_agent_mesh/agent/agent_llm.txt +369 -0
- solace_agent_mesh/agent/agent_llm_detail.txt +1702 -0
- solace_agent_mesh/agent/protocol/__init__.py +0 -0
- solace_agent_mesh/agent/protocol/event_handlers.py +2041 -0
- solace_agent_mesh/agent/protocol/protocol_llm.txt +81 -0
- solace_agent_mesh/agent/protocol/protocol_llm_detail.txt +92 -0
- solace_agent_mesh/agent/proxies/__init__.py +0 -0
- solace_agent_mesh/agent/proxies/a2a/__init__.py +3 -0
- solace_agent_mesh/agent/proxies/a2a/a2a_llm.txt +190 -0
- solace_agent_mesh/agent/proxies/a2a/app.py +56 -0
- solace_agent_mesh/agent/proxies/a2a/component.py +1585 -0
- solace_agent_mesh/agent/proxies/a2a/config.py +216 -0
- solace_agent_mesh/agent/proxies/a2a/oauth_token_cache.py +104 -0
- solace_agent_mesh/agent/proxies/base/__init__.py +3 -0
- solace_agent_mesh/agent/proxies/base/app.py +100 -0
- solace_agent_mesh/agent/proxies/base/base_llm.txt +148 -0
- solace_agent_mesh/agent/proxies/base/component.py +816 -0
- solace_agent_mesh/agent/proxies/base/config.py +85 -0
- solace_agent_mesh/agent/proxies/base/proxy_task_context.py +19 -0
- solace_agent_mesh/agent/proxies/proxies_llm.txt +283 -0
- solace_agent_mesh/agent/sac/__init__.py +0 -0
- solace_agent_mesh/agent/sac/app.py +595 -0
- solace_agent_mesh/agent/sac/component.py +3668 -0
- solace_agent_mesh/agent/sac/patch_adk.py +103 -0
- solace_agent_mesh/agent/sac/sac_llm.txt +189 -0
- solace_agent_mesh/agent/sac/sac_llm_detail.txt +200 -0
- solace_agent_mesh/agent/sac/task_execution_context.py +415 -0
- solace_agent_mesh/agent/testing/__init__.py +3 -0
- solace_agent_mesh/agent/testing/debug_utils.py +135 -0
- solace_agent_mesh/agent/testing/testing_llm.txt +58 -0
- solace_agent_mesh/agent/testing/testing_llm_detail.txt +68 -0
- solace_agent_mesh/agent/tools/__init__.py +16 -0
- solace_agent_mesh/agent/tools/audio_tools.py +1740 -0
- solace_agent_mesh/agent/tools/builtin_artifact_tools.py +2500 -0
- solace_agent_mesh/agent/tools/builtin_data_analysis_tools.py +244 -0
- solace_agent_mesh/agent/tools/dynamic_tool.py +396 -0
- solace_agent_mesh/agent/tools/general_agent_tools.py +572 -0
- solace_agent_mesh/agent/tools/image_tools.py +1185 -0
- solace_agent_mesh/agent/tools/peer_agent_tool.py +363 -0
- solace_agent_mesh/agent/tools/registry.py +38 -0
- solace_agent_mesh/agent/tools/test_tools.py +136 -0
- solace_agent_mesh/agent/tools/time_tools.py +126 -0
- solace_agent_mesh/agent/tools/tool_config_types.py +93 -0
- solace_agent_mesh/agent/tools/tool_definition.py +53 -0
- solace_agent_mesh/agent/tools/tools_llm.txt +276 -0
- solace_agent_mesh/agent/tools/tools_llm_detail.txt +275 -0
- solace_agent_mesh/agent/tools/web_tools.py +392 -0
- solace_agent_mesh/agent/utils/__init__.py +0 -0
- solace_agent_mesh/agent/utils/artifact_helpers.py +1353 -0
- solace_agent_mesh/agent/utils/config_parser.py +49 -0
- solace_agent_mesh/agent/utils/context_helpers.py +77 -0
- solace_agent_mesh/agent/utils/utils_llm.txt +152 -0
- solace_agent_mesh/agent/utils/utils_llm_detail.txt +149 -0
- solace_agent_mesh/assets/docs/404.html +16 -0
- solace_agent_mesh/assets/docs/assets/css/styles.8162edfb.css +1 -0
- solace_agent_mesh/assets/docs/assets/images/Solace_AI_Framework_With_Broker-85f0a306a9bcdd20b390b7a949f6d862.png +0 -0
- solace_agent_mesh/assets/docs/assets/images/sam-enterprise-credentials-b269f095349473118b2b33bdfcc40122.png +0 -0
- solace_agent_mesh/assets/docs/assets/js/032c2d61.f3d37824.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/05749d90.19ac4f35.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/0bcf40b7.c019ad46.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/1001.0182a8bd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/1039.0bd46aa1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/149.b797a808.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/15ba94aa.92fea363.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/15e40e79.434bb30f.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/165.6a39807d.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/165.6a39807d.js.LICENSE.txt +9 -0
- solace_agent_mesh/assets/docs/assets/js/17896441.e612dfb4.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2130.ab9fd314.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2131ec11.5c7a1f6e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2237.5e477fc6.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2279.550aa580.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/2279.550aa580.js.LICENSE.txt +13 -0
- solace_agent_mesh/assets/docs/assets/js/2334.1cf50a20.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/240a0364.9ad94d1b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2987107d.a80604f9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2e32b5e0.33f5d75b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3219.adc1d663.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/341393d4.0fac2613.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3624.0eaa1fd0.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/375.708d48db.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3834.b6cd790e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3a6c6137.f5940cfa.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3ac1795d.28b7c67b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3ff0015d.2ddc75c0.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/41adc471.48b12a4e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/4250.95455b28.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/4356.d169ab5b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/4458.518e66fa.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/4488.c7cc3442.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/4494.6ee23046.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/4855.fc4444b6.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/4866.22daefc0.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/4950.ca4caeda.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/509e993c.a1fbf45a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/5388.7a136447.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/547e15cc.2f7790c1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/55b7b518.29d6e75d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/5607.081356f8.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/5864.b0d0e9de.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/5c2bd65f.90a87880.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/5e95c892.558d5167.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6063ff4c.ef84f702.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/60702c0e.a8bdd79b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6143.0a1464c9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/631738c7.fa471607.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6395.e9c73649.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/64195356.c498c4d0.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/66d4869e.b77431fc.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6796.51d2c9b7.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6976.379be23b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6978.ee0b945c.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6a520c9d.b6e3f2ce.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6aaedf65.7253541d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6ad8f0bd.a5b36a60.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6d84eae0.fd23ba4a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6fdfefc7.99de744e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/7040.cb436723.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/7195.412f418a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/71da7b71.374b9d54.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/722f809d.965da774.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/7280.3fb73bdb.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/742f027b.46c07808.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/77cf947d.48cb18a2.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/7845.e33e7c4c.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/7900.69516146.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8024126c.fa0e7186.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/81a99df0.2484b8d9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/82fbfb93.161823a5.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8356.8a379c04.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8567.4732c6b7.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8573.cb04eda5.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8577.1d54e766.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8591.5d015485.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/8591.5d015485.js.LICENSE.txt +61 -0
- solace_agent_mesh/assets/docs/assets/js/8709.7ecd4047.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8731.6c1dbf0c.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8908.f9d1b506.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8b032486.91a91afc.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9157.b4093d07.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/924ffdeb.975e428a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9278.a4fd875d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/945fb41e.6f4cdffd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/94e8668d.16083b3f.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9616.b75c2f6d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9793.c6d16376.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9bb13469.b2333011.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9e9d0a82.570c057b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/a7bd4aaa.2204d2f7.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/a94703ab.3e5fbcb3.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ab9708a8.245ae0ef.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/aba21aa0.c42a534c.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ad71b5ed.af3ecfd1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ad87452a.9d73dad6.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/c198a0dc.8f31f867.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/c93cbaa0.0e0d8baf.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/cab03b5b.6a073091.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/cbe2e9ea.07e170dd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ceb2a7a6.5d92d7d0.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/da0b5bad.b62f7b08.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/db5d6442.3daf1696.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/db924877.e98d12a1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/dd817ffc.c37a755e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/dd81e2b8.b682e9c2.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/de5f4c65.e8241890.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/de915948.44a432bc.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e04b235d.52cb25ed.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e1b6eeb4.b1068f9b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e3d9abda.1476f570.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e6f9706b.4488e34c.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e92d0134.3bda61dd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/f284c35a.250993bf.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ff4d71f2.74710fc1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/main.7acf7ace.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/main.7acf7ace.js.LICENSE.txt +81 -0
- solace_agent_mesh/assets/docs/assets/js/runtime~main.9e0813a2.js +1 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/agents/index.html +154 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/artifact-management/index.html +99 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/audio-tools/index.html +90 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/data-analysis-tools/index.html +107 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/embeds/index.html +166 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/index.html +101 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/cli/index.html +219 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/gateways/index.html +92 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/index.html +29 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/orchestrator/index.html +55 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/plugins/index.html +110 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/projects/index.html +182 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/prompts/index.html +147 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/proxies/index.html +345 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/speech/index.html +52 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/debugging/index.html +83 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/deployment-options/index.html +84 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/index.html +25 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/kubernetes-deployment/index.html +47 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/logging/index.html +85 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/observability/index.html +60 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/proxy_configuration/index.html +49 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/create-agents/index.html +144 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/create-gateways/index.html +191 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/creating-python-tools/index.html +128 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/creating-service-providers/index.html +54 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/evaluations/index.html +135 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/index.html +34 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/structure/index.html +55 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/bedrock-agents/index.html +267 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/custom-agent/index.html +142 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/event-mesh-gateway/index.html +116 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/mcp-integration/index.html +86 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/mongodb-integration/index.html +164 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/rag-integration/index.html +140 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/rest-gateway/index.html +57 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/slack-integration/index.html +72 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/sql-database/index.html +102 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/teams-integration/index.html +115 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/agent-builder/index.html +86 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/connectors/index.html +67 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/index.html +37 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/installation/index.html +86 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/openapi-tools/index.html +324 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/rbac-setup-guide/index.html +247 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/secure-user-delegated-access/index.html +440 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/single-sign-on/index.html +184 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/wheel-installation/index.html +62 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/architecture/index.html +75 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/index.html +54 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +85 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/try-agent-mesh/index.html +41 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/artifact-storage/index.html +290 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/configurations/index.html +78 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/index.html +25 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/installation/index.html +78 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/large_language_models/index.html +160 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/run-project/index.html +142 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/session-storage/index.html +251 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/user-feedback/index.html +88 -0
- solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0/index.html +100 -0
- solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-technical-migration-map/index.html +52 -0
- solace_agent_mesh/assets/docs/img/Solace_AI_Framework_With_Broker.png +0 -0
- solace_agent_mesh/assets/docs/img/logo.png +0 -0
- solace_agent_mesh/assets/docs/img/sac-flows.png +0 -0
- solace_agent_mesh/assets/docs/img/sac_parts_of_a_component.png +0 -0
- solace_agent_mesh/assets/docs/img/sam-enterprise-credentials.png +0 -0
- solace_agent_mesh/assets/docs/img/solace-logo-text.svg +18 -0
- solace_agent_mesh/assets/docs/img/solace-logo.png +0 -0
- solace_agent_mesh/assets/docs/lunr-index-1765810064709.json +1 -0
- solace_agent_mesh/assets/docs/lunr-index.json +1 -0
- solace_agent_mesh/assets/docs/search-doc-1765810064709.json +1 -0
- solace_agent_mesh/assets/docs/search-doc.json +1 -0
- solace_agent_mesh/assets/docs/sitemap.xml +1 -0
- solace_agent_mesh/cli/__init__.py +1 -0
- solace_agent_mesh/cli/commands/__init__.py +0 -0
- solace_agent_mesh/cli/commands/add_cmd/__init__.py +15 -0
- solace_agent_mesh/cli/commands/add_cmd/add_cmd_llm.txt +250 -0
- solace_agent_mesh/cli/commands/add_cmd/agent_cmd.py +729 -0
- solace_agent_mesh/cli/commands/add_cmd/gateway_cmd.py +322 -0
- solace_agent_mesh/cli/commands/add_cmd/web_add_agent_step.py +102 -0
- solace_agent_mesh/cli/commands/add_cmd/web_add_gateway_step.py +114 -0
- solace_agent_mesh/cli/commands/docs_cmd.py +60 -0
- solace_agent_mesh/cli/commands/eval_cmd.py +46 -0
- solace_agent_mesh/cli/commands/init_cmd/__init__.py +439 -0
- solace_agent_mesh/cli/commands/init_cmd/broker_step.py +201 -0
- solace_agent_mesh/cli/commands/init_cmd/database_step.py +91 -0
- solace_agent_mesh/cli/commands/init_cmd/directory_step.py +28 -0
- solace_agent_mesh/cli/commands/init_cmd/env_step.py +238 -0
- solace_agent_mesh/cli/commands/init_cmd/init_cmd_llm.txt +365 -0
- solace_agent_mesh/cli/commands/init_cmd/orchestrator_step.py +464 -0
- solace_agent_mesh/cli/commands/init_cmd/project_files_step.py +38 -0
- solace_agent_mesh/cli/commands/init_cmd/web_init_step.py +119 -0
- solace_agent_mesh/cli/commands/init_cmd/webui_gateway_step.py +215 -0
- solace_agent_mesh/cli/commands/plugin_cmd/__init__.py +20 -0
- solace_agent_mesh/cli/commands/plugin_cmd/add_cmd.py +137 -0
- solace_agent_mesh/cli/commands/plugin_cmd/build_cmd.py +86 -0
- solace_agent_mesh/cli/commands/plugin_cmd/catalog_cmd.py +144 -0
- solace_agent_mesh/cli/commands/plugin_cmd/create_cmd.py +306 -0
- solace_agent_mesh/cli/commands/plugin_cmd/install_cmd.py +283 -0
- solace_agent_mesh/cli/commands/plugin_cmd/official_registry.py +175 -0
- solace_agent_mesh/cli/commands/plugin_cmd/plugin_cmd_llm.txt +305 -0
- solace_agent_mesh/cli/commands/run_cmd.py +215 -0
- solace_agent_mesh/cli/main.py +52 -0
- solace_agent_mesh/cli/utils.py +262 -0
- solace_agent_mesh/client/webui/frontend/static/assets/authCallback-Dj3JtK42.js +1 -0
- solace_agent_mesh/client/webui/frontend/static/assets/client-ZKk9kEJ5.js +25 -0
- solace_agent_mesh/client/webui/frontend/static/assets/favicon-BLgzUch9.ico +0 -0
- solace_agent_mesh/client/webui/frontend/static/assets/main-BcUaNZ-Q.css +1 -0
- solace_agent_mesh/client/webui/frontend/static/assets/main-vjch4RYc.js +435 -0
- solace_agent_mesh/client/webui/frontend/static/assets/vendor-BNV4kZN0.js +535 -0
- solace_agent_mesh/client/webui/frontend/static/auth-callback.html +15 -0
- solace_agent_mesh/client/webui/frontend/static/index.html +16 -0
- solace_agent_mesh/client/webui/frontend/static/mockServiceWorker.js +336 -0
- solace_agent_mesh/client/webui/frontend/static/ui-version.json +6 -0
- solace_agent_mesh/common/__init__.py +1 -0
- solace_agent_mesh/common/a2a/__init__.py +241 -0
- solace_agent_mesh/common/a2a/a2a_llm.txt +175 -0
- solace_agent_mesh/common/a2a/a2a_llm_detail.txt +193 -0
- solace_agent_mesh/common/a2a/artifact.py +368 -0
- solace_agent_mesh/common/a2a/events.py +213 -0
- solace_agent_mesh/common/a2a/message.py +375 -0
- solace_agent_mesh/common/a2a/protocol.py +689 -0
- solace_agent_mesh/common/a2a/task.py +127 -0
- solace_agent_mesh/common/a2a/translation.py +655 -0
- solace_agent_mesh/common/a2a/types.py +55 -0
- solace_agent_mesh/common/a2a_spec/a2a.json +2576 -0
- solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +445 -0
- solace_agent_mesh/common/a2a_spec/a2a_spec_llm_detail.txt +736 -0
- solace_agent_mesh/common/a2a_spec/schemas/agent_progress_update.json +18 -0
- solace_agent_mesh/common/a2a_spec/schemas/artifact_creation_progress.json +48 -0
- solace_agent_mesh/common/a2a_spec/schemas/feedback_event.json +51 -0
- solace_agent_mesh/common/a2a_spec/schemas/llm_invocation.json +41 -0
- solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +330 -0
- solace_agent_mesh/common/a2a_spec/schemas/tool_invocation_start.json +26 -0
- solace_agent_mesh/common/a2a_spec/schemas/tool_result.json +48 -0
- solace_agent_mesh/common/agent_registry.py +122 -0
- solace_agent_mesh/common/common_llm.txt +230 -0
- solace_agent_mesh/common/common_llm_detail.txt +2562 -0
- solace_agent_mesh/common/constants.py +6 -0
- solace_agent_mesh/common/data_parts.py +150 -0
- solace_agent_mesh/common/exceptions.py +49 -0
- solace_agent_mesh/common/middleware/__init__.py +12 -0
- solace_agent_mesh/common/middleware/config_resolver.py +132 -0
- solace_agent_mesh/common/middleware/middleware_llm.txt +174 -0
- solace_agent_mesh/common/middleware/middleware_llm_detail.txt +185 -0
- solace_agent_mesh/common/middleware/registry.py +127 -0
- solace_agent_mesh/common/oauth/__init__.py +17 -0
- solace_agent_mesh/common/oauth/oauth_client.py +408 -0
- solace_agent_mesh/common/oauth/utils.py +50 -0
- solace_agent_mesh/common/sac/__init__.py +0 -0
- solace_agent_mesh/common/sac/sac_llm.txt +71 -0
- solace_agent_mesh/common/sac/sac_llm_detail.txt +82 -0
- solace_agent_mesh/common/sac/sam_component_base.py +730 -0
- solace_agent_mesh/common/sam_events/__init__.py +9 -0
- solace_agent_mesh/common/sam_events/event_service.py +208 -0
- solace_agent_mesh/common/sam_events/sam_events_llm.txt +104 -0
- solace_agent_mesh/common/sam_events/sam_events_llm_detail.txt +115 -0
- solace_agent_mesh/common/services/__init__.py +4 -0
- solace_agent_mesh/common/services/employee_service.py +164 -0
- solace_agent_mesh/common/services/identity_service.py +134 -0
- solace_agent_mesh/common/services/providers/__init__.py +4 -0
- solace_agent_mesh/common/services/providers/local_file_identity_service.py +151 -0
- solace_agent_mesh/common/services/providers/providers_llm.txt +81 -0
- solace_agent_mesh/common/services/services_llm.txt +368 -0
- solace_agent_mesh/common/services/services_llm_detail.txt +459 -0
- solace_agent_mesh/common/utils/__init__.py +7 -0
- solace_agent_mesh/common/utils/artifact_utils.py +31 -0
- solace_agent_mesh/common/utils/asyncio_macos_fix.py +88 -0
- solace_agent_mesh/common/utils/embeds/__init__.py +33 -0
- solace_agent_mesh/common/utils/embeds/constants.py +56 -0
- solace_agent_mesh/common/utils/embeds/converter.py +447 -0
- solace_agent_mesh/common/utils/embeds/embeds_llm.txt +220 -0
- solace_agent_mesh/common/utils/embeds/evaluators.py +395 -0
- solace_agent_mesh/common/utils/embeds/modifiers.py +793 -0
- solace_agent_mesh/common/utils/embeds/resolver.py +967 -0
- solace_agent_mesh/common/utils/embeds/types.py +23 -0
- solace_agent_mesh/common/utils/in_memory_cache.py +108 -0
- solace_agent_mesh/common/utils/initializer.py +52 -0
- solace_agent_mesh/common/utils/log_formatters.py +64 -0
- solace_agent_mesh/common/utils/message_utils.py +80 -0
- solace_agent_mesh/common/utils/mime_helpers.py +172 -0
- solace_agent_mesh/common/utils/push_notification_auth.py +135 -0
- solace_agent_mesh/common/utils/pydantic_utils.py +159 -0
- solace_agent_mesh/common/utils/rbac_utils.py +69 -0
- solace_agent_mesh/common/utils/templates/__init__.py +8 -0
- solace_agent_mesh/common/utils/templates/liquid_renderer.py +210 -0
- solace_agent_mesh/common/utils/templates/template_resolver.py +161 -0
- solace_agent_mesh/common/utils/type_utils.py +28 -0
- solace_agent_mesh/common/utils/utils_llm.txt +335 -0
- solace_agent_mesh/common/utils/utils_llm_detail.txt +572 -0
- solace_agent_mesh/config_portal/__init__.py +0 -0
- solace_agent_mesh/config_portal/backend/__init__.py +0 -0
- solace_agent_mesh/config_portal/backend/common.py +77 -0
- solace_agent_mesh/config_portal/backend/plugin_catalog/__init__.py +0 -0
- solace_agent_mesh/config_portal/backend/plugin_catalog/constants.py +24 -0
- solace_agent_mesh/config_portal/backend/plugin_catalog/models.py +49 -0
- solace_agent_mesh/config_portal/backend/plugin_catalog/registry_manager.py +166 -0
- solace_agent_mesh/config_portal/backend/plugin_catalog/scraper.py +521 -0
- solace_agent_mesh/config_portal/backend/plugin_catalog_server.py +217 -0
- solace_agent_mesh/config_portal/backend/server.py +644 -0
- solace_agent_mesh/config_portal/frontend/static/client/Solace_community_logo.png +0 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/_index-DiOiAjzL.js +103 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/components-Rk0n-9cK.js +140 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/entry.client-mvZjNKiz.js +19 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/index-DzNKzXrc.js +68 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/manifest-ba77705e.js +1 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/root-B17tZKK7.css +1 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/root-V2BeTIUc.js +10 -0
- solace_agent_mesh/config_portal/frontend/static/client/favicon.ico +0 -0
- solace_agent_mesh/config_portal/frontend/static/client/index.html +7 -0
- solace_agent_mesh/core_a2a/__init__.py +1 -0
- solace_agent_mesh/core_a2a/core_a2a_llm.txt +90 -0
- solace_agent_mesh/core_a2a/core_a2a_llm_detail.txt +101 -0
- solace_agent_mesh/core_a2a/service.py +307 -0
- solace_agent_mesh/evaluation/__init__.py +0 -0
- solace_agent_mesh/evaluation/evaluator.py +691 -0
- solace_agent_mesh/evaluation/message_organizer.py +553 -0
- solace_agent_mesh/evaluation/report/benchmark_info.html +35 -0
- solace_agent_mesh/evaluation/report/chart_section.html +141 -0
- solace_agent_mesh/evaluation/report/detailed_breakdown.html +28 -0
- solace_agent_mesh/evaluation/report/modal.html +59 -0
- solace_agent_mesh/evaluation/report/modal_chart_functions.js +411 -0
- solace_agent_mesh/evaluation/report/modal_script.js +296 -0
- solace_agent_mesh/evaluation/report/modal_styles.css +340 -0
- solace_agent_mesh/evaluation/report/performance_metrics_styles.css +93 -0
- solace_agent_mesh/evaluation/report/templates/footer.html +2 -0
- solace_agent_mesh/evaluation/report/templates/header.html +340 -0
- solace_agent_mesh/evaluation/report_data_processor.py +970 -0
- solace_agent_mesh/evaluation/report_generator.py +607 -0
- solace_agent_mesh/evaluation/run.py +954 -0
- solace_agent_mesh/evaluation/shared/__init__.py +92 -0
- solace_agent_mesh/evaluation/shared/constants.py +47 -0
- solace_agent_mesh/evaluation/shared/exceptions.py +50 -0
- solace_agent_mesh/evaluation/shared/helpers.py +35 -0
- solace_agent_mesh/evaluation/shared/test_case_loader.py +167 -0
- solace_agent_mesh/evaluation/shared/test_suite_loader.py +280 -0
- solace_agent_mesh/evaluation/subscriber.py +776 -0
- solace_agent_mesh/evaluation/summary_builder.py +880 -0
- solace_agent_mesh/gateway/__init__.py +0 -0
- solace_agent_mesh/gateway/adapter/__init__.py +1 -0
- solace_agent_mesh/gateway/adapter/base.py +143 -0
- solace_agent_mesh/gateway/adapter/types.py +221 -0
- solace_agent_mesh/gateway/base/__init__.py +1 -0
- solace_agent_mesh/gateway/base/app.py +345 -0
- solace_agent_mesh/gateway/base/base_llm.txt +226 -0
- solace_agent_mesh/gateway/base/base_llm_detail.txt +235 -0
- solace_agent_mesh/gateway/base/component.py +2030 -0
- solace_agent_mesh/gateway/base/task_context.py +75 -0
- solace_agent_mesh/gateway/gateway_llm.txt +369 -0
- solace_agent_mesh/gateway/gateway_llm_detail.txt +3885 -0
- solace_agent_mesh/gateway/generic/__init__.py +1 -0
- solace_agent_mesh/gateway/generic/app.py +50 -0
- solace_agent_mesh/gateway/generic/component.py +727 -0
- solace_agent_mesh/gateway/http_sse/__init__.py +0 -0
- solace_agent_mesh/gateway/http_sse/alembic/alembic_llm.txt +345 -0
- solace_agent_mesh/gateway/http_sse/alembic/env.py +87 -0
- solace_agent_mesh/gateway/http_sse/alembic/script.py.mako +28 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20250910_d5b3f8f2e9a0_create_initial_database.py +58 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20250911_b1c2d3e4f5g6_add_database_indexes.py +83 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20250916_f6e7d8c9b0a1_convert_timestamps_to_epoch_and_align_columns.py +412 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251006_98882922fa59_add_tasks_events_feedback_chat_tasks.py +190 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251015_add_session_performance_indexes.py +70 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251023_add_project_users_table.py +72 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251023_add_soft_delete_and_search.py +109 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251024_add_default_agent_to_projects.py +26 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251024_add_projects_table.py +135 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251108_create_prompt_tables_with_sharing.py +154 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251115_add_parent_task_id.py +32 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251126_add_background_task_fields.py +47 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251202_add_versioned_fields_to_prompts.py +52 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/versions_llm.txt +161 -0
- solace_agent_mesh/gateway/http_sse/alembic.ini +109 -0
- solace_agent_mesh/gateway/http_sse/app.py +351 -0
- solace_agent_mesh/gateway/http_sse/component.py +2360 -0
- solace_agent_mesh/gateway/http_sse/components/__init__.py +7 -0
- solace_agent_mesh/gateway/http_sse/components/components_llm.txt +105 -0
- solace_agent_mesh/gateway/http_sse/components/task_logger_forwarder.py +109 -0
- solace_agent_mesh/gateway/http_sse/components/visualization_forwarder_component.py +110 -0
- solace_agent_mesh/gateway/http_sse/dependencies.py +653 -0
- solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +299 -0
- solace_agent_mesh/gateway/http_sse/http_sse_llm_detail.txt +3278 -0
- solace_agent_mesh/gateway/http_sse/main.py +789 -0
- solace_agent_mesh/gateway/http_sse/repository/__init__.py +46 -0
- solace_agent_mesh/gateway/http_sse/repository/chat_task_repository.py +102 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/__init__.py +11 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/chat_task.py +75 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/entities_llm.txt +221 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/feedback.py +20 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/project.py +81 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/project_user.py +47 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/session.py +66 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/session_history.py +0 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/task.py +32 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/task_event.py +21 -0
- solace_agent_mesh/gateway/http_sse/repository/feedback_repository.py +125 -0
- solace_agent_mesh/gateway/http_sse/repository/interfaces.py +239 -0
- solace_agent_mesh/gateway/http_sse/repository/models/__init__.py +34 -0
- solace_agent_mesh/gateway/http_sse/repository/models/base.py +7 -0
- solace_agent_mesh/gateway/http_sse/repository/models/chat_task_model.py +31 -0
- solace_agent_mesh/gateway/http_sse/repository/models/feedback_model.py +21 -0
- solace_agent_mesh/gateway/http_sse/repository/models/models_llm.txt +257 -0
- solace_agent_mesh/gateway/http_sse/repository/models/project_model.py +51 -0
- solace_agent_mesh/gateway/http_sse/repository/models/project_user_model.py +75 -0
- solace_agent_mesh/gateway/http_sse/repository/models/prompt_model.py +159 -0
- solace_agent_mesh/gateway/http_sse/repository/models/session_model.py +53 -0
- solace_agent_mesh/gateway/http_sse/repository/models/task_event_model.py +25 -0
- solace_agent_mesh/gateway/http_sse/repository/models/task_model.py +39 -0
- solace_agent_mesh/gateway/http_sse/repository/project_repository.py +172 -0
- solace_agent_mesh/gateway/http_sse/repository/project_user_repository.py +186 -0
- solace_agent_mesh/gateway/http_sse/repository/repository_llm.txt +308 -0
- solace_agent_mesh/gateway/http_sse/repository/session_repository.py +268 -0
- solace_agent_mesh/gateway/http_sse/repository/task_repository.py +248 -0
- solace_agent_mesh/gateway/http_sse/routers/__init__.py +4 -0
- solace_agent_mesh/gateway/http_sse/routers/agent_cards.py +74 -0
- solace_agent_mesh/gateway/http_sse/routers/artifacts.py +1137 -0
- solace_agent_mesh/gateway/http_sse/routers/auth.py +311 -0
- solace_agent_mesh/gateway/http_sse/routers/config.py +371 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/__init__.py +10 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/dto_llm.txt +450 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/project_dto.py +69 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/prompt_dto.py +255 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/__init__.py +15 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/project_requests.py +48 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/requests_llm.txt +133 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/session_requests.py +33 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/task_requests.py +58 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/__init__.py +18 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/base_responses.py +42 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/project_responses.py +31 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/responses_llm.txt +123 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/session_responses.py +33 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/task_responses.py +30 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/version_responses.py +31 -0
- solace_agent_mesh/gateway/http_sse/routers/feedback.py +168 -0
- solace_agent_mesh/gateway/http_sse/routers/people.py +38 -0
- solace_agent_mesh/gateway/http_sse/routers/projects.py +767 -0
- solace_agent_mesh/gateway/http_sse/routers/prompts.py +1415 -0
- solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +312 -0
- solace_agent_mesh/gateway/http_sse/routers/sessions.py +634 -0
- solace_agent_mesh/gateway/http_sse/routers/speech.py +355 -0
- solace_agent_mesh/gateway/http_sse/routers/sse.py +230 -0
- solace_agent_mesh/gateway/http_sse/routers/tasks.py +1089 -0
- solace_agent_mesh/gateway/http_sse/routers/users.py +83 -0
- solace_agent_mesh/gateway/http_sse/routers/version.py +343 -0
- solace_agent_mesh/gateway/http_sse/routers/visualization.py +1220 -0
- solace_agent_mesh/gateway/http_sse/services/__init__.py +4 -0
- solace_agent_mesh/gateway/http_sse/services/agent_card_service.py +71 -0
- solace_agent_mesh/gateway/http_sse/services/audio_service.py +1227 -0
- solace_agent_mesh/gateway/http_sse/services/background_task_monitor.py +186 -0
- solace_agent_mesh/gateway/http_sse/services/data_retention_service.py +273 -0
- solace_agent_mesh/gateway/http_sse/services/feedback_service.py +250 -0
- solace_agent_mesh/gateway/http_sse/services/people_service.py +78 -0
- solace_agent_mesh/gateway/http_sse/services/project_service.py +930 -0
- solace_agent_mesh/gateway/http_sse/services/prompt_builder_assistant.py +303 -0
- solace_agent_mesh/gateway/http_sse/services/services_llm.txt +303 -0
- solace_agent_mesh/gateway/http_sse/services/session_service.py +702 -0
- solace_agent_mesh/gateway/http_sse/services/task_logger_service.py +593 -0
- solace_agent_mesh/gateway/http_sse/services/task_service.py +119 -0
- solace_agent_mesh/gateway/http_sse/session_manager.py +219 -0
- solace_agent_mesh/gateway/http_sse/shared/__init__.py +146 -0
- solace_agent_mesh/gateway/http_sse/shared/auth_utils.py +29 -0
- solace_agent_mesh/gateway/http_sse/shared/base_repository.py +252 -0
- solace_agent_mesh/gateway/http_sse/shared/database_exceptions.py +274 -0
- solace_agent_mesh/gateway/http_sse/shared/database_helpers.py +43 -0
- solace_agent_mesh/gateway/http_sse/shared/enums.py +40 -0
- solace_agent_mesh/gateway/http_sse/shared/error_dto.py +107 -0
- solace_agent_mesh/gateway/http_sse/shared/exception_handlers.py +217 -0
- solace_agent_mesh/gateway/http_sse/shared/exceptions.py +192 -0
- solace_agent_mesh/gateway/http_sse/shared/pagination.py +138 -0
- solace_agent_mesh/gateway/http_sse/shared/response_utils.py +134 -0
- solace_agent_mesh/gateway/http_sse/shared/shared_llm.txt +319 -0
- solace_agent_mesh/gateway/http_sse/shared/timestamp_utils.py +97 -0
- solace_agent_mesh/gateway/http_sse/shared/types.py +50 -0
- solace_agent_mesh/gateway/http_sse/shared/utils.py +22 -0
- solace_agent_mesh/gateway/http_sse/sse_event_buffer.py +88 -0
- solace_agent_mesh/gateway/http_sse/sse_manager.py +491 -0
- solace_agent_mesh/gateway/http_sse/utils/__init__.py +1 -0
- solace_agent_mesh/gateway/http_sse/utils/artifact_copy_utils.py +370 -0
- solace_agent_mesh/gateway/http_sse/utils/stim_utils.py +72 -0
- solace_agent_mesh/gateway/http_sse/utils/utils_llm.txt +47 -0
- solace_agent_mesh/llm.txt +228 -0
- solace_agent_mesh/llm_detail.txt +2835 -0
- solace_agent_mesh/services/__init__.py +0 -0
- solace_agent_mesh/services/platform/__init__.py +18 -0
- solace_agent_mesh/services/platform/alembic/env.py +85 -0
- solace_agent_mesh/services/platform/alembic/script.py.mako +28 -0
- solace_agent_mesh/services/platform/alembic.ini +109 -0
- solace_agent_mesh/services/platform/api/__init__.py +3 -0
- solace_agent_mesh/services/platform/api/dependencies.py +147 -0
- solace_agent_mesh/services/platform/api/main.py +280 -0
- solace_agent_mesh/services/platform/api/middleware.py +51 -0
- solace_agent_mesh/services/platform/api/routers/__init__.py +24 -0
- solace_agent_mesh/services/platform/app.py +114 -0
- solace_agent_mesh/services/platform/component.py +235 -0
- solace_agent_mesh/solace_agent_mesh_llm.txt +362 -0
- solace_agent_mesh/solace_agent_mesh_llm_detail.txt +8599 -0
- solace_agent_mesh/templates/agent_template.yaml +53 -0
- solace_agent_mesh/templates/eval_backend_template.yaml +54 -0
- solace_agent_mesh/templates/gateway_app_template.py +75 -0
- solace_agent_mesh/templates/gateway_component_template.py +484 -0
- solace_agent_mesh/templates/gateway_config_template.yaml +38 -0
- solace_agent_mesh/templates/logging_config_template.yaml +48 -0
- solace_agent_mesh/templates/main_orchestrator.yaml +66 -0
- solace_agent_mesh/templates/plugin_agent_config_template.yaml +122 -0
- solace_agent_mesh/templates/plugin_custom_config_template.yaml +27 -0
- solace_agent_mesh/templates/plugin_custom_template.py +10 -0
- solace_agent_mesh/templates/plugin_gateway_config_template.yaml +60 -0
- solace_agent_mesh/templates/plugin_pyproject_template.toml +32 -0
- solace_agent_mesh/templates/plugin_readme_template.md +12 -0
- solace_agent_mesh/templates/plugin_tool_config_template.yaml +109 -0
- solace_agent_mesh/templates/plugin_tools_template.py +224 -0
- solace_agent_mesh/templates/shared_config.yaml +112 -0
- solace_agent_mesh/templates/templates_llm.txt +147 -0
- solace_agent_mesh/templates/webui.yaml +177 -0
- solace_agent_mesh-1.11.2.dist-info/METADATA +504 -0
- solace_agent_mesh-1.11.2.dist-info/RECORD +624 -0
- solace_agent_mesh-1.11.2.dist-info/WHEEL +4 -0
- solace_agent_mesh-1.11.2.dist-info/entry_points.txt +3 -0
- solace_agent_mesh-1.11.2.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,1325 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Handles ADK Agent and Runner initialization, including tool loading and callback assignment.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import functools
|
|
6
|
+
import inspect
|
|
7
|
+
import logging
|
|
8
|
+
import os
|
|
9
|
+
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
|
|
10
|
+
|
|
11
|
+
from google.adk import tools as adk_tools_module
|
|
12
|
+
from google.adk.agents.callback_context import CallbackContext
|
|
13
|
+
from google.adk.models import BaseLlm
|
|
14
|
+
from google.adk.models.llm_request import LlmRequest
|
|
15
|
+
from google.adk.models.llm_response import LlmResponse
|
|
16
|
+
from google.adk.runners import Runner
|
|
17
|
+
from google.adk.tools import BaseTool, ToolContext
|
|
18
|
+
from google.adk.tools.mcp_tool.mcp_session_manager import (
|
|
19
|
+
SseServerParams,
|
|
20
|
+
StdioConnectionParams,
|
|
21
|
+
StreamableHTTPServerParams,
|
|
22
|
+
)
|
|
23
|
+
from mcp import StdioServerParameters
|
|
24
|
+
from solace_ai_connector.common.utils import import_module
|
|
25
|
+
|
|
26
|
+
from ...agent.adk import callbacks as adk_callbacks
|
|
27
|
+
from ...agent.adk.models.lite_llm import LiteLlm
|
|
28
|
+
from ...common.utils.type_utils import is_subclass_by_name
|
|
29
|
+
from ..tools.dynamic_tool import DynamicTool, DynamicToolProvider
|
|
30
|
+
from ..tools.registry import tool_registry
|
|
31
|
+
from ..tools.tool_config_types import (
|
|
32
|
+
AnyToolConfig,
|
|
33
|
+
BuiltinToolConfig,
|
|
34
|
+
BuiltinGroupToolConfig,
|
|
35
|
+
McpToolConfig,
|
|
36
|
+
PythonToolConfig,
|
|
37
|
+
)
|
|
38
|
+
from ..tools.tool_definition import BuiltinTool
|
|
39
|
+
from .app_llm_agent import AppLlmAgent
|
|
40
|
+
from .embed_resolving_mcp_toolset import EmbedResolvingMCPToolset
|
|
41
|
+
from .tool_wrapper import ADKToolWrapper
|
|
42
|
+
|
|
43
|
+
if TYPE_CHECKING:
|
|
44
|
+
from ..sac.component import SamAgentComponent
|
|
45
|
+
|
|
46
|
+
log = logging.getLogger(__name__)
|
|
47
|
+
|
|
48
|
+
# Define a clear return type for all tool-loading helpers
|
|
49
|
+
ToolLoadingResult = Tuple[List[Union[BaseTool, Callable]], List[BuiltinTool], List[Callable]]
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _find_dynamic_tool_class(module) -> Optional[type]:
|
|
53
|
+
"""Finds a single non-abstract DynamicTool subclass in a module."""
|
|
54
|
+
found_classes = []
|
|
55
|
+
for name, obj in inspect.getmembers(module, inspect.isclass):
|
|
56
|
+
if (
|
|
57
|
+
is_subclass_by_name(obj, "DynamicTool")
|
|
58
|
+
and not is_subclass_by_name(obj, "DynamicToolProvider")
|
|
59
|
+
and not inspect.isabstract(obj)
|
|
60
|
+
):
|
|
61
|
+
found_classes.append(obj)
|
|
62
|
+
if len(found_classes) > 1:
|
|
63
|
+
raise TypeError(
|
|
64
|
+
f"Module '{module.__name__}' contains multiple DynamicTool subclasses. "
|
|
65
|
+
"Please specify which one to use with 'class_name' in the config."
|
|
66
|
+
)
|
|
67
|
+
return found_classes[0] if found_classes else None
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
async def _execute_lifecycle_hook(
|
|
71
|
+
component: "SamAgentComponent",
|
|
72
|
+
func_name: Optional[str],
|
|
73
|
+
module_name: str,
|
|
74
|
+
base_path: Optional[str],
|
|
75
|
+
tool_config_model: AnyToolConfig,
|
|
76
|
+
):
|
|
77
|
+
"""Dynamically loads and executes a lifecycle hook function."""
|
|
78
|
+
if not func_name:
|
|
79
|
+
return
|
|
80
|
+
|
|
81
|
+
log.info(
|
|
82
|
+
"%s Executing lifecycle hook: %s.%s",
|
|
83
|
+
component.log_identifier,
|
|
84
|
+
module_name,
|
|
85
|
+
func_name,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
try:
|
|
89
|
+
module = import_module(module_name, base_path=base_path)
|
|
90
|
+
func = getattr(module, func_name)
|
|
91
|
+
|
|
92
|
+
if not inspect.iscoroutinefunction(func):
|
|
93
|
+
raise TypeError(
|
|
94
|
+
f"Lifecycle hook '{func_name}' in module '{module_name}' must be an async function."
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
await func(component, tool_config_model)
|
|
98
|
+
log.info(
|
|
99
|
+
"%s Successfully executed lifecycle hook: %s.%s",
|
|
100
|
+
component.log_identifier,
|
|
101
|
+
module_name,
|
|
102
|
+
func_name,
|
|
103
|
+
)
|
|
104
|
+
except Exception as e:
|
|
105
|
+
log.exception(
|
|
106
|
+
"%s Fatal error during lifecycle hook execution for '%s.%s': %s",
|
|
107
|
+
component.log_identifier,
|
|
108
|
+
module_name,
|
|
109
|
+
func_name,
|
|
110
|
+
e,
|
|
111
|
+
)
|
|
112
|
+
raise RuntimeError(f"Tool lifecycle initialization failed: {e}") from e
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def _create_cleanup_partial(
|
|
116
|
+
component: "SamAgentComponent",
|
|
117
|
+
func_name: Optional[str],
|
|
118
|
+
module_name: str,
|
|
119
|
+
base_path: Optional[str],
|
|
120
|
+
tool_config_model: AnyToolConfig,
|
|
121
|
+
) -> Optional[Callable]:
|
|
122
|
+
"""Creates a functools.partial for a cleanup hook function."""
|
|
123
|
+
if not func_name:
|
|
124
|
+
return None
|
|
125
|
+
|
|
126
|
+
try:
|
|
127
|
+
module = import_module(module_name, base_path=base_path)
|
|
128
|
+
func = getattr(module, func_name)
|
|
129
|
+
|
|
130
|
+
if not inspect.iscoroutinefunction(func):
|
|
131
|
+
raise TypeError(
|
|
132
|
+
f"Lifecycle hook '{func_name}' in module '{module_name}' must be an async function."
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
return functools.partial(func, component, tool_config_model)
|
|
136
|
+
except Exception as e:
|
|
137
|
+
log.exception(
|
|
138
|
+
"%s Fatal error creating partial for cleanup hook '%s.%s': %s",
|
|
139
|
+
component.log_identifier,
|
|
140
|
+
module_name,
|
|
141
|
+
func_name,
|
|
142
|
+
e,
|
|
143
|
+
)
|
|
144
|
+
raise RuntimeError(f"Tool lifecycle setup failed: {e}") from e
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def _find_dynamic_tool_provider_class(module) -> Optional[type]:
|
|
148
|
+
"""Finds a single non-abstract DynamicToolProvider subclass in a module."""
|
|
149
|
+
found_classes = []
|
|
150
|
+
for name, obj in inspect.getmembers(module, inspect.isclass):
|
|
151
|
+
if is_subclass_by_name(obj, "DynamicToolProvider") and not inspect.isabstract(
|
|
152
|
+
obj
|
|
153
|
+
):
|
|
154
|
+
found_classes.append(obj)
|
|
155
|
+
if len(found_classes) > 1:
|
|
156
|
+
raise TypeError(
|
|
157
|
+
f"Module '{module.__name__}' contains multiple DynamicToolProvider subclasses. "
|
|
158
|
+
"Only one is permitted per module."
|
|
159
|
+
)
|
|
160
|
+
return found_classes[0] if found_classes else None
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def _check_and_register_tool_name(name: str, source: str, loaded_tool_names: Set[str]):
|
|
164
|
+
"""Checks for duplicate tool names and raises ValueError if found."""
|
|
165
|
+
if name in loaded_tool_names:
|
|
166
|
+
raise ValueError(
|
|
167
|
+
f"Configuration Error: Duplicate tool name '{name}' found from source '{source}'. "
|
|
168
|
+
"This name is already in use. Please resolve the conflict by renaming or "
|
|
169
|
+
"disabling one of the tools in your agent's configuration."
|
|
170
|
+
)
|
|
171
|
+
loaded_tool_names.add(name)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
async def _create_python_tool_lifecycle_hooks(
|
|
175
|
+
component: "SamAgentComponent",
|
|
176
|
+
tool_config_model: "PythonToolConfig",
|
|
177
|
+
loaded_python_tools: List[Union[BaseTool, Callable]],
|
|
178
|
+
) -> List[Callable]:
|
|
179
|
+
"""
|
|
180
|
+
Executes init hooks and collects cleanup hooks for a Python tool.
|
|
181
|
+
Handles both YAML-defined hooks and class-based init/cleanup methods.
|
|
182
|
+
Returns cleanup hooks in LIFO order.
|
|
183
|
+
"""
|
|
184
|
+
module_name = tool_config_model.component_module
|
|
185
|
+
base_path = tool_config_model.component_base_path
|
|
186
|
+
cleanup_hooks = []
|
|
187
|
+
|
|
188
|
+
# 1. YAML Init (runs first)
|
|
189
|
+
await _execute_lifecycle_hook(
|
|
190
|
+
component,
|
|
191
|
+
tool_config_model.init_function,
|
|
192
|
+
module_name,
|
|
193
|
+
base_path,
|
|
194
|
+
tool_config_model,
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
# 2. DynamicTool/Provider Init (runs second)
|
|
198
|
+
for tool_instance in loaded_python_tools:
|
|
199
|
+
if is_subclass_by_name(type(tool_instance), "DynamicTool"):
|
|
200
|
+
log.info(
|
|
201
|
+
"%s Executing .init() method for DynamicTool '%s'.",
|
|
202
|
+
component.log_identifier,
|
|
203
|
+
tool_instance.tool_name,
|
|
204
|
+
)
|
|
205
|
+
await tool_instance.init(component, tool_config_model)
|
|
206
|
+
|
|
207
|
+
# 3. Collect Cleanup Hooks (in reverse order of init)
|
|
208
|
+
# Class-based cleanup hook (will be executed first)
|
|
209
|
+
for tool_instance in loaded_python_tools:
|
|
210
|
+
if is_subclass_by_name(type(tool_instance), "DynamicTool"):
|
|
211
|
+
cleanup_hooks.append(
|
|
212
|
+
functools.partial(
|
|
213
|
+
tool_instance.cleanup, component, tool_config_model
|
|
214
|
+
)
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
# YAML-based cleanup hook (will be executed second)
|
|
218
|
+
yaml_cleanup_partial = _create_cleanup_partial(
|
|
219
|
+
component,
|
|
220
|
+
tool_config_model.cleanup_function,
|
|
221
|
+
module_name,
|
|
222
|
+
base_path,
|
|
223
|
+
tool_config_model,
|
|
224
|
+
)
|
|
225
|
+
if yaml_cleanup_partial:
|
|
226
|
+
cleanup_hooks.append(yaml_cleanup_partial)
|
|
227
|
+
|
|
228
|
+
# Return in LIFO order relative to init
|
|
229
|
+
return list(reversed(cleanup_hooks))
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
def _load_python_class_based_tool(
|
|
233
|
+
module: Any,
|
|
234
|
+
tool_config: Dict,
|
|
235
|
+
component: "SamAgentComponent",
|
|
236
|
+
) -> List[DynamicTool]:
|
|
237
|
+
"""
|
|
238
|
+
Loads a class-based tool, which can be a single DynamicTool or a
|
|
239
|
+
DynamicToolProvider that generates multiple tools.
|
|
240
|
+
"""
|
|
241
|
+
from pydantic import BaseModel, ValidationError
|
|
242
|
+
|
|
243
|
+
specific_tool_config = tool_config.get("tool_config")
|
|
244
|
+
dynamic_tools: List[DynamicTool] = []
|
|
245
|
+
module_name = module.__name__
|
|
246
|
+
|
|
247
|
+
# Determine the class to load
|
|
248
|
+
tool_class = None
|
|
249
|
+
class_name = tool_config.get("class_name")
|
|
250
|
+
if class_name:
|
|
251
|
+
tool_class = getattr(module, class_name)
|
|
252
|
+
else:
|
|
253
|
+
# Auto-discover: provider first, then single tool
|
|
254
|
+
tool_class = _find_dynamic_tool_provider_class(module)
|
|
255
|
+
if not tool_class:
|
|
256
|
+
tool_class = _find_dynamic_tool_class(module)
|
|
257
|
+
|
|
258
|
+
if not tool_class:
|
|
259
|
+
raise TypeError(
|
|
260
|
+
f"Module '{module_name}' does not contain a 'function_name' or 'class_name' to load, "
|
|
261
|
+
"and no DynamicTool or DynamicToolProvider subclass could be auto-discovered."
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
# Check for a Pydantic model declaration on the tool class
|
|
265
|
+
config_model: Optional[Type["BaseModel"]] = getattr(
|
|
266
|
+
tool_class, "config_model", None
|
|
267
|
+
)
|
|
268
|
+
validated_config: Union[dict, "BaseModel"] = specific_tool_config
|
|
269
|
+
|
|
270
|
+
if config_model:
|
|
271
|
+
log.debug(
|
|
272
|
+
"%s Found config_model '%s' for tool class '%s'. Validating...",
|
|
273
|
+
component.log_identifier,
|
|
274
|
+
config_model.__name__,
|
|
275
|
+
tool_class.__name__,
|
|
276
|
+
)
|
|
277
|
+
try:
|
|
278
|
+
# Validate the raw dict and get a Pydantic model instance
|
|
279
|
+
validated_config = config_model.model_validate(specific_tool_config or {})
|
|
280
|
+
log.debug(
|
|
281
|
+
"%s Successfully validated tool_config for '%s'.",
|
|
282
|
+
component.log_identifier,
|
|
283
|
+
tool_class.__name__,
|
|
284
|
+
)
|
|
285
|
+
except ValidationError as e:
|
|
286
|
+
# Provide a clear error message and raise
|
|
287
|
+
error_msg = (
|
|
288
|
+
f"Configuration error for tool '{tool_class.__name__}' from module '{module_name}'. "
|
|
289
|
+
f"The provided 'tool_config' in your YAML is invalid:\n{e}"
|
|
290
|
+
)
|
|
291
|
+
log.error("%s %s", component.log_identifier, error_msg)
|
|
292
|
+
raise ValueError(error_msg) from e
|
|
293
|
+
|
|
294
|
+
# Instantiate tools from the class
|
|
295
|
+
if is_subclass_by_name(tool_class, "DynamicToolProvider"):
|
|
296
|
+
provider_instance = tool_class()
|
|
297
|
+
dynamic_tools = provider_instance.get_all_tools_for_framework(
|
|
298
|
+
tool_config=validated_config
|
|
299
|
+
)
|
|
300
|
+
log.info(
|
|
301
|
+
"%s Loaded %d tools from DynamicToolProvider '%s' in %s",
|
|
302
|
+
component.log_identifier,
|
|
303
|
+
len(dynamic_tools),
|
|
304
|
+
tool_class.__name__,
|
|
305
|
+
module_name,
|
|
306
|
+
)
|
|
307
|
+
elif is_subclass_by_name(tool_class, "DynamicTool"):
|
|
308
|
+
tool_instance = tool_class(tool_config=validated_config)
|
|
309
|
+
dynamic_tools = [tool_instance]
|
|
310
|
+
else:
|
|
311
|
+
raise TypeError(
|
|
312
|
+
f"Class '{tool_class.__name__}' in module '{module_name}' is not a valid "
|
|
313
|
+
"DynamicTool or DynamicToolProvider subclass."
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
# Post-process all generated tools
|
|
317
|
+
for tool in dynamic_tools:
|
|
318
|
+
tool.origin = "dynamic"
|
|
319
|
+
declaration = tool._get_declaration()
|
|
320
|
+
if not declaration:
|
|
321
|
+
log.warning(
|
|
322
|
+
"Dynamic tool '%s' from module '%s' did not generate a valid declaration. Skipping.",
|
|
323
|
+
tool.__class__.__name__,
|
|
324
|
+
module_name,
|
|
325
|
+
)
|
|
326
|
+
continue
|
|
327
|
+
log.info(
|
|
328
|
+
"%s Loaded dynamic tool: %s from %s",
|
|
329
|
+
component.log_identifier,
|
|
330
|
+
declaration.name,
|
|
331
|
+
module_name,
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
return dynamic_tools
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
async def _load_python_tool(component: "SamAgentComponent", tool_config: Dict) -> ToolLoadingResult:
|
|
338
|
+
from pydantic import TypeAdapter
|
|
339
|
+
|
|
340
|
+
python_tool_adapter = TypeAdapter(PythonToolConfig)
|
|
341
|
+
tool_config_model = python_tool_adapter.validate_python(tool_config)
|
|
342
|
+
|
|
343
|
+
module_name = tool_config_model.component_module
|
|
344
|
+
base_path = tool_config_model.component_base_path
|
|
345
|
+
if not module_name:
|
|
346
|
+
raise ValueError("'component_module' is required for python tools.")
|
|
347
|
+
module = import_module(module_name, base_path=base_path)
|
|
348
|
+
|
|
349
|
+
loaded_python_tools: List[Union[BaseTool, Callable]] = []
|
|
350
|
+
|
|
351
|
+
# Case 1: Simple function-based tool
|
|
352
|
+
if tool_config_model.function_name:
|
|
353
|
+
func = getattr(module, tool_config_model.function_name)
|
|
354
|
+
if not callable(func):
|
|
355
|
+
raise TypeError(
|
|
356
|
+
f"'{tool_config_model.function_name}' in module '{module_name}' is not callable."
|
|
357
|
+
)
|
|
358
|
+
|
|
359
|
+
tool_callable = ADKToolWrapper(
|
|
360
|
+
func,
|
|
361
|
+
tool_config_model.tool_config,
|
|
362
|
+
tool_config_model.function_name,
|
|
363
|
+
origin="python",
|
|
364
|
+
raw_string_args=tool_config_model.raw_string_args,
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
if tool_config_model.tool_name:
|
|
368
|
+
tool_callable.__name__ = tool_config_model.tool_name
|
|
369
|
+
if tool_config_model.tool_description:
|
|
370
|
+
tool_callable.__doc__ = tool_config_model.tool_description
|
|
371
|
+
|
|
372
|
+
loaded_python_tools.append(tool_callable)
|
|
373
|
+
log.info(
|
|
374
|
+
"%s Loaded Python tool: %s from %s.",
|
|
375
|
+
component.log_identifier,
|
|
376
|
+
tool_callable.__name__,
|
|
377
|
+
module_name,
|
|
378
|
+
)
|
|
379
|
+
# Case 2: Advanced class-based dynamic tool or provider
|
|
380
|
+
else:
|
|
381
|
+
dynamic_tools = _load_python_class_based_tool(module, tool_config, component)
|
|
382
|
+
loaded_python_tools.extend(dynamic_tools)
|
|
383
|
+
|
|
384
|
+
# --- Lifecycle Hook Execution for all Python Tools ---
|
|
385
|
+
cleanup_hooks = await _create_python_tool_lifecycle_hooks(
|
|
386
|
+
component, tool_config_model, loaded_python_tools
|
|
387
|
+
)
|
|
388
|
+
|
|
389
|
+
return loaded_python_tools, [], cleanup_hooks
|
|
390
|
+
|
|
391
|
+
async def _load_builtin_tool(component: "SamAgentComponent", tool_config: Dict) -> ToolLoadingResult:
|
|
392
|
+
"""Loads a single built-in tool from the SAM or ADK tool registry."""
|
|
393
|
+
from pydantic import TypeAdapter
|
|
394
|
+
|
|
395
|
+
builtin_tool_adapter = TypeAdapter(BuiltinToolConfig)
|
|
396
|
+
tool_config_model = builtin_tool_adapter.validate_python(tool_config)
|
|
397
|
+
|
|
398
|
+
tool_name = tool_config_model.tool_name
|
|
399
|
+
if not tool_name:
|
|
400
|
+
raise ValueError("'tool_name' required for builtin tool.")
|
|
401
|
+
|
|
402
|
+
# Check SAM registry first
|
|
403
|
+
sam_tool_def = tool_registry.get_tool_by_name(tool_name)
|
|
404
|
+
if sam_tool_def:
|
|
405
|
+
tool_callable = ADKToolWrapper(
|
|
406
|
+
sam_tool_def.implementation,
|
|
407
|
+
tool_config_model.tool_config,
|
|
408
|
+
sam_tool_def.name,
|
|
409
|
+
origin="builtin",
|
|
410
|
+
raw_string_args=sam_tool_def.raw_string_args,
|
|
411
|
+
)
|
|
412
|
+
log.info(
|
|
413
|
+
"%s Loaded SAM built-in tool: %s",
|
|
414
|
+
component.log_identifier,
|
|
415
|
+
sam_tool_def.name,
|
|
416
|
+
)
|
|
417
|
+
return [tool_callable], [sam_tool_def], []
|
|
418
|
+
|
|
419
|
+
# Fallback to ADK built-in tools module
|
|
420
|
+
adk_tool = getattr(adk_tools_module, tool_name, None)
|
|
421
|
+
if adk_tool and isinstance(adk_tool, (BaseTool, Callable)):
|
|
422
|
+
adk_tool.origin = "adk_builtin"
|
|
423
|
+
log.info(
|
|
424
|
+
"%s Loaded ADK built-in tool: %s",
|
|
425
|
+
component.log_identifier,
|
|
426
|
+
tool_name,
|
|
427
|
+
)
|
|
428
|
+
return [adk_tool], [], []
|
|
429
|
+
|
|
430
|
+
raise ValueError(
|
|
431
|
+
f"Built-in tool '{tool_name}' not found in SAM or ADK registry."
|
|
432
|
+
)
|
|
433
|
+
|
|
434
|
+
async def _load_builtin_group_tool(component: "SamAgentComponent", tool_config: Dict) -> ToolLoadingResult:
|
|
435
|
+
"""Loads a group of built-in tools by category from the SAM tool registry."""
|
|
436
|
+
from pydantic import TypeAdapter
|
|
437
|
+
|
|
438
|
+
group_tool_adapter = TypeAdapter(BuiltinGroupToolConfig)
|
|
439
|
+
tool_config_model = group_tool_adapter.validate_python(tool_config)
|
|
440
|
+
|
|
441
|
+
group_name = tool_config_model.group_name
|
|
442
|
+
if not group_name:
|
|
443
|
+
raise ValueError("'group_name' required for builtin-group.")
|
|
444
|
+
|
|
445
|
+
tools_in_group = tool_registry.get_tools_by_category(group_name)
|
|
446
|
+
if not tools_in_group:
|
|
447
|
+
log.warning("No tools found for built-in group: %s", group_name)
|
|
448
|
+
return [], [], []
|
|
449
|
+
|
|
450
|
+
# Run initializers for the group
|
|
451
|
+
initializers_to_run: Dict[Callable, Dict] = {}
|
|
452
|
+
for tool_def in tools_in_group:
|
|
453
|
+
if (
|
|
454
|
+
tool_def.initializer
|
|
455
|
+
and tool_def.initializer not in initializers_to_run
|
|
456
|
+
):
|
|
457
|
+
initializers_to_run[tool_def.initializer] = tool_config_model.tool_config
|
|
458
|
+
|
|
459
|
+
for init_func, init_config in initializers_to_run.items():
|
|
460
|
+
try:
|
|
461
|
+
log.info(
|
|
462
|
+
"%s Running initializer '%s' for tool group '%s'.",
|
|
463
|
+
component.log_identifier,
|
|
464
|
+
init_func.__name__,
|
|
465
|
+
group_name,
|
|
466
|
+
)
|
|
467
|
+
init_func(component, init_config)
|
|
468
|
+
log.info(
|
|
469
|
+
"%s Successfully executed initializer '%s' for tool group '%s'.",
|
|
470
|
+
component.log_identifier,
|
|
471
|
+
init_func.__name__,
|
|
472
|
+
group_name,
|
|
473
|
+
)
|
|
474
|
+
except Exception as e:
|
|
475
|
+
log.exception(
|
|
476
|
+
"%s Failed to run initializer '%s' for tool group '%s': %s",
|
|
477
|
+
component.log_identifier,
|
|
478
|
+
init_func.__name__,
|
|
479
|
+
group_name,
|
|
480
|
+
e,
|
|
481
|
+
)
|
|
482
|
+
raise e
|
|
483
|
+
|
|
484
|
+
loaded_tools: List[Union[BaseTool, Callable]] = []
|
|
485
|
+
enabled_builtin_tools: List[BuiltinTool] = []
|
|
486
|
+
for tool_def in tools_in_group:
|
|
487
|
+
specific_tool_config = tool_config_model.tool_config.get(tool_def.name)
|
|
488
|
+
tool_callable = ADKToolWrapper(
|
|
489
|
+
tool_def.implementation,
|
|
490
|
+
specific_tool_config,
|
|
491
|
+
tool_def.name,
|
|
492
|
+
origin="builtin",
|
|
493
|
+
raw_string_args=tool_def.raw_string_args,
|
|
494
|
+
)
|
|
495
|
+
loaded_tools.append(tool_callable)
|
|
496
|
+
enabled_builtin_tools.append(tool_def)
|
|
497
|
+
|
|
498
|
+
log.info(
|
|
499
|
+
"Loaded %d tools from built-in group: %s",
|
|
500
|
+
len(loaded_tools),
|
|
501
|
+
group_name,
|
|
502
|
+
)
|
|
503
|
+
return loaded_tools, enabled_builtin_tools, []
|
|
504
|
+
|
|
505
|
+
def validate_filesystem_path(path, log_identifier=""):
|
|
506
|
+
"""
|
|
507
|
+
Validates that a filesystem path exists and is accessible.
|
|
508
|
+
|
|
509
|
+
Args:
|
|
510
|
+
path: The filesystem path to validate
|
|
511
|
+
log_identifier: Optional identifier for logging
|
|
512
|
+
|
|
513
|
+
Returns:
|
|
514
|
+
bool: True if the path exists and is accessible, False otherwise
|
|
515
|
+
|
|
516
|
+
Raises:
|
|
517
|
+
ValueError: If the path doesn't exist or isn't accessible
|
|
518
|
+
"""
|
|
519
|
+
if not path:
|
|
520
|
+
raise ValueError(f"{log_identifier} Filesystem path is empty or None")
|
|
521
|
+
|
|
522
|
+
if not os.path.exists(path):
|
|
523
|
+
raise ValueError(f"{log_identifier} Filesystem path does not exist: {path}")
|
|
524
|
+
|
|
525
|
+
if not os.path.isdir(path):
|
|
526
|
+
raise ValueError(f"{log_identifier} Filesystem path is not a directory: {path}")
|
|
527
|
+
|
|
528
|
+
# Check if the directory is readable and writable
|
|
529
|
+
if not os.access(path, os.R_OK | os.W_OK):
|
|
530
|
+
raise ValueError(f"{log_identifier} Filesystem path is not readable and writable: {path}")
|
|
531
|
+
|
|
532
|
+
return True
|
|
533
|
+
|
|
534
|
+
async def _load_mcp_tool(component: "SamAgentComponent", tool_config: Dict) -> ToolLoadingResult:
|
|
535
|
+
"""Loads an MCP toolset based on connection parameters."""
|
|
536
|
+
from pydantic import TypeAdapter
|
|
537
|
+
|
|
538
|
+
mcp_tool_adapter = TypeAdapter(McpToolConfig)
|
|
539
|
+
tool_config_model = mcp_tool_adapter.validate_python(tool_config)
|
|
540
|
+
|
|
541
|
+
connection_params_config = tool_config_model.connection_params
|
|
542
|
+
if not connection_params_config:
|
|
543
|
+
raise ValueError("'connection_params' required for mcp tool.")
|
|
544
|
+
|
|
545
|
+
connection_type = connection_params_config.get("type", "").lower()
|
|
546
|
+
connection_args = {
|
|
547
|
+
k: v for k, v in connection_params_config.items() if k != "type"
|
|
548
|
+
}
|
|
549
|
+
connection_args["timeout"] = connection_args.get("timeout", 30)
|
|
550
|
+
|
|
551
|
+
environment_variables = tool_config_model.environment_variables
|
|
552
|
+
env_param = {}
|
|
553
|
+
if connection_type == "stdio" and environment_variables:
|
|
554
|
+
if isinstance(environment_variables, dict):
|
|
555
|
+
env_param = environment_variables
|
|
556
|
+
log.debug(
|
|
557
|
+
"%s Found environment_variables for stdio MCP tool.",
|
|
558
|
+
component.log_identifier,
|
|
559
|
+
)
|
|
560
|
+
else:
|
|
561
|
+
log.warning(
|
|
562
|
+
"%s 'environment_variables' provided for stdio MCP tool but it is not a dictionary. Ignoring.",
|
|
563
|
+
component.log_identifier,
|
|
564
|
+
)
|
|
565
|
+
|
|
566
|
+
if connection_type == "stdio":
|
|
567
|
+
cmd_arg = connection_args.get("command")
|
|
568
|
+
args_list = connection_args.get("args", [])
|
|
569
|
+
if isinstance(cmd_arg, list):
|
|
570
|
+
command_str = " ".join(cmd_arg)
|
|
571
|
+
elif isinstance(cmd_arg, str):
|
|
572
|
+
command_str = cmd_arg
|
|
573
|
+
else:
|
|
574
|
+
raise ValueError(
|
|
575
|
+
f"MCP tool 'command' parameter must be a string or a list of strings, got {type(cmd_arg)}"
|
|
576
|
+
)
|
|
577
|
+
if not isinstance(args_list, list):
|
|
578
|
+
raise ValueError(
|
|
579
|
+
f"MCP tool 'args' parameter must be a list, got {type(args_list)}"
|
|
580
|
+
)
|
|
581
|
+
|
|
582
|
+
# Check if this is the filesystem MCP server
|
|
583
|
+
if args_list and any("@modelcontextprotocol/server-filesystem" in arg for arg in args_list):
|
|
584
|
+
# Find the index of the server-filesystem argument
|
|
585
|
+
server_fs_index = -1
|
|
586
|
+
for i, arg in enumerate(args_list):
|
|
587
|
+
if "@modelcontextprotocol/server-filesystem" in arg:
|
|
588
|
+
server_fs_index = i
|
|
589
|
+
break
|
|
590
|
+
|
|
591
|
+
# All arguments after server-filesystem are directory paths
|
|
592
|
+
if server_fs_index >= 0 and server_fs_index + 1 < len(args_list):
|
|
593
|
+
directory_paths = args_list[server_fs_index + 1:]
|
|
594
|
+
|
|
595
|
+
for path in directory_paths:
|
|
596
|
+
try:
|
|
597
|
+
validate_filesystem_path(path, log_identifier=component.log_identifier)
|
|
598
|
+
log.info(
|
|
599
|
+
"%s Validated filesystem path for MCP server: %s",
|
|
600
|
+
component.log_identifier,
|
|
601
|
+
path
|
|
602
|
+
)
|
|
603
|
+
except ValueError as e:
|
|
604
|
+
log.error("%s", str(e))
|
|
605
|
+
raise ValueError(f"MCP filesystem server path validation failed: {e}")
|
|
606
|
+
final_connection_args = {
|
|
607
|
+
k: v
|
|
608
|
+
for k, v in connection_args.items()
|
|
609
|
+
if k not in ["command", "args", "timeout"]
|
|
610
|
+
}
|
|
611
|
+
connection_params = StdioConnectionParams(
|
|
612
|
+
server_params=StdioServerParameters(
|
|
613
|
+
command=command_str,
|
|
614
|
+
args=args_list,
|
|
615
|
+
**final_connection_args,
|
|
616
|
+
env=env_param if env_param else None,
|
|
617
|
+
),
|
|
618
|
+
timeout=connection_args.get("timeout"),
|
|
619
|
+
)
|
|
620
|
+
|
|
621
|
+
elif connection_type == "sse":
|
|
622
|
+
connection_params = SseServerParams(**connection_args)
|
|
623
|
+
elif connection_type == "streamable-http":
|
|
624
|
+
connection_params = StreamableHTTPServerParams(**connection_args)
|
|
625
|
+
else:
|
|
626
|
+
raise ValueError(f"Unsupported MCP connection type: {connection_type}")
|
|
627
|
+
|
|
628
|
+
tool_filter_list = (
|
|
629
|
+
[tool_config_model.tool_name] if tool_config_model.tool_name else None
|
|
630
|
+
)
|
|
631
|
+
if tool_filter_list:
|
|
632
|
+
log.info(
|
|
633
|
+
"%s MCP tool config specifies tool_name: '%s'. Applying as tool_filter.",
|
|
634
|
+
component.log_identifier,
|
|
635
|
+
tool_config_model.tool_name,
|
|
636
|
+
)
|
|
637
|
+
|
|
638
|
+
additional_params = {}
|
|
639
|
+
try:
|
|
640
|
+
from solace_agent_mesh_enterprise.auth.tool_configurator import (
|
|
641
|
+
configure_mcp_tool,
|
|
642
|
+
)
|
|
643
|
+
|
|
644
|
+
try:
|
|
645
|
+
# Call the tool configurator with MCP-specific context
|
|
646
|
+
additional_params = configure_mcp_tool(
|
|
647
|
+
tool_type="mcp",
|
|
648
|
+
tool_config=tool_config,
|
|
649
|
+
connection_params=connection_params,
|
|
650
|
+
tool_filter=tool_filter_list,
|
|
651
|
+
)
|
|
652
|
+
except Exception as e:
|
|
653
|
+
log.error(
|
|
654
|
+
"%s Tool configurator failed for %s: %s",
|
|
655
|
+
component.log_identifier,
|
|
656
|
+
tool_config.get("name", "unknown"),
|
|
657
|
+
e,
|
|
658
|
+
)
|
|
659
|
+
# Continue with normal tool creation if configurator fails
|
|
660
|
+
additional_params = {}
|
|
661
|
+
except ImportError:
|
|
662
|
+
pass
|
|
663
|
+
|
|
664
|
+
# Create the EmbedResolvingMCPToolset with base parameters
|
|
665
|
+
toolset_params = {
|
|
666
|
+
"connection_params": connection_params,
|
|
667
|
+
"tool_filter": tool_filter_list,
|
|
668
|
+
"tool_config": tool_config,
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
# Merge additional parameters from configurator
|
|
672
|
+
toolset_params.update(additional_params)
|
|
673
|
+
|
|
674
|
+
mcp_toolset_instance = EmbedResolvingMCPToolset(**toolset_params)
|
|
675
|
+
mcp_toolset_instance.origin = "mcp"
|
|
676
|
+
|
|
677
|
+
log.info(
|
|
678
|
+
"%s Initialized MCPToolset (filter: %s) for server: %s",
|
|
679
|
+
component.log_identifier,
|
|
680
|
+
(tool_filter_list if tool_filter_list else "none (all tools)"),
|
|
681
|
+
connection_params,
|
|
682
|
+
)
|
|
683
|
+
|
|
684
|
+
return [mcp_toolset_instance], [], []
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
async def _load_openapi_tool(component: "SamAgentComponent", tool_config: Dict) -> ToolLoadingResult:
|
|
688
|
+
"""
|
|
689
|
+
Loads an OpenAPI toolset by delegating to the enterprise configurator.
|
|
690
|
+
|
|
691
|
+
This function validates the tool configuration and attempts to load the OpenAPI tool
|
|
692
|
+
using the enterprise package. If the enterprise package is not available, it logs a
|
|
693
|
+
warning and returns empty results.
|
|
694
|
+
|
|
695
|
+
Args:
|
|
696
|
+
component: The SamAgentComponent instance
|
|
697
|
+
tool_config: Dictionary containing the tool's configuration
|
|
698
|
+
|
|
699
|
+
Returns:
|
|
700
|
+
ToolLoadingResult: Tuple of (tools, builtins, cleanup_hooks)
|
|
701
|
+
Returns ([], [], []) if enterprise package not available
|
|
702
|
+
"""
|
|
703
|
+
from pydantic import TypeAdapter
|
|
704
|
+
from ..tools.tool_config_types import OpenApiToolConfig
|
|
705
|
+
|
|
706
|
+
# Validate basic tool configuration structure
|
|
707
|
+
openapi_tool_adapter = TypeAdapter(OpenApiToolConfig)
|
|
708
|
+
try:
|
|
709
|
+
tool_config_model = openapi_tool_adapter.validate_python(tool_config)
|
|
710
|
+
except Exception as e:
|
|
711
|
+
log.error(
|
|
712
|
+
"%s Invalid OpenAPI tool configuration: %s",
|
|
713
|
+
component.log_identifier,
|
|
714
|
+
e,
|
|
715
|
+
)
|
|
716
|
+
raise
|
|
717
|
+
|
|
718
|
+
# Try to load the tool using the enterprise configurator
|
|
719
|
+
try:
|
|
720
|
+
from solace_agent_mesh_enterprise.auth.tool_configurator import (
|
|
721
|
+
configure_openapi_tool,
|
|
722
|
+
)
|
|
723
|
+
|
|
724
|
+
try:
|
|
725
|
+
openapi_toolset = configure_openapi_tool(
|
|
726
|
+
tool_type="openapi",
|
|
727
|
+
tool_config=tool_config,
|
|
728
|
+
)
|
|
729
|
+
openapi_toolset.origin = "openapi"
|
|
730
|
+
|
|
731
|
+
log.info(
|
|
732
|
+
"%s Loaded OpenAPI toolset via enterprise configurator",
|
|
733
|
+
component.log_identifier,
|
|
734
|
+
)
|
|
735
|
+
|
|
736
|
+
return [openapi_toolset], [], []
|
|
737
|
+
|
|
738
|
+
except Exception as e:
|
|
739
|
+
log.error(
|
|
740
|
+
"%s Failed to create OpenAPI tool %s: %s",
|
|
741
|
+
component.log_identifier,
|
|
742
|
+
tool_config.get("name", "unknown"),
|
|
743
|
+
e,
|
|
744
|
+
)
|
|
745
|
+
raise
|
|
746
|
+
|
|
747
|
+
except ImportError:
|
|
748
|
+
log.warning(
|
|
749
|
+
"%s OpenAPI tools require the solace-agent-mesh-enterprise package. "
|
|
750
|
+
"Skipping tool configuration: %s",
|
|
751
|
+
component.log_identifier,
|
|
752
|
+
tool_config.get("name", "unknown"),
|
|
753
|
+
)
|
|
754
|
+
return [], [], []
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
def _load_internal_tools(component: "SamAgentComponent", loaded_tool_names: Set[str]) -> ToolLoadingResult:
|
|
758
|
+
"""Loads internal framework tools that are not explicitly configured by the user."""
|
|
759
|
+
loaded_tools: List[Union[BaseTool, Callable]] = []
|
|
760
|
+
enabled_builtin_tools: List[BuiltinTool] = []
|
|
761
|
+
|
|
762
|
+
internal_tool_names = ["_notify_artifact_save"]
|
|
763
|
+
if component.get_config("enable_auto_continuation", True):
|
|
764
|
+
internal_tool_names.append("_continue_generation")
|
|
765
|
+
|
|
766
|
+
for tool_name in internal_tool_names:
|
|
767
|
+
try:
|
|
768
|
+
_check_and_register_tool_name(tool_name, "internal", loaded_tool_names)
|
|
769
|
+
except ValueError:
|
|
770
|
+
log.debug(
|
|
771
|
+
"%s Internal tool '%s' was already loaded explicitly. Skipping implicit load.",
|
|
772
|
+
component.log_identifier,
|
|
773
|
+
tool_name,
|
|
774
|
+
)
|
|
775
|
+
continue
|
|
776
|
+
|
|
777
|
+
tool_def = tool_registry.get_tool_by_name(tool_name)
|
|
778
|
+
if tool_def:
|
|
779
|
+
# Wrap the implementation to ensure its description is passed to the LLM
|
|
780
|
+
tool_callable = ADKToolWrapper(
|
|
781
|
+
tool_def.implementation,
|
|
782
|
+
None, # No specific config for internal tools
|
|
783
|
+
tool_def.name,
|
|
784
|
+
origin="internal",
|
|
785
|
+
)
|
|
786
|
+
|
|
787
|
+
tool_callable.__doc__ = tool_def.description
|
|
788
|
+
|
|
789
|
+
loaded_tools.append(tool_callable)
|
|
790
|
+
enabled_builtin_tools.append(tool_def)
|
|
791
|
+
log.info(
|
|
792
|
+
"%s Implicitly loaded internal framework tool: %s",
|
|
793
|
+
component.log_identifier,
|
|
794
|
+
tool_def.name,
|
|
795
|
+
)
|
|
796
|
+
else:
|
|
797
|
+
log.warning(
|
|
798
|
+
"%s Could not find internal framework tool '%s' in registry. Related features may not work.",
|
|
799
|
+
component.log_identifier,
|
|
800
|
+
tool_name,
|
|
801
|
+
)
|
|
802
|
+
|
|
803
|
+
return loaded_tools, enabled_builtin_tools, []
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
async def load_adk_tools(
|
|
807
|
+
component,
|
|
808
|
+
) -> Tuple[List[Union[BaseTool, Callable]], List[BuiltinTool], List[Callable]]:
|
|
809
|
+
"""
|
|
810
|
+
Loads all configured tools for the agent.
|
|
811
|
+
- Explicitly configured tools (Python, MCP, ADK Built-ins) from YAML.
|
|
812
|
+
- SAM Built-in tools (Artifact, Data, etc.) from the tool registry,
|
|
813
|
+
filtered by agent configuration.
|
|
814
|
+
|
|
815
|
+
Args:
|
|
816
|
+
component: The SamAgentComponent instance.
|
|
817
|
+
|
|
818
|
+
Returns:
|
|
819
|
+
A tuple containing:
|
|
820
|
+
- A list of loaded tool callables/instances for the ADK agent.
|
|
821
|
+
- A list of enabled BuiltinTool definition objects for prompt generation.
|
|
822
|
+
- A list of awaitable cleanup functions for the tools.
|
|
823
|
+
|
|
824
|
+
Raises:
|
|
825
|
+
ImportError: If a configured tool or its dependencies cannot be loaded.
|
|
826
|
+
"""
|
|
827
|
+
loaded_tools: List[Union[BaseTool, Callable]] = []
|
|
828
|
+
enabled_builtin_tools: List[BuiltinTool] = []
|
|
829
|
+
loaded_tool_names: Set[str] = set()
|
|
830
|
+
cleanup_hooks: List[Callable] = []
|
|
831
|
+
tools_config = component.get_config("tools", [])
|
|
832
|
+
|
|
833
|
+
from pydantic import TypeAdapter, ValidationError
|
|
834
|
+
|
|
835
|
+
any_tool_adapter = TypeAdapter(AnyToolConfig)
|
|
836
|
+
|
|
837
|
+
if not tools_config:
|
|
838
|
+
log.info(
|
|
839
|
+
"%s No explicit tools configured in 'tools' list.", component.log_identifier
|
|
840
|
+
)
|
|
841
|
+
else:
|
|
842
|
+
log.info(
|
|
843
|
+
"%s Loading %d tool(s) from 'tools' list configuration...",
|
|
844
|
+
component.log_identifier,
|
|
845
|
+
len(tools_config),
|
|
846
|
+
)
|
|
847
|
+
for tool_config in tools_config:
|
|
848
|
+
try:
|
|
849
|
+
tool_config_model = any_tool_adapter.validate_python(tool_config)
|
|
850
|
+
tool_type = tool_config_model.tool_type.lower()
|
|
851
|
+
|
|
852
|
+
new_tools, new_builtins, new_cleanups = [], [], []
|
|
853
|
+
|
|
854
|
+
if tool_type == "python":
|
|
855
|
+
(
|
|
856
|
+
new_tools,
|
|
857
|
+
new_builtins,
|
|
858
|
+
new_cleanups,
|
|
859
|
+
) = await _load_python_tool(component, tool_config)
|
|
860
|
+
elif tool_type == "builtin":
|
|
861
|
+
(
|
|
862
|
+
new_tools,
|
|
863
|
+
new_builtins,
|
|
864
|
+
new_cleanups,
|
|
865
|
+
) = await _load_builtin_tool(component, tool_config)
|
|
866
|
+
elif tool_type == "builtin-group":
|
|
867
|
+
(
|
|
868
|
+
new_tools,
|
|
869
|
+
new_builtins,
|
|
870
|
+
new_cleanups,
|
|
871
|
+
) = await _load_builtin_group_tool(component, tool_config)
|
|
872
|
+
elif tool_type == "mcp":
|
|
873
|
+
(
|
|
874
|
+
new_tools,
|
|
875
|
+
new_builtins,
|
|
876
|
+
new_cleanups,
|
|
877
|
+
) = await _load_mcp_tool(component, tool_config)
|
|
878
|
+
elif tool_type == "openapi":
|
|
879
|
+
(
|
|
880
|
+
new_tools,
|
|
881
|
+
new_builtins,
|
|
882
|
+
new_cleanups,
|
|
883
|
+
) = await _load_openapi_tool(component, tool_config)
|
|
884
|
+
else:
|
|
885
|
+
log.warning(
|
|
886
|
+
"%s Unknown tool type '%s' in config: %s",
|
|
887
|
+
component.log_identifier,
|
|
888
|
+
tool_type,
|
|
889
|
+
tool_config,
|
|
890
|
+
)
|
|
891
|
+
|
|
892
|
+
# Centralized name checking and result aggregation
|
|
893
|
+
for tool in new_tools:
|
|
894
|
+
if isinstance(tool, EmbedResolvingMCPToolset):
|
|
895
|
+
# Special handling for MCPToolset which can load multiple tools
|
|
896
|
+
try:
|
|
897
|
+
mcp_tools = await tool.get_tools()
|
|
898
|
+
for mcp_tool in mcp_tools:
|
|
899
|
+
_check_and_register_tool_name(
|
|
900
|
+
mcp_tool.name, "mcp", loaded_tool_names
|
|
901
|
+
)
|
|
902
|
+
except Exception as e:
|
|
903
|
+
log.error(
|
|
904
|
+
"%s Failed to discover tools from MCP server for name registration: %s",
|
|
905
|
+
component.log_identifier,
|
|
906
|
+
str(e),
|
|
907
|
+
)
|
|
908
|
+
raise
|
|
909
|
+
else:
|
|
910
|
+
tool_name = getattr(
|
|
911
|
+
tool, "name", getattr(tool, "__name__", None)
|
|
912
|
+
)
|
|
913
|
+
if tool_name:
|
|
914
|
+
_check_and_register_tool_name(
|
|
915
|
+
tool_name, tool_type, loaded_tool_names
|
|
916
|
+
)
|
|
917
|
+
|
|
918
|
+
loaded_tools.extend(new_tools)
|
|
919
|
+
enabled_builtin_tools.extend(new_builtins)
|
|
920
|
+
# Prepend cleanup hooks to maintain LIFO execution order
|
|
921
|
+
cleanup_hooks = new_cleanups + cleanup_hooks
|
|
922
|
+
|
|
923
|
+
except Exception as e:
|
|
924
|
+
log.error(
|
|
925
|
+
"%s Failed to load tool config %s: %s",
|
|
926
|
+
component.log_identifier,
|
|
927
|
+
tool_config,
|
|
928
|
+
e,
|
|
929
|
+
)
|
|
930
|
+
raise e
|
|
931
|
+
|
|
932
|
+
# Load internal framework tools
|
|
933
|
+
(
|
|
934
|
+
internal_tools,
|
|
935
|
+
internal_builtins,
|
|
936
|
+
internal_cleanups,
|
|
937
|
+
) = _load_internal_tools(component, loaded_tool_names)
|
|
938
|
+
loaded_tools.extend(internal_tools)
|
|
939
|
+
enabled_builtin_tools.extend(internal_builtins)
|
|
940
|
+
cleanup_hooks.extend(internal_cleanups)
|
|
941
|
+
|
|
942
|
+
log.info(
|
|
943
|
+
"%s Finished loading tools. Total tools for ADK: %d. Total SAM built-ins for prompt: %d. Total cleanup hooks: %d. Peer tools added dynamically.",
|
|
944
|
+
component.log_identifier,
|
|
945
|
+
len(loaded_tools),
|
|
946
|
+
len(enabled_builtin_tools),
|
|
947
|
+
len(cleanup_hooks),
|
|
948
|
+
)
|
|
949
|
+
return loaded_tools, enabled_builtin_tools, cleanup_hooks
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
def initialize_adk_agent(
|
|
953
|
+
component,
|
|
954
|
+
loaded_explicit_tools: List[Union[BaseTool, Callable]],
|
|
955
|
+
enabled_builtin_tools: List[BuiltinTool],
|
|
956
|
+
) -> AppLlmAgent:
|
|
957
|
+
"""
|
|
958
|
+
Initializes the ADK LlmAgent based on component configuration.
|
|
959
|
+
Assigns callbacks for peer tool injection, dynamic instruction injection,
|
|
960
|
+
artifact metadata injection, embed resolution, and logging.
|
|
961
|
+
|
|
962
|
+
Args:
|
|
963
|
+
component: The A2A_ADK_HostComponent instance.
|
|
964
|
+
loaded_explicit_tools: The list of pre-loaded non-peer tools.
|
|
965
|
+
|
|
966
|
+
Returns:
|
|
967
|
+
An initialized LlmAgent instance.
|
|
968
|
+
|
|
969
|
+
Raises:
|
|
970
|
+
ValueError: If configuration is invalid.
|
|
971
|
+
ImportError: If required dependencies are missing.
|
|
972
|
+
Exception: For other initialization errors.
|
|
973
|
+
"""
|
|
974
|
+
agent_name = component.get_config("agent_name")
|
|
975
|
+
log.info(
|
|
976
|
+
"%s Initializing ADK Agent '%s' (Peer tools & instructions added via callback)...",
|
|
977
|
+
component.log_identifier,
|
|
978
|
+
agent_name,
|
|
979
|
+
)
|
|
980
|
+
|
|
981
|
+
model_config = component.get_config("model")
|
|
982
|
+
adk_model_instance: Union[str, BaseLlm]
|
|
983
|
+
if isinstance(model_config, str):
|
|
984
|
+
adk_model_instance = model_config
|
|
985
|
+
elif isinstance(model_config, dict):
|
|
986
|
+
if model_config.get("type") is None:
|
|
987
|
+
# Use setdefault to add keys only if they are not already present in the YAML
|
|
988
|
+
model_config.setdefault("num_retries", 3)
|
|
989
|
+
model_config.setdefault("timeout", 120)
|
|
990
|
+
log.info(
|
|
991
|
+
"%s Applying default resilience settings for LiteLlm model (num_retries=%s, timeout=%s). These can be overridden in YAML.",
|
|
992
|
+
component.log_identifier,
|
|
993
|
+
model_config["num_retries"],
|
|
994
|
+
model_config["timeout"],
|
|
995
|
+
)
|
|
996
|
+
|
|
997
|
+
try:
|
|
998
|
+
|
|
999
|
+
adk_model_instance = LiteLlm(**model_config)
|
|
1000
|
+
log.info(
|
|
1001
|
+
"%s Initialized LiteLlm model: %s",
|
|
1002
|
+
component.log_identifier,
|
|
1003
|
+
model_config.get("model"),
|
|
1004
|
+
)
|
|
1005
|
+
except ImportError:
|
|
1006
|
+
log.error(
|
|
1007
|
+
"%s LiteLlm dependency not found. Cannot use dictionary model config.",
|
|
1008
|
+
component.log_identifier,
|
|
1009
|
+
)
|
|
1010
|
+
raise
|
|
1011
|
+
except Exception as e:
|
|
1012
|
+
log.error(
|
|
1013
|
+
"%s Failed to initialize model from dictionary config: %s",
|
|
1014
|
+
component.log_identifier,
|
|
1015
|
+
e,
|
|
1016
|
+
)
|
|
1017
|
+
raise
|
|
1018
|
+
else:
|
|
1019
|
+
raise ValueError(
|
|
1020
|
+
f"{component.log_identifier} Invalid 'model' configuration type: {type(model_config)}"
|
|
1021
|
+
)
|
|
1022
|
+
|
|
1023
|
+
instruction = component._resolve_instruction_provider(
|
|
1024
|
+
component.get_config("instruction", "")
|
|
1025
|
+
)
|
|
1026
|
+
global_instruction = component._resolve_instruction_provider(
|
|
1027
|
+
component.get_config("global_instruction", "")
|
|
1028
|
+
)
|
|
1029
|
+
planner = component.get_config("planner")
|
|
1030
|
+
code_executor = component.get_config("code_executor")
|
|
1031
|
+
|
|
1032
|
+
try:
|
|
1033
|
+
agent = AppLlmAgent(
|
|
1034
|
+
name=agent_name,
|
|
1035
|
+
model=adk_model_instance,
|
|
1036
|
+
instruction=instruction,
|
|
1037
|
+
global_instruction=global_instruction,
|
|
1038
|
+
tools=loaded_explicit_tools,
|
|
1039
|
+
planner=planner,
|
|
1040
|
+
code_executor=code_executor,
|
|
1041
|
+
)
|
|
1042
|
+
|
|
1043
|
+
agent.host_component = component
|
|
1044
|
+
log.debug(
|
|
1045
|
+
"%s Attached host_component reference to AppLlmAgent.",
|
|
1046
|
+
component.log_identifier,
|
|
1047
|
+
)
|
|
1048
|
+
callbacks_in_order_for_before_model = []
|
|
1049
|
+
|
|
1050
|
+
callbacks_in_order_for_before_model.append(
|
|
1051
|
+
adk_callbacks.repair_history_callback
|
|
1052
|
+
)
|
|
1053
|
+
log.debug(
|
|
1054
|
+
"%s Added repair_history_callback to before_model chain.",
|
|
1055
|
+
component.log_identifier,
|
|
1056
|
+
)
|
|
1057
|
+
|
|
1058
|
+
if hasattr(component, "_inject_peer_tools_callback"):
|
|
1059
|
+
callbacks_in_order_for_before_model.append(
|
|
1060
|
+
component._inject_peer_tools_callback
|
|
1061
|
+
)
|
|
1062
|
+
log.debug(
|
|
1063
|
+
"%s Added _inject_peer_tools_callback to before_model chain.",
|
|
1064
|
+
component.log_identifier,
|
|
1065
|
+
)
|
|
1066
|
+
|
|
1067
|
+
if hasattr(component, "_filter_tools_by_capability_callback"):
|
|
1068
|
+
callbacks_in_order_for_before_model.append(
|
|
1069
|
+
component._filter_tools_by_capability_callback
|
|
1070
|
+
)
|
|
1071
|
+
log.debug(
|
|
1072
|
+
"%s Added _filter_tools_by_capability_callback to before_model chain.",
|
|
1073
|
+
component.log_identifier,
|
|
1074
|
+
)
|
|
1075
|
+
if hasattr(component, "_inject_gateway_instructions_callback"):
|
|
1076
|
+
callbacks_in_order_for_before_model.append(
|
|
1077
|
+
component._inject_gateway_instructions_callback
|
|
1078
|
+
)
|
|
1079
|
+
log.debug(
|
|
1080
|
+
"%s Added _inject_gateway_instructions_callback to before_model chain.",
|
|
1081
|
+
component.log_identifier,
|
|
1082
|
+
)
|
|
1083
|
+
|
|
1084
|
+
dynamic_instruction_callback_with_component = functools.partial(
|
|
1085
|
+
adk_callbacks.inject_dynamic_instructions_callback,
|
|
1086
|
+
host_component=component,
|
|
1087
|
+
active_builtin_tools=enabled_builtin_tools,
|
|
1088
|
+
)
|
|
1089
|
+
callbacks_in_order_for_before_model.append(
|
|
1090
|
+
dynamic_instruction_callback_with_component
|
|
1091
|
+
)
|
|
1092
|
+
log.debug(
|
|
1093
|
+
"%s Added inject_dynamic_instructions_callback to before_model chain.",
|
|
1094
|
+
component.log_identifier,
|
|
1095
|
+
)
|
|
1096
|
+
|
|
1097
|
+
solace_llm_trigger_callback_with_component = functools.partial(
|
|
1098
|
+
adk_callbacks.solace_llm_invocation_callback, host_component=component
|
|
1099
|
+
)
|
|
1100
|
+
|
|
1101
|
+
def final_before_model_wrapper(
|
|
1102
|
+
callback_context: CallbackContext, llm_request: LlmRequest
|
|
1103
|
+
) -> Optional[LlmResponse]:
|
|
1104
|
+
early_response: Optional[LlmResponse] = None
|
|
1105
|
+
for cb_func in callbacks_in_order_for_before_model:
|
|
1106
|
+
response = cb_func(callback_context, llm_request)
|
|
1107
|
+
if response:
|
|
1108
|
+
early_response = response
|
|
1109
|
+
break
|
|
1110
|
+
|
|
1111
|
+
solace_llm_trigger_callback_with_component(callback_context, llm_request)
|
|
1112
|
+
|
|
1113
|
+
if early_response:
|
|
1114
|
+
return early_response
|
|
1115
|
+
|
|
1116
|
+
return None
|
|
1117
|
+
|
|
1118
|
+
agent.before_model_callback = final_before_model_wrapper
|
|
1119
|
+
log.debug(
|
|
1120
|
+
"%s Final before_model_callback chain (Solace logging now occurs last) assigned to agent.",
|
|
1121
|
+
component.log_identifier,
|
|
1122
|
+
)
|
|
1123
|
+
|
|
1124
|
+
tool_invocation_start_cb_with_component = functools.partial(
|
|
1125
|
+
adk_callbacks.notify_tool_invocation_start_callback,
|
|
1126
|
+
host_component=component,
|
|
1127
|
+
)
|
|
1128
|
+
agent.before_tool_callback = tool_invocation_start_cb_with_component
|
|
1129
|
+
log.debug(
|
|
1130
|
+
"%s Assigned notify_tool_invocation_start_callback as before_tool_callback.",
|
|
1131
|
+
component.log_identifier,
|
|
1132
|
+
)
|
|
1133
|
+
|
|
1134
|
+
large_response_cb_with_component = functools.partial(
|
|
1135
|
+
adk_callbacks.manage_large_mcp_tool_responses_callback,
|
|
1136
|
+
host_component=component,
|
|
1137
|
+
)
|
|
1138
|
+
metadata_injection_cb_with_component = functools.partial(
|
|
1139
|
+
adk_callbacks.after_tool_callback_inject_metadata, host_component=component
|
|
1140
|
+
)
|
|
1141
|
+
track_artifacts_cb_with_component = functools.partial(
|
|
1142
|
+
adk_callbacks.track_produced_artifacts_callback, host_component=component
|
|
1143
|
+
)
|
|
1144
|
+
notify_tool_result_cb_with_component = functools.partial(
|
|
1145
|
+
adk_callbacks.notify_tool_execution_result_callback,
|
|
1146
|
+
host_component=component,
|
|
1147
|
+
)
|
|
1148
|
+
|
|
1149
|
+
async def chained_after_tool_callback(
|
|
1150
|
+
tool: BaseTool,
|
|
1151
|
+
args: Dict,
|
|
1152
|
+
tool_context: ToolContext,
|
|
1153
|
+
tool_response: Dict,
|
|
1154
|
+
) -> Optional[Dict]:
|
|
1155
|
+
log.debug(
|
|
1156
|
+
"%s Tool callback chain started for tool: %s, response type: %s",
|
|
1157
|
+
component.log_identifier,
|
|
1158
|
+
tool.name,
|
|
1159
|
+
type(tool_response).__name__,
|
|
1160
|
+
)
|
|
1161
|
+
|
|
1162
|
+
try:
|
|
1163
|
+
# First, notify the UI about the raw result.
|
|
1164
|
+
# This is a fire-and-forget notification that does not modify the response.
|
|
1165
|
+
notify_tool_result_cb_with_component(
|
|
1166
|
+
tool, args, tool_context, tool_response
|
|
1167
|
+
)
|
|
1168
|
+
|
|
1169
|
+
# Now, proceed with the existing chain that modifies the response for the LLM.
|
|
1170
|
+
processed_by_large_handler = await large_response_cb_with_component(
|
|
1171
|
+
tool, args, tool_context, tool_response
|
|
1172
|
+
)
|
|
1173
|
+
response_for_metadata_injector = (
|
|
1174
|
+
processed_by_large_handler
|
|
1175
|
+
if processed_by_large_handler is not None
|
|
1176
|
+
else tool_response
|
|
1177
|
+
)
|
|
1178
|
+
|
|
1179
|
+
final_response_after_metadata = (
|
|
1180
|
+
await metadata_injection_cb_with_component(
|
|
1181
|
+
tool, args, tool_context, response_for_metadata_injector
|
|
1182
|
+
)
|
|
1183
|
+
)
|
|
1184
|
+
|
|
1185
|
+
final_result = (
|
|
1186
|
+
final_response_after_metadata
|
|
1187
|
+
if final_response_after_metadata is not None
|
|
1188
|
+
else response_for_metadata_injector
|
|
1189
|
+
)
|
|
1190
|
+
|
|
1191
|
+
# Track produced artifacts. This callback does not modify the response.
|
|
1192
|
+
await track_artifacts_cb_with_component(
|
|
1193
|
+
tool, args, tool_context, final_result
|
|
1194
|
+
)
|
|
1195
|
+
|
|
1196
|
+
log.debug(
|
|
1197
|
+
"%s Tool callback chain completed for tool: %s, final response type: %s",
|
|
1198
|
+
component.log_identifier,
|
|
1199
|
+
tool.name,
|
|
1200
|
+
type(final_result).__name__,
|
|
1201
|
+
)
|
|
1202
|
+
|
|
1203
|
+
return final_result
|
|
1204
|
+
|
|
1205
|
+
except Exception as e:
|
|
1206
|
+
log.exception(
|
|
1207
|
+
"%s Error in tool callback chain for tool %s: %s",
|
|
1208
|
+
component.log_identifier,
|
|
1209
|
+
tool.name,
|
|
1210
|
+
e,
|
|
1211
|
+
)
|
|
1212
|
+
return tool_response
|
|
1213
|
+
|
|
1214
|
+
agent.after_tool_callback = chained_after_tool_callback
|
|
1215
|
+
log.debug(
|
|
1216
|
+
"%s Chained 'manage_large_mcp_tool_responses_callback' and 'after_tool_callback_inject_metadata' as after_tool_callback.",
|
|
1217
|
+
component.log_identifier,
|
|
1218
|
+
)
|
|
1219
|
+
|
|
1220
|
+
# --- After Model Callbacks Chain ---
|
|
1221
|
+
# The callbacks are executed in the order they are added to this list.
|
|
1222
|
+
callbacks_in_order_for_after_model = []
|
|
1223
|
+
|
|
1224
|
+
# 1. Fenced Artifact Block Processing (must run before auto-continue)
|
|
1225
|
+
artifact_block_cb = functools.partial(
|
|
1226
|
+
adk_callbacks.process_artifact_blocks_callback, host_component=component
|
|
1227
|
+
)
|
|
1228
|
+
callbacks_in_order_for_after_model.append(artifact_block_cb)
|
|
1229
|
+
log.debug(
|
|
1230
|
+
"%s Added process_artifact_blocks_callback to after_model chain.",
|
|
1231
|
+
component.log_identifier,
|
|
1232
|
+
)
|
|
1233
|
+
|
|
1234
|
+
# 2. Auto-Continuation (may short-circuit the chain)
|
|
1235
|
+
auto_continue_cb = functools.partial(
|
|
1236
|
+
adk_callbacks.auto_continue_on_max_tokens_callback, host_component=component
|
|
1237
|
+
)
|
|
1238
|
+
callbacks_in_order_for_after_model.append(auto_continue_cb)
|
|
1239
|
+
log.debug(
|
|
1240
|
+
"%s Added auto_continue_on_max_tokens_callback to after_model chain.",
|
|
1241
|
+
component.log_identifier,
|
|
1242
|
+
)
|
|
1243
|
+
|
|
1244
|
+
# 3. Solace LLM Response Logging
|
|
1245
|
+
solace_llm_response_cb = functools.partial(
|
|
1246
|
+
adk_callbacks.solace_llm_response_callback, host_component=component
|
|
1247
|
+
)
|
|
1248
|
+
callbacks_in_order_for_after_model.append(solace_llm_response_cb)
|
|
1249
|
+
|
|
1250
|
+
# 4. Chunk Logging
|
|
1251
|
+
log_chunk_cb = functools.partial(
|
|
1252
|
+
adk_callbacks.log_streaming_chunk_callback, host_component=component
|
|
1253
|
+
)
|
|
1254
|
+
callbacks_in_order_for_after_model.append(log_chunk_cb)
|
|
1255
|
+
|
|
1256
|
+
async def final_after_model_wrapper(
|
|
1257
|
+
callback_context: CallbackContext, llm_response: LlmResponse
|
|
1258
|
+
) -> Optional[LlmResponse]:
|
|
1259
|
+
for cb_func in callbacks_in_order_for_after_model:
|
|
1260
|
+
# Await async callbacks, call sync callbacks
|
|
1261
|
+
if inspect.iscoroutinefunction(cb_func):
|
|
1262
|
+
response = await cb_func(callback_context, llm_response)
|
|
1263
|
+
else:
|
|
1264
|
+
response = cb_func(callback_context, llm_response)
|
|
1265
|
+
|
|
1266
|
+
# If a callback returns a response, it hijacks the flow.
|
|
1267
|
+
if response:
|
|
1268
|
+
return response
|
|
1269
|
+
return None
|
|
1270
|
+
|
|
1271
|
+
agent.after_model_callback = final_after_model_wrapper
|
|
1272
|
+
log.debug(
|
|
1273
|
+
"%s Chained all after_model_callbacks and assigned to agent.",
|
|
1274
|
+
component.log_identifier,
|
|
1275
|
+
)
|
|
1276
|
+
|
|
1277
|
+
log.info(
|
|
1278
|
+
"%s ADK Agent '%s' created. Callbacks assigned.",
|
|
1279
|
+
component.log_identifier,
|
|
1280
|
+
agent_name,
|
|
1281
|
+
)
|
|
1282
|
+
return agent
|
|
1283
|
+
except Exception as e:
|
|
1284
|
+
log.error(
|
|
1285
|
+
"%s Failed to create ADK Agent '%s': %s",
|
|
1286
|
+
component.log_identifier,
|
|
1287
|
+
agent_name,
|
|
1288
|
+
e,
|
|
1289
|
+
)
|
|
1290
|
+
raise
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
def initialize_adk_runner(component) -> Runner:
|
|
1294
|
+
"""
|
|
1295
|
+
Initializes the ADK Runner.
|
|
1296
|
+
|
|
1297
|
+
Args:
|
|
1298
|
+
component: The A2A_ADK_HostComponent instance.
|
|
1299
|
+
|
|
1300
|
+
Returns:
|
|
1301
|
+
An initialized Runner instance.
|
|
1302
|
+
|
|
1303
|
+
Raises:
|
|
1304
|
+
Exception: For runner initialization errors.
|
|
1305
|
+
"""
|
|
1306
|
+
agent_name = component.get_config("agent_name")
|
|
1307
|
+
log.info(
|
|
1308
|
+
"%s Initializing ADK Runner for agent '%s'...",
|
|
1309
|
+
component.log_identifier,
|
|
1310
|
+
agent_name,
|
|
1311
|
+
)
|
|
1312
|
+
try:
|
|
1313
|
+
runner = Runner(
|
|
1314
|
+
app_name=agent_name,
|
|
1315
|
+
agent=component.adk_agent,
|
|
1316
|
+
session_service=component.session_service,
|
|
1317
|
+
artifact_service=component.artifact_service,
|
|
1318
|
+
memory_service=component.memory_service,
|
|
1319
|
+
credential_service=component.credential_service,
|
|
1320
|
+
)
|
|
1321
|
+
log.info("%s ADK Runner created successfully.", component.log_identifier)
|
|
1322
|
+
return runner
|
|
1323
|
+
except Exception as e:
|
|
1324
|
+
log.error("%s Failed to create ADK Runner: %s", component.log_identifier, e)
|
|
1325
|
+
raise
|