solace-agent-mesh 0.2.4__py3-none-any.whl → 1.0.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.
Potentially problematic release.
This version of solace-agent-mesh might be problematic. Click here for more details.
- solace_agent_mesh/__init__.py +5 -0
- solace_agent_mesh/agent/adk/adk_llm.txt +93 -0
- solace_agent_mesh/agent/adk/app_llm_agent.py +26 -0
- solace_agent_mesh/agent/adk/callbacks.py +1716 -0
- solace_agent_mesh/agent/adk/filesystem_artifact_service.py +381 -0
- solace_agent_mesh/agent/adk/invocation_monitor.py +295 -0
- solace_agent_mesh/agent/adk/models/lite_llm.py +872 -0
- solace_agent_mesh/agent/adk/models/models_llm.txt +94 -0
- solace_agent_mesh/agent/adk/runner.py +357 -0
- solace_agent_mesh/agent/adk/services.py +240 -0
- solace_agent_mesh/agent/adk/setup.py +751 -0
- solace_agent_mesh/agent/adk/stream_parser.py +214 -0
- solace_agent_mesh/agent/adk/tool_wrapper.py +139 -0
- solace_agent_mesh/agent/agent_llm.txt +41 -0
- solace_agent_mesh/agent/protocol/event_handlers.py +1444 -0
- solace_agent_mesh/agent/protocol/protocol_llm.txt +21 -0
- solace_agent_mesh/agent/sac/app.py +640 -0
- solace_agent_mesh/agent/sac/component.py +3496 -0
- solace_agent_mesh/agent/sac/patch_adk.py +111 -0
- solace_agent_mesh/agent/sac/sac_llm.txt +105 -0
- solace_agent_mesh/agent/sac/task_execution_context.py +185 -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 +90 -0
- solace_agent_mesh/agent/tools/__init__.py +14 -0
- solace_agent_mesh/agent/tools/audio_tools.py +1622 -0
- solace_agent_mesh/agent/tools/builtin_artifact_tools.py +1954 -0
- solace_agent_mesh/agent/tools/builtin_data_analysis_tools.py +238 -0
- solace_agent_mesh/agent/tools/general_agent_tools.py +571 -0
- solace_agent_mesh/agent/tools/image_tools.py +1184 -0
- solace_agent_mesh/agent/tools/peer_agent_tool.py +290 -0
- solace_agent_mesh/agent/tools/registry.py +36 -0
- solace_agent_mesh/agent/tools/test_tools.py +135 -0
- solace_agent_mesh/agent/tools/tool_definition.py +45 -0
- solace_agent_mesh/agent/tools/tools_llm.txt +104 -0
- solace_agent_mesh/agent/tools/web_tools.py +381 -0
- solace_agent_mesh/agent/utils/artifact_helpers.py +927 -0
- solace_agent_mesh/agent/utils/config_parser.py +47 -0
- solace_agent_mesh/agent/utils/context_helpers.py +60 -0
- solace_agent_mesh/agent/utils/utils_llm.txt +153 -0
- solace_agent_mesh/assets/docs/404.html +16 -0
- solace_agent_mesh/assets/docs/assets/css/styles.906a1503.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/sac-flows-80d5b603c6aafd33e87945680ce0abf3.png +0 -0
- solace_agent_mesh/assets/docs/assets/images/sac_parts_of_a_component-cb3d0424b1d0c17734c5435cca6b4082.png +0 -0
- solace_agent_mesh/assets/docs/assets/js/04989206.674a8007.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/0e682baa.79f0ab22.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/1001.0182a8bd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/1023fc19.015679ca.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/1523c6b4.91c7bc01.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/166ab619.7d97ccaf.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/17896441.a5e82f9b.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/17896441.a5e82f9b.js.LICENSE.txt +7 -0
- solace_agent_mesh/assets/docs/assets/js/1c6e87d2.a8c5ce5a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2130.ab9fd314.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/21ceee5f.614fa8dd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2237.5e477fc6.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2334.622a6395.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2a9cab12.8909df92.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3219.adc1d663.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/332e10b5.7a103f42.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3624.b524e433.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/3d406171.f722eaf5.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/4250.95455b28.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/42b3f8d8.36090198.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/4356.d169ab5b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/442a8107.5ba94b65.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/4c2787c2.66ee00e9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/5388.7a136447.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/55f47984.c484bf96.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/5b4258a4.bda20761.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/5e95c892.558d5167.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6143.0a1464c9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6395.e9c73649.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/7040.cb436723.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/7195.412f418a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/7280.3fb73bdb.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/768e31b0.a12673db.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/8356.8a379c04.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/85387663.6bf41934.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.d7c16be6.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/8591.d7c16be6.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.49e930c2.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8908.f9d1b506.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9157.b4093d07.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9278.a4fd875d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/945fb41e.74d728aa.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/9eff14a2.1bf8f61c.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/a3a92b25.26ca071f.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/a7bd4aaa.2204d2f7.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/a94703ab.0438dbc2.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/aba21aa0.c42a534c.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/aba87c2f.d3e2dcc3.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ae4415af.8e279b5d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/b7006a3a.40b10c9d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/bac0be12.f50d9bac.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/bb2ef573.207e6990.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/c2c06897.63b76e9e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/cc969b05.954186d4.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/cd3d4052.ca6eed8c.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ced92a13.fb92e7ca.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/cee5d587.f5b73ca1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/f284c35a.ecc3d195.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/f897a61a.f8c53b0f.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/fbfa3e75.aca209c9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/main.c6286d7c.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/main.c6286d7c.js.LICENSE.txt +81 -0
- solace_agent_mesh/assets/docs/assets/js/runtime~main.d5133813.js +1 -0
- solace_agent_mesh/assets/docs/docs/documentation/concepts/agents/index.html +128 -0
- solace_agent_mesh/assets/docs/docs/documentation/concepts/architecture/index.html +91 -0
- solace_agent_mesh/assets/docs/docs/documentation/concepts/cli/index.html +201 -0
- solace_agent_mesh/assets/docs/docs/documentation/concepts/gateways/index.html +91 -0
- solace_agent_mesh/assets/docs/docs/documentation/concepts/orchestrator/index.html +55 -0
- solace_agent_mesh/assets/docs/docs/documentation/concepts/plugins/index.html +82 -0
- solace_agent_mesh/assets/docs/docs/documentation/deployment/debugging/index.html +77 -0
- solace_agent_mesh/assets/docs/docs/documentation/deployment/deploy/index.html +48 -0
- solace_agent_mesh/assets/docs/docs/documentation/deployment/observability/index.html +54 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/index.html +17 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/component-overview/index.html +45 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/installation/index.html +76 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +150 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/quick-start/index.html +54 -0
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/bedrock-agents/index.html +267 -0
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/custom-agent/index.html +136 -0
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/event-mesh-gateway/index.html +116 -0
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/mcp-integration/index.html +80 -0
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/mongodb-integration/index.html +164 -0
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/rest-gateway/index.html +57 -0
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/slack-integration/index.html +72 -0
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/sql-database/index.html +102 -0
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/artifact-management/index.html +99 -0
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/audio-tools/index.html +90 -0
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/data-analysis-tools/index.html +107 -0
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/embeds/index.html +152 -0
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/index.html +103 -0
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/create-agents/index.html +170 -0
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/create-gateways/index.html +200 -0
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/creating-service-providers/index.html +54 -0
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/solace-ai-connector/index.html +69 -0
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/structure/index.html +59 -0
- solace_agent_mesh/assets/docs/img/Solace_AI_Framework_README.png +0 -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/solace-logo.png +0 -0
- solace_agent_mesh/assets/docs/lunr-index-1754075282978.json +1 -0
- solace_agent_mesh/assets/docs/lunr-index.json +1 -0
- solace_agent_mesh/assets/docs/search-doc-1754075282978.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 -1
- 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 +659 -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 +93 -0
- solace_agent_mesh/cli/commands/add_cmd/web_add_gateway_step.py +118 -0
- solace_agent_mesh/cli/commands/docs_cmd.py +57 -0
- solace_agent_mesh/cli/commands/eval_cmd.py +64 -0
- solace_agent_mesh/cli/commands/init_cmd/__init__.py +404 -0
- solace_agent_mesh/cli/commands/init_cmd/broker_step.py +201 -0
- solace_agent_mesh/cli/commands/init_cmd/directory_step.py +28 -0
- solace_agent_mesh/cli/commands/init_cmd/env_step.py +205 -0
- solace_agent_mesh/cli/commands/init_cmd/init_cmd_llm.txt +365 -0
- solace_agent_mesh/cli/commands/init_cmd/orchestrator_step.py +407 -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 +110 -0
- solace_agent_mesh/cli/commands/init_cmd/webui_gateway_step.py +183 -0
- solace_agent_mesh/cli/commands/plugin_cmd/__init__.py +18 -0
- solace_agent_mesh/cli/commands/plugin_cmd/add_cmd.py +372 -0
- solace_agent_mesh/cli/commands/plugin_cmd/build_cmd.py +86 -0
- solace_agent_mesh/cli/commands/plugin_cmd/catalog_cmd.py +139 -0
- solace_agent_mesh/cli/commands/plugin_cmd/create_cmd.py +309 -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 +158 -0
- solace_agent_mesh/cli/main.py +17 -294
- solace_agent_mesh/cli/utils.py +135 -204
- solace_agent_mesh/client/webui/frontend/static/assets/authCallback-DvlO62me.js +1 -0
- solace_agent_mesh/client/webui/frontend/static/assets/client-bp6u3qVZ.js +49 -0
- solace_agent_mesh/client/webui/frontend/static/assets/favicon-BLgzUch9.ico +0 -0
- solace_agent_mesh/client/webui/frontend/static/assets/main-D11Lmy9p.css +1 -0
- solace_agent_mesh/client/webui/frontend/static/assets/main-Gfk3BYn5.js +663 -0
- solace_agent_mesh/client/webui/frontend/static/auth-callback.html +14 -0
- solace_agent_mesh/client/webui/frontend/static/index.html +15 -0
- solace_agent_mesh/common/__init__.py +1 -0
- solace_agent_mesh/common/a2a_protocol.py +564 -0
- solace_agent_mesh/common/agent_registry.py +42 -0
- solace_agent_mesh/common/client/__init__.py +4 -0
- solace_agent_mesh/common/client/card_resolver.py +21 -0
- solace_agent_mesh/common/client/client.py +85 -0
- solace_agent_mesh/common/client/client_llm.txt +133 -0
- solace_agent_mesh/common/common_llm.txt +144 -0
- solace_agent_mesh/common/constants.py +1 -14
- solace_agent_mesh/common/middleware/__init__.py +12 -0
- solace_agent_mesh/common/middleware/config_resolver.py +130 -0
- solace_agent_mesh/common/middleware/middleware_llm.txt +174 -0
- solace_agent_mesh/common/middleware/registry.py +125 -0
- solace_agent_mesh/common/server/__init__.py +4 -0
- solace_agent_mesh/common/server/server.py +122 -0
- solace_agent_mesh/common/server/server_llm.txt +169 -0
- solace_agent_mesh/common/server/task_manager.py +291 -0
- solace_agent_mesh/common/server/utils.py +28 -0
- solace_agent_mesh/common/services/__init__.py +4 -0
- solace_agent_mesh/common/services/employee_service.py +162 -0
- solace_agent_mesh/common/services/identity_service.py +129 -0
- solace_agent_mesh/common/services/providers/__init__.py +4 -0
- solace_agent_mesh/common/services/providers/local_file_identity_service.py +148 -0
- solace_agent_mesh/common/services/providers/providers_llm.txt +113 -0
- solace_agent_mesh/common/services/services_llm.txt +132 -0
- solace_agent_mesh/common/types.py +411 -0
- solace_agent_mesh/common/utils/__init__.py +7 -0
- solace_agent_mesh/common/utils/asyncio_macos_fix.py +86 -0
- solace_agent_mesh/common/utils/embeds/__init__.py +33 -0
- solace_agent_mesh/common/utils/embeds/constants.py +55 -0
- solace_agent_mesh/common/utils/embeds/converter.py +452 -0
- solace_agent_mesh/common/utils/embeds/embeds_llm.txt +124 -0
- solace_agent_mesh/common/utils/embeds/evaluators.py +394 -0
- solace_agent_mesh/common/utils/embeds/modifiers.py +816 -0
- solace_agent_mesh/common/utils/embeds/resolver.py +865 -0
- solace_agent_mesh/common/utils/embeds/types.py +14 -0
- solace_agent_mesh/common/utils/in_memory_cache.py +108 -0
- solace_agent_mesh/common/utils/initializer.py +51 -0
- solace_agent_mesh/common/utils/log_formatters.py +44 -0
- solace_agent_mesh/common/utils/mime_helpers.py +106 -0
- solace_agent_mesh/common/utils/push_notification_auth.py +134 -0
- solace_agent_mesh/common/utils/utils_llm.txt +67 -0
- solace_agent_mesh/config_portal/backend/common.py +66 -24
- 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 +164 -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 +551 -181
- solace_agent_mesh/config_portal/frontend/static/client/assets/_index-_7yox_eh.js +48 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/components-B7lKcHVY.js +140 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/{entry.client-DX1misIU.js → entry.client-CEumGClk.js} +3 -3
- solace_agent_mesh/config_portal/frontend/static/client/assets/index-DSo1AH_7.js +68 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/manifest-e5c3acfe.js +1 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/{root-BApq5dPK.js → root-C4XmHinv.js} +2 -2
- solace_agent_mesh/config_portal/frontend/static/client/assets/root-DxRwaWiE.css +1 -0
- solace_agent_mesh/config_portal/frontend/static/client/index.html +3 -3
- solace_agent_mesh/core_a2a/__init__.py +1 -0
- solace_agent_mesh/core_a2a/core_a2a_llm.txt +88 -0
- solace_agent_mesh/core_a2a/service.py +331 -0
- solace_agent_mesh/evaluation/config_loader.py +657 -0
- solace_agent_mesh/evaluation/evaluator.py +667 -0
- solace_agent_mesh/evaluation/message_organizer.py +568 -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 +972 -0
- solace_agent_mesh/evaluation/report_generator.py +613 -0
- solace_agent_mesh/evaluation/run.py +613 -0
- solace_agent_mesh/evaluation/subscriber.py +872 -0
- solace_agent_mesh/evaluation/summary_builder.py +775 -0
- solace_agent_mesh/evaluation/test_case_loader.py +714 -0
- solace_agent_mesh/gateway/base/__init__.py +1 -0
- solace_agent_mesh/gateway/base/app.py +266 -0
- solace_agent_mesh/gateway/base/base_llm.txt +119 -0
- solace_agent_mesh/gateway/base/component.py +1542 -0
- solace_agent_mesh/gateway/base/task_context.py +74 -0
- solace_agent_mesh/gateway/gateway_llm.txt +125 -0
- solace_agent_mesh/gateway/http_sse/app.py +190 -0
- solace_agent_mesh/gateway/http_sse/component.py +1602 -0
- solace_agent_mesh/gateway/http_sse/components/__init__.py +7 -0
- solace_agent_mesh/gateway/http_sse/components/components_llm.txt +65 -0
- solace_agent_mesh/gateway/http_sse/components/visualization_forwarder_component.py +108 -0
- solace_agent_mesh/gateway/http_sse/dependencies.py +316 -0
- solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +63 -0
- solace_agent_mesh/gateway/http_sse/main.py +442 -0
- solace_agent_mesh/gateway/http_sse/routers/__init__.py +4 -0
- solace_agent_mesh/gateway/http_sse/routers/agents.py +41 -0
- solace_agent_mesh/gateway/http_sse/routers/artifacts.py +827 -0
- solace_agent_mesh/gateway/http_sse/routers/auth.py +212 -0
- solace_agent_mesh/gateway/http_sse/routers/config.py +55 -0
- solace_agent_mesh/gateway/http_sse/routers/people.py +69 -0
- solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +37 -0
- solace_agent_mesh/gateway/http_sse/routers/sessions.py +80 -0
- solace_agent_mesh/gateway/http_sse/routers/sse.py +138 -0
- solace_agent_mesh/gateway/http_sse/routers/tasks.py +294 -0
- solace_agent_mesh/gateway/http_sse/routers/users.py +59 -0
- solace_agent_mesh/gateway/http_sse/routers/visualization.py +1131 -0
- solace_agent_mesh/gateway/http_sse/services/__init__.py +4 -0
- solace_agent_mesh/gateway/http_sse/services/agent_service.py +69 -0
- solace_agent_mesh/gateway/http_sse/services/people_service.py +158 -0
- solace_agent_mesh/gateway/http_sse/services/services_llm.txt +179 -0
- solace_agent_mesh/gateway/http_sse/services/task_service.py +121 -0
- solace_agent_mesh/gateway/http_sse/session_manager.py +187 -0
- solace_agent_mesh/gateway/http_sse/sse_manager.py +328 -0
- solace_agent_mesh/llm.txt +228 -0
- solace_agent_mesh/llm_detail.txt +2835 -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 +73 -0
- solace_agent_mesh/templates/gateway_component_template.py +431 -0
- solace_agent_mesh/templates/gateway_config_template.yaml +43 -0
- solace_agent_mesh/templates/logging_config_template.ini +64 -0
- solace_agent_mesh/templates/main_orchestrator.yaml +55 -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 +63 -0
- solace_agent_mesh/templates/plugin_pyproject_template.toml +33 -0
- solace_agent_mesh/templates/plugin_readme_template.md +34 -0
- solace_agent_mesh/templates/plugin_tools_template.py +224 -0
- solace_agent_mesh/templates/shared_config.yaml +66 -0
- solace_agent_mesh/templates/templates_llm.txt +147 -0
- solace_agent_mesh/templates/webui.yaml +53 -0
- solace_agent_mesh-1.0.2.dist-info/METADATA +432 -0
- solace_agent_mesh-1.0.2.dist-info/RECORD +361 -0
- solace_agent_mesh-1.0.2.dist-info/entry_points.txt +3 -0
- {solace_agent_mesh-0.2.4.dist-info → solace_agent_mesh-1.0.2.dist-info}/licenses/LICENSE +1 -1
- solace_agent_mesh/agents/base_agent_component.py +0 -256
- solace_agent_mesh/agents/global/actions/agent_state_change.py +0 -54
- solace_agent_mesh/agents/global/actions/clear_history.py +0 -32
- solace_agent_mesh/agents/global/actions/convert_file_to_markdown.py +0 -160
- solace_agent_mesh/agents/global/actions/create_file.py +0 -70
- solace_agent_mesh/agents/global/actions/error_action.py +0 -45
- solace_agent_mesh/agents/global/actions/plantuml_diagram.py +0 -163
- solace_agent_mesh/agents/global/actions/plotly_graph.py +0 -152
- solace_agent_mesh/agents/global/actions/retrieve_file.py +0 -51
- solace_agent_mesh/agents/global/global_agent_component.py +0 -38
- solace_agent_mesh/agents/image_processing/actions/create_image.py +0 -75
- solace_agent_mesh/agents/image_processing/actions/describe_image.py +0 -115
- solace_agent_mesh/agents/image_processing/image_processing_agent_component.py +0 -23
- solace_agent_mesh/agents/slack/__init__.py +0 -1
- solace_agent_mesh/agents/slack/actions/__init__.py +0 -1
- solace_agent_mesh/agents/slack/actions/post_message.py +0 -177
- solace_agent_mesh/agents/slack/slack_agent_component.py +0 -59
- solace_agent_mesh/agents/web_request/actions/do_image_search.py +0 -84
- solace_agent_mesh/agents/web_request/actions/do_news_search.py +0 -47
- solace_agent_mesh/agents/web_request/actions/do_suggestion_search.py +0 -34
- solace_agent_mesh/agents/web_request/actions/do_web_request.py +0 -135
- solace_agent_mesh/agents/web_request/actions/download_file.py +0 -69
- solace_agent_mesh/agents/web_request/web_request_agent_component.py +0 -33
- solace_agent_mesh/assets/web-visualizer/assets/index-D0qORgkg.css +0 -1
- solace_agent_mesh/assets/web-visualizer/assets/index-DnDr1pnu.js +0 -109
- solace_agent_mesh/assets/web-visualizer/index.html +0 -14
- solace_agent_mesh/assets/web-visualizer/vite.svg +0 -1
- solace_agent_mesh/cli/commands/add/__init__.py +0 -3
- solace_agent_mesh/cli/commands/add/add.py +0 -88
- solace_agent_mesh/cli/commands/add/agent.py +0 -110
- solace_agent_mesh/cli/commands/add/copy_from_plugin.py +0 -92
- solace_agent_mesh/cli/commands/add/gateway.py +0 -374
- solace_agent_mesh/cli/commands/build.py +0 -670
- solace_agent_mesh/cli/commands/chat/__init__.py +0 -3
- solace_agent_mesh/cli/commands/chat/chat.py +0 -361
- solace_agent_mesh/cli/commands/config.py +0 -29
- solace_agent_mesh/cli/commands/init/__init__.py +0 -3
- solace_agent_mesh/cli/commands/init/ai_provider_step.py +0 -93
- solace_agent_mesh/cli/commands/init/broker_step.py +0 -99
- solace_agent_mesh/cli/commands/init/builtin_agent_step.py +0 -83
- solace_agent_mesh/cli/commands/init/check_if_already_done.py +0 -13
- solace_agent_mesh/cli/commands/init/create_config_file_step.py +0 -65
- solace_agent_mesh/cli/commands/init/create_other_project_files_step.py +0 -147
- solace_agent_mesh/cli/commands/init/file_service_step.py +0 -73
- solace_agent_mesh/cli/commands/init/init.py +0 -92
- solace_agent_mesh/cli/commands/init/project_structure_step.py +0 -16
- solace_agent_mesh/cli/commands/init/web_init_step.py +0 -32
- solace_agent_mesh/cli/commands/plugin/__init__.py +0 -3
- solace_agent_mesh/cli/commands/plugin/add.py +0 -100
- solace_agent_mesh/cli/commands/plugin/build.py +0 -268
- solace_agent_mesh/cli/commands/plugin/create.py +0 -117
- solace_agent_mesh/cli/commands/plugin/plugin.py +0 -124
- solace_agent_mesh/cli/commands/plugin/remove.py +0 -73
- solace_agent_mesh/cli/commands/run.py +0 -68
- solace_agent_mesh/cli/commands/visualizer.py +0 -138
- solace_agent_mesh/cli/config.py +0 -85
- solace_agent_mesh/common/action.py +0 -91
- solace_agent_mesh/common/action_list.py +0 -37
- solace_agent_mesh/common/action_response.py +0 -340
- solace_agent_mesh/common/mysql_database.py +0 -40
- solace_agent_mesh/common/postgres_database.py +0 -85
- solace_agent_mesh/common/prompt_templates.py +0 -28
- solace_agent_mesh/common/stimulus_utils.py +0 -152
- solace_agent_mesh/common/time.py +0 -24
- solace_agent_mesh/common/utils.py +0 -712
- solace_agent_mesh/config_portal/frontend/static/client/assets/_index-a-zJ6rLx.js +0 -46
- solace_agent_mesh/config_portal/frontend/static/client/assets/components-ZIfdTbrV.js +0 -191
- solace_agent_mesh/config_portal/frontend/static/client/assets/index-BJHAE5s4.js +0 -17
- solace_agent_mesh/config_portal/frontend/static/client/assets/manifest-44c41103.js +0 -1
- solace_agent_mesh/config_portal/frontend/static/client/assets/root-DX4gQ516.css +0 -1
- solace_agent_mesh/configs/agent_global.yaml +0 -74
- solace_agent_mesh/configs/agent_image_processing.yaml +0 -82
- solace_agent_mesh/configs/agent_slack.yaml +0 -64
- solace_agent_mesh/configs/agent_web_request.yaml +0 -75
- solace_agent_mesh/configs/conversation_to_file.yaml +0 -56
- solace_agent_mesh/configs/error_catcher.yaml +0 -56
- solace_agent_mesh/configs/monitor.yaml +0 -0
- solace_agent_mesh/configs/monitor_stim_and_errors_to_slack.yaml +0 -109
- solace_agent_mesh/configs/monitor_user_feedback.yaml +0 -58
- solace_agent_mesh/configs/orchestrator.yaml +0 -241
- solace_agent_mesh/configs/service_embedding.yaml +0 -81
- solace_agent_mesh/configs/service_llm.yaml +0 -265
- solace_agent_mesh/configs/visualize_websocket.yaml +0 -55
- solace_agent_mesh/gateway/components/gateway_base.py +0 -47
- solace_agent_mesh/gateway/components/gateway_input.py +0 -278
- solace_agent_mesh/gateway/components/gateway_output.py +0 -298
- solace_agent_mesh/gateway/identity/bamboohr_identity.py +0 -18
- solace_agent_mesh/gateway/identity/identity_base.py +0 -10
- solace_agent_mesh/gateway/identity/identity_provider.py +0 -60
- solace_agent_mesh/gateway/identity/no_identity.py +0 -9
- solace_agent_mesh/gateway/identity/passthru_identity.py +0 -9
- solace_agent_mesh/monitors/base_monitor_component.py +0 -26
- solace_agent_mesh/monitors/feedback/user_feedback_monitor.py +0 -75
- solace_agent_mesh/monitors/stim_and_errors/stim_and_error_monitor.py +0 -560
- solace_agent_mesh/orchestrator/__init__.py +0 -0
- solace_agent_mesh/orchestrator/action_manager.py +0 -237
- solace_agent_mesh/orchestrator/components/__init__.py +0 -0
- solace_agent_mesh/orchestrator/components/orchestrator_action_manager_timeout_component.py +0 -58
- solace_agent_mesh/orchestrator/components/orchestrator_action_response_component.py +0 -179
- solace_agent_mesh/orchestrator/components/orchestrator_register_component.py +0 -107
- solace_agent_mesh/orchestrator/components/orchestrator_stimulus_processor_component.py +0 -527
- solace_agent_mesh/orchestrator/components/orchestrator_streaming_output_component.py +0 -260
- solace_agent_mesh/orchestrator/orchestrator_main.py +0 -172
- solace_agent_mesh/orchestrator/orchestrator_prompt.py +0 -539
- solace_agent_mesh/services/__init__.py +0 -0
- solace_agent_mesh/services/authorization/providers/base_authorization_provider.py +0 -56
- solace_agent_mesh/services/bamboo_hr_service/__init__.py +0 -3
- solace_agent_mesh/services/bamboo_hr_service/bamboo_hr.py +0 -182
- solace_agent_mesh/services/common/__init__.py +0 -4
- solace_agent_mesh/services/common/auto_expiry.py +0 -45
- solace_agent_mesh/services/common/singleton.py +0 -18
- solace_agent_mesh/services/file_service/__init__.py +0 -14
- solace_agent_mesh/services/file_service/file_manager/__init__.py +0 -0
- solace_agent_mesh/services/file_service/file_manager/bucket_file_manager.py +0 -149
- solace_agent_mesh/services/file_service/file_manager/file_manager_base.py +0 -162
- solace_agent_mesh/services/file_service/file_manager/memory_file_manager.py +0 -64
- solace_agent_mesh/services/file_service/file_manager/volume_file_manager.py +0 -106
- solace_agent_mesh/services/file_service/file_service.py +0 -437
- solace_agent_mesh/services/file_service/file_service_constants.py +0 -54
- solace_agent_mesh/services/file_service/file_transformations.py +0 -141
- solace_agent_mesh/services/file_service/file_utils.py +0 -324
- solace_agent_mesh/services/file_service/transformers/__init__.py +0 -5
- solace_agent_mesh/services/history_service/__init__.py +0 -3
- solace_agent_mesh/services/history_service/history_providers/__init__.py +0 -0
- solace_agent_mesh/services/history_service/history_providers/base_history_provider.py +0 -54
- solace_agent_mesh/services/history_service/history_providers/file_history_provider.py +0 -74
- solace_agent_mesh/services/history_service/history_providers/index.py +0 -40
- solace_agent_mesh/services/history_service/history_providers/memory_history_provider.py +0 -33
- solace_agent_mesh/services/history_service/history_providers/mongodb_history_provider.py +0 -66
- solace_agent_mesh/services/history_service/history_providers/redis_history_provider.py +0 -66
- solace_agent_mesh/services/history_service/history_providers/sql_history_provider.py +0 -93
- solace_agent_mesh/services/history_service/history_service.py +0 -413
- solace_agent_mesh/services/history_service/long_term_memory/__init__.py +0 -0
- solace_agent_mesh/services/history_service/long_term_memory/long_term_memory.py +0 -399
- solace_agent_mesh/services/llm_service/components/llm_request_component.py +0 -340
- solace_agent_mesh/services/llm_service/components/llm_service_component_base.py +0 -152
- solace_agent_mesh/services/middleware_service/__init__.py +0 -0
- solace_agent_mesh/services/middleware_service/middleware_service.py +0 -20
- solace_agent_mesh/templates/action.py +0 -38
- solace_agent_mesh/templates/agent.py +0 -29
- solace_agent_mesh/templates/agent.yaml +0 -70
- solace_agent_mesh/templates/gateway-config-template.yaml +0 -6
- solace_agent_mesh/templates/gateway-default-config.yaml +0 -28
- solace_agent_mesh/templates/gateway-flows.yaml +0 -78
- solace_agent_mesh/templates/gateway-header.yaml +0 -16
- solace_agent_mesh/templates/gateway_base.py +0 -15
- solace_agent_mesh/templates/gateway_input.py +0 -98
- solace_agent_mesh/templates/gateway_output.py +0 -71
- solace_agent_mesh/templates/plugin-gateway-default-config.yaml +0 -29
- solace_agent_mesh/templates/plugin-pyproject.toml +0 -30
- solace_agent_mesh/templates/rest-api-default-config.yaml +0 -31
- solace_agent_mesh/templates/rest-api-flows.yaml +0 -81
- solace_agent_mesh/templates/slack-default-config.yaml +0 -16
- solace_agent_mesh/templates/slack-flows.yaml +0 -81
- solace_agent_mesh/templates/solace-agent-mesh-default.yaml +0 -86
- solace_agent_mesh/templates/solace-agent-mesh-plugin-default.yaml +0 -8
- solace_agent_mesh/templates/web-default-config.yaml +0 -10
- solace_agent_mesh/templates/web-flows.yaml +0 -76
- solace_agent_mesh/tools/__init__.py +0 -0
- solace_agent_mesh/tools/components/__init__.py +0 -0
- solace_agent_mesh/tools/components/conversation_formatter.py +0 -111
- solace_agent_mesh/tools/components/file_resolver_component.py +0 -58
- solace_agent_mesh/tools/config/runtime_config.py +0 -26
- solace_agent_mesh-0.2.4.dist-info/METADATA +0 -176
- solace_agent_mesh-0.2.4.dist-info/RECORD +0 -193
- solace_agent_mesh-0.2.4.dist-info/entry_points.txt +0 -3
- /solace_agent_mesh/{agents → agent}/__init__.py +0 -0
- /solace_agent_mesh/{agents/global → agent/adk}/__init__.py +0 -0
- /solace_agent_mesh/{agents/global/actions → agent/protocol}/__init__.py +0 -0
- /solace_agent_mesh/{agents/image_processing → agent/sac}/__init__.py +0 -0
- /solace_agent_mesh/{agents/image_processing/actions → agent/utils}/__init__.py +0 -0
- /solace_agent_mesh/{agents/web_request → config_portal/backend/plugin_catalog}/__init__.py +0 -0
- /solace_agent_mesh/{agents/web_request/actions → evaluation}/__init__.py +0 -0
- /solace_agent_mesh/gateway/{components → http_sse}/__init__.py +0 -0
- {solace_agent_mesh-0.2.4.dist-info → solace_agent_mesh-1.0.2.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Solace Agent Mesh Agent Configuration
|
|
2
|
+
|
|
3
|
+
log:
|
|
4
|
+
stdout_log_level: INFO
|
|
5
|
+
log_file_level: DEBUG
|
|
6
|
+
log_file: a2a_agent.log
|
|
7
|
+
|
|
8
|
+
!include ../shared_config.yaml
|
|
9
|
+
|
|
10
|
+
apps:
|
|
11
|
+
- name: "__AGENT_NAME____app"
|
|
12
|
+
app_base_path: .
|
|
13
|
+
app_module: solace_agent_mesh.agent.sac.app
|
|
14
|
+
broker:
|
|
15
|
+
<<: *broker_connection
|
|
16
|
+
|
|
17
|
+
app_config:
|
|
18
|
+
namespace: "__NAMESPACE__"
|
|
19
|
+
supports_streaming: __SUPPORTS_STREAMING__
|
|
20
|
+
agent_name: "__AGENT_NAME__"
|
|
21
|
+
display_name: "__AGENT_NAME__ Agent"
|
|
22
|
+
model: __MODEL_ALIAS__
|
|
23
|
+
|
|
24
|
+
instruction: |
|
|
25
|
+
__INSTRUCTION__
|
|
26
|
+
|
|
27
|
+
tools: __TOOLS_CONFIG__
|
|
28
|
+
|
|
29
|
+
session_service: __SESSION_SERVICE__
|
|
30
|
+
artifact_service: __ARTIFACT_SERVICE__
|
|
31
|
+
|
|
32
|
+
artifact_handling_mode: "__ARTIFACT_HANDLING_MODE__"
|
|
33
|
+
enable_embed_resolution: __ENABLE_EMBED_RESOLUTION__
|
|
34
|
+
enable_artifact_content_instruction: __ENABLE_ARTIFACT_CONTENT_INSTRUCTION__
|
|
35
|
+
data_tools_config: *default_data_tools_config
|
|
36
|
+
|
|
37
|
+
# Agent Card Definition
|
|
38
|
+
agent_card:
|
|
39
|
+
description: |
|
|
40
|
+
__AGENT_CARD_DESCRIPTION__
|
|
41
|
+
defaultInputModes: __DEFAULT_INPUT_MODES__
|
|
42
|
+
defaultOutputModes: __DEFAULT_OUTPUT_MODES__
|
|
43
|
+
skills: __AGENT_CARD_SKILLS__
|
|
44
|
+
|
|
45
|
+
# Discovery & Communication
|
|
46
|
+
agent_card_publishing:
|
|
47
|
+
interval_seconds: __AGENT_CARD_PUBLISHING_INTERVAL__
|
|
48
|
+
agent_discovery:
|
|
49
|
+
enabled: __AGENT_DISCOVERY_ENABLED__
|
|
50
|
+
inter_agent_communication:
|
|
51
|
+
allow_list: __INTER_AGENT_COMMUNICATION_ALLOW_LIST__
|
|
52
|
+
deny_list: __INTER_AGENT_COMMUNICATION_DENY_LIST__
|
|
53
|
+
request_timeout_seconds: __INTER_AGENT_COMMUNICATION_TIMEOUT__
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Solace AI Connector Configuration for Evaluation Backend
|
|
2
|
+
|
|
3
|
+
log:
|
|
4
|
+
stdout_log_level: INFO
|
|
5
|
+
log_file_level: DEBUG
|
|
6
|
+
log_file: eval_backend.log
|
|
7
|
+
|
|
8
|
+
# Shared SAM config
|
|
9
|
+
!include ./shared_config.yaml
|
|
10
|
+
|
|
11
|
+
apps:
|
|
12
|
+
- name: a2a_eval_backend_app
|
|
13
|
+
app_base_path: .
|
|
14
|
+
app_module: sam_rest_gateway.app
|
|
15
|
+
|
|
16
|
+
broker:
|
|
17
|
+
<<: *broker_connection
|
|
18
|
+
|
|
19
|
+
app_config:
|
|
20
|
+
namespace: ${NAMESPACE}
|
|
21
|
+
session_secret_key: ${SESSION_SECRET_KEY, please_change_me_in_production}
|
|
22
|
+
|
|
23
|
+
artifact_service:
|
|
24
|
+
type: "filesystem"
|
|
25
|
+
base_path: "/tmp/samv2"
|
|
26
|
+
artifact_scope: namespace
|
|
27
|
+
|
|
28
|
+
enforce_authentication: false
|
|
29
|
+
default_user_identity: "eval-user"
|
|
30
|
+
sync_mode_timeout_seconds: 300
|
|
31
|
+
rest_api_server_host: ${REST_API_HOST, 0.0.0.0}
|
|
32
|
+
rest_api_server_port: ${REST_API_PORT, 8080}
|
|
33
|
+
cors_allowed_origins:
|
|
34
|
+
- "http://localhost:3000"
|
|
35
|
+
- "http://127.0.0.1:3000"
|
|
36
|
+
|
|
37
|
+
enable_embed_resolution: ${ENABLE_EMBED_RESOLUTION, true}
|
|
38
|
+
gateway_artifact_content_limit_bytes: ${GATEWAY_ARTIFACT_LIMIT_BYTES, 10000000}
|
|
39
|
+
|
|
40
|
+
system_purpose: >
|
|
41
|
+
The system is an AI Chatbot with agentic capabilities.
|
|
42
|
+
It will use the agents available to provide information,
|
|
43
|
+
reasoning and general assistance for the users in this system.
|
|
44
|
+
**Always return useful artifacts and files that you create to the user.**
|
|
45
|
+
Provide a status update before each tool call.
|
|
46
|
+
Your external name is Agent Mesh.
|
|
47
|
+
|
|
48
|
+
response_format: >
|
|
49
|
+
Responses should be clear, concise, and professionally toned.
|
|
50
|
+
Format responses to the user in Markdown using appropriate formatting.
|
|
51
|
+
|
|
52
|
+
frontend_welcome_message: ${FRONTEND_WELCOME_MESSAGE, ""}
|
|
53
|
+
frontend_bot_name: ${FRONTEND_BOT_NAME, "Solace Agent Mesh"}
|
|
54
|
+
frontend_collect_feedback: ${FRONTEND_COLLECT_FEEDBACK, false}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Solace Agent Mesh App class for the __GATEWAY_NAME_PASCAL_CASE__ Gateway.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import Any, Dict, List, Type
|
|
6
|
+
|
|
7
|
+
from solace_ai_connector.common.log import log
|
|
8
|
+
from solace_agent_mesh.gateway.base.app import BaseGatewayApp
|
|
9
|
+
from solace_agent_mesh.gateway.base.component import BaseGatewayComponent
|
|
10
|
+
|
|
11
|
+
from .component import __GATEWAY_NAME_PASCAL_CASE__GatewayComponent
|
|
12
|
+
|
|
13
|
+
info = {
|
|
14
|
+
"class_name": "__GATEWAY_NAME_PASCAL_CASE__GatewayApp",
|
|
15
|
+
"description": "Custom App class for the A2A __GATEWAY_NAME_PASCAL_CASE__ Gateway.",
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
class __GATEWAY_NAME_PASCAL_CASE__GatewayApp(BaseGatewayApp):
|
|
19
|
+
"""
|
|
20
|
+
App class for the A2A __GATEWAY_NAME_PASCAL_CASE__ Gateway.
|
|
21
|
+
- Extends BaseGatewayApp for common gateway functionalities.
|
|
22
|
+
- Defines __GATEWAY_NAME_PASCAL_CASE__-specific configuration parameters below.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
# Define __GATEWAY_NAME_PASCAL_CASE__-specific parameters
|
|
26
|
+
# This list will be automatically merged with BaseGatewayApp's schema.
|
|
27
|
+
# These parameters will be configurable in the yaml config file
|
|
28
|
+
# under the 'app_config' section.
|
|
29
|
+
SPECIFIC_APP_SCHEMA_PARAMS: List[Dict[str, Any]] = [
|
|
30
|
+
# --- Example Required Parameter ---
|
|
31
|
+
# {
|
|
32
|
+
# "name": "api_endpoint_url",
|
|
33
|
+
# "required": True,
|
|
34
|
+
# "type": "string",
|
|
35
|
+
# "description": "The API endpoint URL for the __GATEWAY_NAME_SNAKE_CASE__ service.",
|
|
36
|
+
# },
|
|
37
|
+
# --- Example Optional Parameter with Default ---
|
|
38
|
+
# {
|
|
39
|
+
# "name": "connection_timeout_seconds",
|
|
40
|
+
# "required": False,
|
|
41
|
+
# "type": "integer",
|
|
42
|
+
# "default": 30,
|
|
43
|
+
# "description": "Timeout in seconds for connecting to the __GATEWAY_NAME_SNAKE_CASE__ service.",
|
|
44
|
+
# },
|
|
45
|
+
# --- Example List Parameter ---
|
|
46
|
+
# {
|
|
47
|
+
# "name": "processing_rules",
|
|
48
|
+
# "required": False,
|
|
49
|
+
# "type": "list",
|
|
50
|
+
# "default": [],
|
|
51
|
+
# "description": "List of processing rules for the gateway.",
|
|
52
|
+
# "items": { # Schema for each item in the list
|
|
53
|
+
# "type": "object",
|
|
54
|
+
# "properties": {
|
|
55
|
+
# "rule_name": {"type": "string", "required": True},
|
|
56
|
+
# "action_type": {"type": "string", "enum": ["process", "ignore"]},
|
|
57
|
+
# # ... other rule-specific schema fields
|
|
58
|
+
# }
|
|
59
|
+
# }
|
|
60
|
+
# }
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
def __init__(self, app_info: Dict[str, Any], **kwargs):
|
|
64
|
+
log_prefix = app_info.get("name", "__GATEWAY_NAME_PASCAL_CASE__GatewayApp")
|
|
65
|
+
log.debug("[%s] Initializing __GATEWAY_NAME_PASCAL_CASE__GatewayApp...", log_prefix)
|
|
66
|
+
super().__init__(app_info=app_info, **kwargs)
|
|
67
|
+
log.debug("[%s] __GATEWAY_NAME_PASCAL_CASE__GatewayApp initialization complete.", self.name)
|
|
68
|
+
|
|
69
|
+
def _get_gateway_component_class(self) -> Type[BaseGatewayComponent]:
|
|
70
|
+
"""
|
|
71
|
+
Returns the specific gateway component class for this app.
|
|
72
|
+
"""
|
|
73
|
+
return __GATEWAY_NAME_PASCAL_CASE__GatewayComponent
|
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Solace Agent Mesh Component class for the __GATEWAY_NAME_PASCAL_CASE__ Gateway.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import asyncio # If needed for async operations with external system
|
|
6
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
7
|
+
|
|
8
|
+
from solace_ai_connector.common.log import log
|
|
9
|
+
from solace_agent_mesh.gateway.base.component import BaseGatewayComponent
|
|
10
|
+
from solace_agent_mesh.common.types import (
|
|
11
|
+
Part as A2APart,
|
|
12
|
+
TextPart,
|
|
13
|
+
FilePart, # If handling files
|
|
14
|
+
DataPart, # If handling structured data
|
|
15
|
+
Task,
|
|
16
|
+
TaskStatusUpdateEvent,
|
|
17
|
+
TaskArtifactUpdateEvent,
|
|
18
|
+
JSONRPCError,
|
|
19
|
+
FileContent, # Added for FilePart example
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
# from solace_agent_mesh.core_a2a.service import CoreA2AService # If direct interaction needed
|
|
23
|
+
|
|
24
|
+
info = {
|
|
25
|
+
"class_name": "__GATEWAY_NAME_PASCAL_CASE__GatewayComponent",
|
|
26
|
+
"description": (
|
|
27
|
+
"Implements the A2A __GATEWAY_NAME_PASCAL_CASE__ Gateway, inheriting from BaseGatewayComponent. "
|
|
28
|
+
"Handles communication between the __GATEWAY_NAME_SNAKE_CASE__ system and the A2A agent ecosystem."
|
|
29
|
+
),
|
|
30
|
+
"config_parameters": [], # Defined by __GATEWAY_NAME_PASCAL_CASE__GatewayApp
|
|
31
|
+
"input_schema": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"description": "Not typically used directly by GDK; component reacts to external events or A2A control messages.",
|
|
34
|
+
},
|
|
35
|
+
"output_schema": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"description": "Not typically used directly by GDK; component publishes results to external system or A2A.",
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class __GATEWAY_NAME_PASCAL_CASE__GatewayComponent(BaseGatewayComponent):
|
|
43
|
+
"""
|
|
44
|
+
Solace Agent Mesh Component implementing the A2A __GATEWAY_NAME_PASCAL_CASE__ Gateway.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
def __init__(self, **kwargs: Any):
|
|
48
|
+
super().__init__(**kwargs)
|
|
49
|
+
log.info(
|
|
50
|
+
"%s Initializing __GATEWAY_NAME_PASCAL_CASE__ Gateway Component (Post-Base)...",
|
|
51
|
+
self.log_identifier,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
# --- Retrieve Gateway-Specific Configurations ---
|
|
55
|
+
# Example: self.api_endpoint_url = self.get_config("api_endpoint_url")
|
|
56
|
+
# Example: self.connection_timeout = self.get_config("connection_timeout_seconds")
|
|
57
|
+
# Example: self.processing_rules = self.get_config("processing_rules")
|
|
58
|
+
|
|
59
|
+
# --- Initialize External System Client/SDK ---
|
|
60
|
+
# Example: self.external_client = SomeApiClient(api_key=self.service_api_key, endpoint=self.api_endpoint_url)
|
|
61
|
+
# Ensure any client initialization is robust and handles potential errors.
|
|
62
|
+
|
|
63
|
+
log.info(
|
|
64
|
+
"%s __GATEWAY_NAME_PASCAL_CASE__ Gateway Component initialization complete.",
|
|
65
|
+
self.log_identifier,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
def _start_listener(self) -> None:
|
|
69
|
+
"""
|
|
70
|
+
GDK Hook: Start listening for events/requests from the external __GATEWAY_NAME_SNAKE_CASE__ system.
|
|
71
|
+
This method is called by BaseGatewayComponent.run() within self.async_loop.
|
|
72
|
+
- For polling: Start a polling loop (e.g., in a new thread or asyncio task).
|
|
73
|
+
- For webhooks: If embedding a server (like FastAPI in WebhookGateway), start it here.
|
|
74
|
+
- For SDKs with callbacks: Register your callbacks here.
|
|
75
|
+
"""
|
|
76
|
+
log_id_prefix = f"{self.log_identifier}[StartListener]"
|
|
77
|
+
log.info(
|
|
78
|
+
"%s Starting listener for __GATEWAY_NAME_SNAKE_CASE__ system...",
|
|
79
|
+
log_id_prefix,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
# Example for a polling mechanism (adapt as needed):
|
|
83
|
+
# if self.async_loop and self.async_loop.is_running():
|
|
84
|
+
# self.async_loop.create_task(self._poll_external_system())
|
|
85
|
+
# else:
|
|
86
|
+
# log.error("%s Async loop not available or not running. Cannot start polling.", log_id_prefix)
|
|
87
|
+
# self.stop_signal.set() # Signal component to stop if listener cannot start
|
|
88
|
+
|
|
89
|
+
# If your external system uses an SDK that runs its own event loop or requires
|
|
90
|
+
# a blocking call to start, manage that appropriately (e.g., in a separate thread
|
|
91
|
+
# that communicates back to the async_loop via asyncio.run_coroutine_threadsafe).
|
|
92
|
+
|
|
93
|
+
log.info(
|
|
94
|
+
"%s __GATEWAY_NAME_SNAKE_CASE__ listener startup initiated.", log_id_prefix
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
# async def _poll_external_system(self): # Example polling loop
|
|
98
|
+
# log_id_prefix = f"{self.log_identifier}[PollLoop]"
|
|
99
|
+
# log.info("%s Starting __GATEWAY_NAME_SNAKE_CASE__ polling loop...", log_id_prefix)
|
|
100
|
+
# while not self.stop_signal.is_set():
|
|
101
|
+
# try:
|
|
102
|
+
# # new_events = await self.external_client.get_new_events() # Or sync equivalent
|
|
103
|
+
# # for event_data in new_events:
|
|
104
|
+
# # # Process each event: authenticate, translate, submit A2A task
|
|
105
|
+
# # # This often involves calling other GDK methods or internal helpers
|
|
106
|
+
# # authenticated_user = await self._authenticate_external_user(event_data)
|
|
107
|
+
# # if authenticated_user:
|
|
108
|
+
# # target_agent, parts, context = await self._translate_external_input(event_data, authenticated_user)
|
|
109
|
+
# # if target_agent and parts:
|
|
110
|
+
# # await self.submit_a2a_task(target_agent, parts, context, authenticated_user)
|
|
111
|
+
# # await asyncio.sleep(self.get_config("polling_interval_seconds", 60))
|
|
112
|
+
# pass # Placeholder
|
|
113
|
+
# except asyncio.CancelledError:
|
|
114
|
+
# log.info("%s Polling loop cancelled.", log_id_prefix)
|
|
115
|
+
# break
|
|
116
|
+
# except Exception as e:
|
|
117
|
+
# log.exception("%s Error in polling loop: %s", log_id_prefix, e)
|
|
118
|
+
# await asyncio.sleep(60) # Wait before retrying on error
|
|
119
|
+
# log.info("%s __GATEWAY_NAME_SNAKE_CASE__ polling loop stopped.", log_id_prefix)
|
|
120
|
+
|
|
121
|
+
def _stop_listener(self) -> None:
|
|
122
|
+
"""
|
|
123
|
+
GDK Hook: Stop listening for events/requests and clean up resources.
|
|
124
|
+
This method is called by BaseGatewayComponent.cleanup().
|
|
125
|
+
- For polling: Signal the polling loop to stop.
|
|
126
|
+
- For webhooks: Gracefully shut down the embedded server.
|
|
127
|
+
- For SDKs: Unregister callbacks, close connections.
|
|
128
|
+
"""
|
|
129
|
+
log_id_prefix = f"{self.log_identifier}[StopListener]"
|
|
130
|
+
log.info(
|
|
131
|
+
"%s Stopping listener for __GATEWAY_NAME_SNAKE_CASE__ system...",
|
|
132
|
+
log_id_prefix,
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
# self.stop_signal is already set by BaseGatewayComponent before calling this.
|
|
136
|
+
# Ensure your _start_listener logic (e.g., polling loop) respects self.stop_signal.
|
|
137
|
+
|
|
138
|
+
# Example: If you started a thread for a blocking SDK client:
|
|
139
|
+
# if hasattr(self, "sdk_thread") and self.sdk_thread.is_alive():
|
|
140
|
+
# # Signal SDK to shutdown if possible, then join thread
|
|
141
|
+
# # self.external_client.shutdown()
|
|
142
|
+
# self.sdk_thread.join(timeout=10)
|
|
143
|
+
|
|
144
|
+
# Example: If an asyncio task was created for polling:
|
|
145
|
+
# if hasattr(self, "polling_task") and not self.polling_task.done():
|
|
146
|
+
# self.polling_task.cancel()
|
|
147
|
+
# # Optionally await it if _stop_listener can be async, or manage in cleanup
|
|
148
|
+
|
|
149
|
+
log.info(
|
|
150
|
+
"%s __GATEWAY_NAME_SNAKE_CASE__ listener shutdown initiated.", log_id_prefix
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
async def _authenticate_external_user(
|
|
154
|
+
self, external_event_data: Any # Type hint with actual external event data type
|
|
155
|
+
) -> Optional[str]:
|
|
156
|
+
"""
|
|
157
|
+
GDK Hook: Authenticates the user or system from the external event data.
|
|
158
|
+
- Implement logic based on your gateway's authentication mechanism (e.g., API key, token, signature).
|
|
159
|
+
- Use configurations retrieved in __init__ (e.g., self.service_api_key).
|
|
160
|
+
- Return a unique user/system identifier (string) on success, or None on failure.
|
|
161
|
+
This identifier will be used for A2A authorization (scope checking).
|
|
162
|
+
"""
|
|
163
|
+
log_id_prefix = f"{self.log_identifier}[AuthenticateUser]"
|
|
164
|
+
# log.debug("%s Authenticating external event: %s", log_id_prefix, external_event_data)
|
|
165
|
+
|
|
166
|
+
# --- Implement Authentication Logic Here ---
|
|
167
|
+
# Example: Check an API key from headers or payload
|
|
168
|
+
# provided_key = external_event_data.get("headers", {}).get("X-API-Key")
|
|
169
|
+
# if provided_key and provided_key == self.service_api_key:
|
|
170
|
+
# user_identity = external_event_data.get("user_id_field", "default_system_user")
|
|
171
|
+
# log.info("%s Authentication successful for user: %s", log_id_prefix, user_identity)
|
|
172
|
+
# return user_identity
|
|
173
|
+
# else:
|
|
174
|
+
# log.warning("%s Authentication failed: API key mismatch or missing.", log_id_prefix)
|
|
175
|
+
# return None
|
|
176
|
+
|
|
177
|
+
# If no authentication is needed for this gateway:
|
|
178
|
+
# return "anonymous___GATEWAY_NAME_SNAKE_CASE___user"
|
|
179
|
+
|
|
180
|
+
log.warning(
|
|
181
|
+
"%s _authenticate_external_user not fully implemented.", log_id_prefix
|
|
182
|
+
)
|
|
183
|
+
return "placeholder_user_identity" # Replace with actual logic
|
|
184
|
+
|
|
185
|
+
async def _translate_external_input(
|
|
186
|
+
self, external_event_data: Any, authenticated_user_identity: str
|
|
187
|
+
) -> Tuple[Optional[str], List[A2APart], Dict[str, Any]]:
|
|
188
|
+
"""
|
|
189
|
+
GDK Hook: Translates the incoming external event/request into an A2A task.
|
|
190
|
+
- `external_event_data`: The raw data from the external system.
|
|
191
|
+
- `authenticated_user_identity`: The identity returned by _authenticate_external_user.
|
|
192
|
+
|
|
193
|
+
Returns a tuple:
|
|
194
|
+
- `target_agent_name` (str | None): Name of the A2A agent to route the task to. None if translation fails.
|
|
195
|
+
- `a2a_parts` (List[A2APart]): List of A2A Parts (TextPart, FilePart, DataPart) for the task.
|
|
196
|
+
- `external_request_context` (Dict[str, Any]): Dictionary to store any context needed later
|
|
197
|
+
(e.g., for _send_final_response_to_external, like original request ID, reply-to address).
|
|
198
|
+
"""
|
|
199
|
+
log_id_prefix = f"{self.log_identifier}[TranslateInput]"
|
|
200
|
+
# log.debug("%s Translating external event: %s", log_id_prefix, external_event_data)
|
|
201
|
+
|
|
202
|
+
a2a_parts: List[A2APart] = []
|
|
203
|
+
target_agent_name: Optional[str] = (
|
|
204
|
+
None # Determine this based on event data or config
|
|
205
|
+
)
|
|
206
|
+
external_request_context: Dict[str, Any] = {
|
|
207
|
+
"user_id_for_a2a": authenticated_user_identity,
|
|
208
|
+
"app_name_for_artifacts": self.gateway_id, # For artifact service context
|
|
209
|
+
"user_id_for_artifacts": authenticated_user_identity,
|
|
210
|
+
"a2a_session_id": f"__GATEWAY_NAME_SNAKE_CASE__-session-{self.generate_uuid()}", # Example session ID
|
|
211
|
+
# Add any other relevant context from external_event_data needed for response handling
|
|
212
|
+
# "original_request_id": external_event_data.get("id"),
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
# --- Implement Translation Logic Here ---
|
|
216
|
+
# 1. Determine Target Agent:
|
|
217
|
+
# - Statically from config: target_agent_name = self.get_config("default_target_agent")
|
|
218
|
+
# - Dynamically from event_data: target_agent_name = external_event_data.get("target_agent_field")
|
|
219
|
+
# - Based on processing_rules:
|
|
220
|
+
# for rule in self.processing_rules:
|
|
221
|
+
# if rule.matches(external_event_data):
|
|
222
|
+
# target_agent_name = rule.get_agent_name()
|
|
223
|
+
# break
|
|
224
|
+
target_agent_name = "OrchestratorAgent" # Placeholder
|
|
225
|
+
|
|
226
|
+
# 2. Construct A2A Parts:
|
|
227
|
+
# - Extract text:
|
|
228
|
+
# text_content = external_event_data.get("message_text", "")
|
|
229
|
+
# if text_content:
|
|
230
|
+
# a2a_parts.append(TextPart(text=text_content))
|
|
231
|
+
# - Handle files (if any): Download, save to artifact service, create FilePart with URI.
|
|
232
|
+
# (Requires self.shared_artifact_service to be configured and available)
|
|
233
|
+
# # if "file_url" in external_event_data and self.shared_artifact_service:
|
|
234
|
+
# # file_bytes = await download_file(external_event_data["file_url"])
|
|
235
|
+
# # file_name = external_event_data.get("file_name", "attachment.dat")
|
|
236
|
+
# # mime_type = external_event_data.get("mime_type", "application/octet-stream")
|
|
237
|
+
# # artifact_uri = await self.save_to_artifact_service(
|
|
238
|
+
# # file_bytes, file_name, mime_type,
|
|
239
|
+
# # authenticated_user_identity, external_request_context["a2a_session_id"]
|
|
240
|
+
# # )
|
|
241
|
+
# # if artifact_uri:
|
|
242
|
+
# # a2a_parts.append(FilePart(file=FileContent(name=file_name, mimeType=mime_type, uri=artifact_uri)))
|
|
243
|
+
# - Handle structured data:
|
|
244
|
+
# # structured_data = external_event_data.get("data_payload")
|
|
245
|
+
# # if structured_data:
|
|
246
|
+
# # a2a_parts.append(DataPart(data=structured_data, metadata={"source": "__GATEWAY_NAME_SNAKE_CASE__"}))
|
|
247
|
+
|
|
248
|
+
# Example: Simple text passthrough
|
|
249
|
+
raw_text = str(
|
|
250
|
+
external_event_data.get(
|
|
251
|
+
"text_input_field", "Default text from __GATEWAY_NAME_SNAKE_CASE__"
|
|
252
|
+
)
|
|
253
|
+
)
|
|
254
|
+
a2a_parts.append(TextPart(text=raw_text))
|
|
255
|
+
|
|
256
|
+
if not target_agent_name:
|
|
257
|
+
log.error("%s Could not determine target_agent_name.", log_id_prefix)
|
|
258
|
+
return None, [], {} # Indicate translation failure
|
|
259
|
+
|
|
260
|
+
if not a2a_parts:
|
|
261
|
+
log.warning(
|
|
262
|
+
"%s No A2A parts created from external event. Task might be empty.",
|
|
263
|
+
log_id_prefix,
|
|
264
|
+
)
|
|
265
|
+
# Depending on requirements, you might want to return None, [], {} here too.
|
|
266
|
+
|
|
267
|
+
log.info(
|
|
268
|
+
"%s Translation complete. Target: %s, Parts: %d",
|
|
269
|
+
log_id_prefix,
|
|
270
|
+
target_agent_name,
|
|
271
|
+
len(a2a_parts),
|
|
272
|
+
)
|
|
273
|
+
return target_agent_name, a2a_parts, external_request_context
|
|
274
|
+
|
|
275
|
+
async def _send_final_response_to_external(
|
|
276
|
+
self, external_request_context: Dict[str, Any], task_data: Task
|
|
277
|
+
) -> None:
|
|
278
|
+
"""
|
|
279
|
+
GDK Hook: Sends the final A2A Task result back to the external __GATEWAY_NAME_SNAKE_CASE__ system.
|
|
280
|
+
- `external_request_context`: The context dictionary returned by _translate_external_input.
|
|
281
|
+
- `task_data`: The final A2A Task object (contains status, results, etc.).
|
|
282
|
+
"""
|
|
283
|
+
log_id_prefix = f"{self.log_identifier}[SendFinalResponse]"
|
|
284
|
+
# log.debug("%s Sending final response for task %s. Context: %s", log_id_prefix, task_data.id, external_request_context)
|
|
285
|
+
|
|
286
|
+
# --- Implement Logic to Send Response to External System ---
|
|
287
|
+
# 1. Extract relevant information from task_data:
|
|
288
|
+
# - task_data.status.state (e.g., TaskState.COMPLETED, TaskState.FAILED)
|
|
289
|
+
# - task_data.status.message.parts (usually TextPart for final agent response)
|
|
290
|
+
# - task_data.artifacts (if agent produced artifacts)
|
|
291
|
+
|
|
292
|
+
# 2. Format the response according to the external system's requirements.
|
|
293
|
+
# response_text = "Task completed."
|
|
294
|
+
# if task_data.status and task_data.status.message and task_data.status.message.parts:
|
|
295
|
+
# for part in task_data.status.message.parts:
|
|
296
|
+
# if isinstance(part, TextPart):
|
|
297
|
+
# response_text = part.text
|
|
298
|
+
# break
|
|
299
|
+
# if task_data.status and task_data.status.state == TaskState.FAILED:
|
|
300
|
+
# response_text = f"Task failed: {response_text}"
|
|
301
|
+
|
|
302
|
+
# 3. Use information from external_request_context to send the response
|
|
303
|
+
# (e.g., reply-to address, original request ID).
|
|
304
|
+
# # original_request_id = external_request_context.get("original_request_id")
|
|
305
|
+
# # await self.external_client.send_reply(original_request_id, response_text)
|
|
306
|
+
|
|
307
|
+
log.warning(
|
|
308
|
+
"%s _send_final_response_to_external not fully implemented for task %s.",
|
|
309
|
+
log_id_prefix,
|
|
310
|
+
task_data.id,
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
async def _send_error_to_external(
|
|
314
|
+
self, external_request_context: Dict[str, Any], error_data: JSONRPCError
|
|
315
|
+
) -> None:
|
|
316
|
+
"""
|
|
317
|
+
GDK Hook: Sends an A2A error back to the external __GATEWAY_NAME_SNAKE_CASE__ system.
|
|
318
|
+
This is called if an error occurs within the A2A GDK processing (e.g., task submission failure,
|
|
319
|
+
authorization failure after initial authentication).
|
|
320
|
+
- `external_request_context`: Context from _translate_external_input.
|
|
321
|
+
- `error_data`: A JSONRPCError object.
|
|
322
|
+
"""
|
|
323
|
+
log_id_prefix = f"{self.log_identifier}[SendError]"
|
|
324
|
+
# log.warning("%s Sending error to external system. Error: %s. Context: %s", log_id_prefix, error_data.message, external_request_context)
|
|
325
|
+
|
|
326
|
+
# --- Implement Logic to Send Error to External System ---
|
|
327
|
+
# error_message_to_send = f"A2A Error: {error_data.message} (Code: {error_data.code})"
|
|
328
|
+
# # original_request_id = external_request_context.get("original_request_id")
|
|
329
|
+
# # await self.external_client.send_error_reply(original_request_id, error_message_to_send)
|
|
330
|
+
|
|
331
|
+
log.warning(
|
|
332
|
+
"%s _send_error_to_external not fully implemented. Error: %s",
|
|
333
|
+
log_id_prefix,
|
|
334
|
+
error_data.message,
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
async def _send_update_to_external(
|
|
338
|
+
self,
|
|
339
|
+
external_request_context: Dict[str, Any],
|
|
340
|
+
event_data: Union[TaskStatusUpdateEvent, TaskArtifactUpdateEvent],
|
|
341
|
+
is_final_chunk_of_update: bool,
|
|
342
|
+
) -> None:
|
|
343
|
+
"""
|
|
344
|
+
GDK Hook: Sends intermediate A2A task updates (status or artifacts) to the external system.
|
|
345
|
+
- This is optional. If your gateway doesn't support streaming intermediate updates,
|
|
346
|
+
- you can leave this method as a no-op (just log).
|
|
347
|
+
- `is_final_chunk_of_update`: True if this is the last part of a streamed TextPart from TaskStatusUpdateEvent.
|
|
348
|
+
"""
|
|
349
|
+
log_id_prefix = f"{self.log_identifier}[SendUpdate]"
|
|
350
|
+
# task_id = event_data.id
|
|
351
|
+
# log.debug("%s Received A2A update for task %s. Type: %s. FinalChunk: %s",
|
|
352
|
+
# log_id_prefix, task_id, type(event_data).__name__, is_final_chunk_of_update)
|
|
353
|
+
|
|
354
|
+
# --- Implement Logic to Send Intermediate Update (if supported) ---
|
|
355
|
+
# if isinstance(event_data, TaskStatusUpdateEvent):
|
|
356
|
+
# if event_data.status and event_data.status.message and event_data.status.message.parts:
|
|
357
|
+
# for part in event_data.status.message.parts:
|
|
358
|
+
# if isinstance(part, TextPart):
|
|
359
|
+
# # Send part.text to external system
|
|
360
|
+
# pass
|
|
361
|
+
# elif isinstance(part, DataPart) and part.data.get("a2a_signal_type") == "agent_status_message":
|
|
362
|
+
# # Send agent status signal text part.data.get("text")
|
|
363
|
+
# pass
|
|
364
|
+
# elif isinstance(event_data, TaskArtifactUpdateEvent):
|
|
365
|
+
# # Handle artifact updates (e.g., notify external system of new artifact URI)
|
|
366
|
+
# pass
|
|
367
|
+
|
|
368
|
+
# Default: Log that this gateway does not handle intermediate updates.
|
|
369
|
+
# log.debug("%s __GATEWAY_NAME_PASCAL_CASE__ Gateway does not process intermediate updates. Update for task %s ignored.",
|
|
370
|
+
# log_id_prefix, task_id)
|
|
371
|
+
pass # No-op by default
|
|
372
|
+
|
|
373
|
+
# --- Optional: Helper methods for your gateway ---
|
|
374
|
+
def generate_uuid(self) -> str: # Made this a method of the class
|
|
375
|
+
import uuid
|
|
376
|
+
|
|
377
|
+
return str(uuid.uuid4())
|
|
378
|
+
|
|
379
|
+
# async def save_to_artifact_service(self, content_bytes: bytes, filename: str, mime_type: str, user_id: str, session_id: str) -> Optional[str]:
|
|
380
|
+
# """Helper to save content to the shared artifact service."""
|
|
381
|
+
# if not self.shared_artifact_service:
|
|
382
|
+
# log.error("%s Artifact service not available. Cannot save file: %s", self.log_identifier, filename)
|
|
383
|
+
# return None
|
|
384
|
+
# try:
|
|
385
|
+
# from src.solace_agent_mesh.agent.utils.artifact_helpers import save_artifact_with_metadata # Adjust import
|
|
386
|
+
# from datetime import datetime, timezone
|
|
387
|
+
|
|
388
|
+
# save_result = await save_artifact_with_metadata(
|
|
389
|
+
# artifact_service=self.shared_artifact_service,
|
|
390
|
+
# app_name=self.gateway_id, # from BaseGatewayComponent
|
|
391
|
+
# user_id=user_id,
|
|
392
|
+
# session_id=session_id,
|
|
393
|
+
# filename=filename,
|
|
394
|
+
# content_bytes=content_bytes,
|
|
395
|
+
# mime_type=mime_type,
|
|
396
|
+
# metadata_dict={
|
|
397
|
+
# "source": "__GATEWAY_NAME_SNAKE_CASE___upload",
|
|
398
|
+
# "original_filename": filename,
|
|
399
|
+
# "upload_timestamp_utc": datetime.now(timezone.utc).isoformat(),
|
|
400
|
+
# },
|
|
401
|
+
# timestamp=datetime.now(timezone.utc)
|
|
402
|
+
# )
|
|
403
|
+
# if save_result["status"] in ["success", "partial_success"]:
|
|
404
|
+
# data_version = save_result.get("data_version", 0)
|
|
405
|
+
# artifact_uri = f"artifact://{self.gateway_id}/{user_id}/{session_id}/{filename}?version={data_version}"
|
|
406
|
+
# log.info("%s Saved artifact: %s", self.log_identifier, artifact_uri)
|
|
407
|
+
# return artifact_uri
|
|
408
|
+
# else:
|
|
409
|
+
# log.error("%s Failed to save artifact %s: %s", self.log_identifier, filename, save_result.get("message"))
|
|
410
|
+
# return None
|
|
411
|
+
# except Exception as e:
|
|
412
|
+
# log.exception("%s Error saving artifact %s: %s", self.log_identifier, filename, e)
|
|
413
|
+
# return None
|
|
414
|
+
|
|
415
|
+
def cleanup(self):
|
|
416
|
+
"""
|
|
417
|
+
GDK Hook: Called before the component is fully stopped.
|
|
418
|
+
Perform any final cleanup specific to this component beyond _stop_listener.
|
|
419
|
+
"""
|
|
420
|
+
log.info(
|
|
421
|
+
"%s Cleaning up __GATEWAY_NAME_PASCAL_CASE__ Gateway Component (Pre-Base)...",
|
|
422
|
+
self.log_identifier,
|
|
423
|
+
)
|
|
424
|
+
# Example: Close any persistent connections not handled in _stop_listener
|
|
425
|
+
# if hasattr(self, "persistent_connection") and self.persistent_connection.is_open():
|
|
426
|
+
# self.persistent_connection.close()
|
|
427
|
+
super().cleanup() # Important to call super().cleanup()
|
|
428
|
+
log.info(
|
|
429
|
+
"%s __GATEWAY_NAME_PASCAL_CASE__ Gateway Component cleanup finished.",
|
|
430
|
+
self.log_identifier,
|
|
431
|
+
)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Solace Agent Mesh: __GATEWAY_NAME_SNAKE_CASE__ Gateway Configuration
|
|
2
|
+
|
|
3
|
+
log:
|
|
4
|
+
stdout_log_level: INFO
|
|
5
|
+
log_file_level: DEBUG
|
|
6
|
+
log_file: "__GATEWAY_NAME_SNAKE_CASE___gateway.log"
|
|
7
|
+
|
|
8
|
+
!include ../shared_config.yaml
|
|
9
|
+
|
|
10
|
+
apps:
|
|
11
|
+
- name: __GATEWAY_NAME_SNAKE_CASE___gateway_app
|
|
12
|
+
app_base_path: .
|
|
13
|
+
app_module: src.__GATEWAY_NAME_SNAKE_CASE__.app
|
|
14
|
+
|
|
15
|
+
broker:
|
|
16
|
+
<<: *broker_connection
|
|
17
|
+
|
|
18
|
+
app_config:
|
|
19
|
+
namespace: __APP_CONFIG_NAMESPACE__
|
|
20
|
+
gateway_id: __GATEWAY_ID__
|
|
21
|
+
|
|
22
|
+
artifact_service: __ARTIFACT_SERVICE__
|
|
23
|
+
|
|
24
|
+
authorization_service:
|
|
25
|
+
type: "none" # Or "default_rbac"
|
|
26
|
+
# role_definitions_path: "config/auth/roles.yaml"
|
|
27
|
+
# user_assignments_path: "config/auth/users.yaml"
|
|
28
|
+
|
|
29
|
+
system_purpose: >
|
|
30
|
+
__SYSTEM_PURPOSE__
|
|
31
|
+
|
|
32
|
+
response_format: >
|
|
33
|
+
__RESPONSE_FORMAT__
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# enable_embed_resolution: true # Default is true
|
|
37
|
+
# gateway_artifact_content_limit_bytes: 10485760 # 10MB
|
|
38
|
+
# gateway_recursive_embed_depth: 3
|
|
39
|
+
|
|
40
|
+
# --- __GATEWAY_NAME_PASCAL_CASE__ Specific Parameters (Define schema in src/__GATEWAY_NAME_SNAKE_CASE__/app.py) ---
|
|
41
|
+
# example_parameter: "default_value"
|
|
42
|
+
# api_key: "${__GATEWAY_NAME_UPPER_CASE__}_API_KEY"
|
|
43
|
+
# endpoint_url: "https://api.example.com/__GATEWAY_NAME_SNAKE_CASE__"
|