solace-agent-mesh 1.4.12__py3-none-any.whl → 1.5.1__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/agent/adk/adk_llm.txt +3 -4
- solace_agent_mesh/agent/adk/adk_llm_detail.txt +566 -0
- solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +1 -1
- solace_agent_mesh/agent/adk/callbacks.py +56 -5
- solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +3 -1
- solace_agent_mesh/agent/adk/intelligent_mcp_callbacks.py +2 -1
- solace_agent_mesh/agent/adk/mcp_content_processor.py +2 -1
- solace_agent_mesh/agent/adk/models/lite_llm.py +1 -0
- solace_agent_mesh/agent/adk/models/models_llm.txt +1 -2
- solace_agent_mesh/agent/adk/runner.py +3 -1
- solace_agent_mesh/agent/adk/services.py +4 -1
- solace_agent_mesh/agent/adk/setup.py +3 -1
- solace_agent_mesh/agent/adk/tool_wrapper.py +2 -2
- solace_agent_mesh/agent/agent_llm.txt +1 -1
- solace_agent_mesh/agent/agent_llm_detail.txt +1702 -0
- solace_agent_mesh/agent/protocol/event_handlers.py +4 -14
- solace_agent_mesh/agent/protocol/protocol_llm.txt +15 -2
- solace_agent_mesh/agent/protocol/protocol_llm_detail.txt +92 -0
- solace_agent_mesh/agent/sac/app.py +3 -1
- solace_agent_mesh/agent/sac/component.py +55 -22
- solace_agent_mesh/agent/sac/sac_llm.txt +15 -1
- solace_agent_mesh/agent/sac/sac_llm_detail.txt +200 -0
- solace_agent_mesh/agent/sac/task_execution_context.py +73 -0
- solace_agent_mesh/agent/testing/testing_llm_detail.txt +68 -0
- solace_agent_mesh/agent/tools/audio_tools.py +2 -1
- solace_agent_mesh/agent/tools/builtin_artifact_tools.py +3 -1
- solace_agent_mesh/agent/tools/builtin_data_analysis_tools.py +3 -1
- solace_agent_mesh/agent/tools/dynamic_tool.py +2 -1
- solace_agent_mesh/agent/tools/general_agent_tools.py +2 -1
- solace_agent_mesh/agent/tools/image_tools.py +2 -1
- solace_agent_mesh/agent/tools/peer_agent_tool.py +2 -1
- solace_agent_mesh/agent/tools/registry.py +3 -1
- solace_agent_mesh/agent/tools/test_tools.py +2 -1
- solace_agent_mesh/agent/tools/tools_llm.txt +148 -154
- solace_agent_mesh/agent/tools/tools_llm_detail.txt +274 -0
- solace_agent_mesh/agent/tools/web_tools.py +2 -1
- solace_agent_mesh/agent/utils/artifact_helpers.py +3 -1
- solace_agent_mesh/agent/utils/config_parser.py +3 -1
- solace_agent_mesh/agent/utils/utils_llm.txt +1 -1
- solace_agent_mesh/agent/utils/utils_llm_detail.txt +149 -0
- solace_agent_mesh/assets/docs/404.html +3 -3
- solace_agent_mesh/assets/docs/assets/js/{b7006a3a.73a79653.js → 032c2d61.f3d37824.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/0bcf40b7.c019ad46.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/15ba94aa.932dd2db.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2131ec11.5c7a1f6e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{2334.622a6395.js → 2334.1cf50a20.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/240a0364.7eac6021.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2e32b5e0.33f5d75b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/341393d4.0fac2613.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{3624.b524e433.js → 3624.0eaa1fd0.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/3a6c6137.f5940cfa.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3ac1795d.76654dd9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3ff0015d.2be20244.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/509e993c.4c7a1a6d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/547e15cc.2cbb060a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/55b7b518.f2b1d1ba.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/5c2bd65f.e49689dd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6063ff4c.ef84f702.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/631738c7.a8b1ef8b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6a520c9d.ba015d81.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6ad8f0bd.39d5851d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6d84eae0.4a5fbf39.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6fdfefc7.99de744e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/71da7b71.804d6567.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/722f809d.965da774.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/742f027b.46c07808.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/77cf947d.64c9bd6c.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8024126c.56e59919.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/81a99df0.07034dd9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/82fbfb93.139a1a1f.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{8591.d7c16be6.js → 8591.5d015485.js} +2 -2
- solace_agent_mesh/assets/docs/assets/js/{8731.49e930c2.js → 8731.6c1dbf0c.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/945fb41e.6f4cdffd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/94e8668d.b5ddb7a1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9bb13469.dd1c9b54.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9e9d0a82.dd810042.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ab9708a8.3e6dd091.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ad71b5ed.60668e9e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/c198a0dc.8f31f867.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/c93cbaa0.eaff365e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/da0b5bad.9d369087.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/db924877.cbc66f02.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/dd817ffc.0aa9630a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/dd81e2b8.d590bc9e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/de5f4c65.e8241890.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/de915948.139b4b9c.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e3d9abda.2b916f9e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e6f9706b.582a78ca.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e92d0134.cf6d6522.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/f284c35a.5766a13d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ff4d71f2.9c0297a6.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/main.bd3c34f3.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/runtime~main.18dc45dd.js +1 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/agents/index.html +143 -0
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/artifact-management/index.html +7 -7
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/audio-tools/index.html +7 -7
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/data-analysis-tools/index.html +8 -8
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/embeds/index.html +6 -6
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/index.html +11 -11
- solace_agent_mesh/assets/docs/docs/documentation/{concepts → components}/cli/index.html +25 -25
- solace_agent_mesh/assets/docs/docs/documentation/components/gateways/index.html +91 -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/deploying/debugging/index.html +104 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/deployment-options/index.html +57 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/index.html +25 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/observability/index.html +59 -0
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/create-agents/index.html +113 -152
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/create-gateways/index.html +9 -9
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/creating-python-tools/index.html +12 -12
- solace_agent_mesh/assets/docs/docs/documentation/developing/creating-service-providers/index.html +54 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/index.html +32 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/structure/index.html +55 -0
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/bedrock-agents/index.html +25 -25
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/custom-agent/index.html +13 -13
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/event-mesh-gateway/index.html +11 -11
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/mcp-integration/index.html +10 -10
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/mongodb-integration/index.html +13 -13
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/rag-integration/index.html +13 -13
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/rest-gateway/index.html +10 -10
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/slack-integration/index.html +72 -0
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/sql-database/index.html +14 -14
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/index.html +33 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/installation/index.html +83 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/rbac-setup-guide/index.html +222 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/single-sign-on/index.html +161 -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 +53 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +35 -100
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/try-agent-mesh/index.html +41 -0
- solace_agent_mesh/assets/docs/docs/documentation/{getting-started → installing-and-configuring}/configurations/index.html +56 -50
- 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 +76 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/large_language_models/index.html +63 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/run-project/index.html +142 -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 To 0.3.0/a2a-technical-migration-map/index.html → migrations/a2a-upgrade/a2a-technical-migration-map/index.html} +10 -11
- solace_agent_mesh/assets/docs/img/solace-logo.png +0 -0
- solace_agent_mesh/assets/docs/lunr-index-1760121512891.json +1 -0
- solace_agent_mesh/assets/docs/lunr-index.json +1 -1
- solace_agent_mesh/assets/docs/search-doc-1760121512891.json +1 -0
- solace_agent_mesh/assets/docs/search-doc.json +1 -1
- solace_agent_mesh/assets/docs/sitemap.xml +1 -1
- solace_agent_mesh/cli/__init__.py +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/{authCallback-j1LW-wlq.js → authCallback-DwrxZE0E.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/{client-B9p_nFNA.js → client-DarGQzyw.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-2nd1gbaH.js +339 -0
- solace_agent_mesh/client/webui/frontend/static/assets/main-DoKXctCM.css +1 -0
- solace_agent_mesh/client/webui/frontend/static/assets/{vendor-CS5YMf8a.js → vendor-BKIeiHj_.js} +80 -70
- solace_agent_mesh/client/webui/frontend/static/auth-callback.html +3 -3
- solace_agent_mesh/client/webui/frontend/static/index.html +4 -4
- solace_agent_mesh/common/a2a/a2a_llm.txt +1 -1
- solace_agent_mesh/common/a2a/a2a_llm_detail.txt +193 -0
- solace_agent_mesh/common/a2a/artifact.py +2 -1
- solace_agent_mesh/common/a2a/protocol.py +3 -2
- solace_agent_mesh/common/a2a/translation.py +3 -1
- solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +1 -1
- solace_agent_mesh/common/a2a_spec/a2a_spec_llm_detail.txt +736 -0
- solace_agent_mesh/common/a2a_spec/schemas/llm_invocation.json +23 -0
- solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +93 -15
- solace_agent_mesh/common/a2a_spec/schemas/tool_result.json +23 -0
- solace_agent_mesh/common/common_llm.txt +24 -39
- solace_agent_mesh/common/common_llm_detail.txt +2562 -0
- solace_agent_mesh/common/data_parts.py +9 -1
- solace_agent_mesh/common/middleware/config_resolver.py +3 -1
- solace_agent_mesh/common/middleware/middleware_llm_detail.txt +185 -0
- solace_agent_mesh/common/middleware/registry.py +3 -1
- solace_agent_mesh/common/sac/sac_llm.txt +1 -1
- solace_agent_mesh/common/sac/sac_llm_detail.txt +82 -0
- solace_agent_mesh/common/sac/sam_component_base.py +2 -1
- solace_agent_mesh/common/sam_events/event_service.py +3 -2
- 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/employee_service.py +3 -1
- solace_agent_mesh/common/services/identity_service.py +2 -1
- solace_agent_mesh/common/services/providers/local_file_identity_service.py +2 -1
- solace_agent_mesh/common/services/services_llm.txt +57 -6
- solace_agent_mesh/common/services/services_llm_detail.txt +459 -0
- solace_agent_mesh/common/utils/artifact_utils.py +3 -1
- solace_agent_mesh/common/utils/asyncio_macos_fix.py +3 -1
- solace_agent_mesh/common/utils/embeds/converter.py +3 -1
- solace_agent_mesh/common/utils/embeds/embeds_llm.txt +1 -1
- solace_agent_mesh/common/utils/embeds/evaluators.py +2 -1
- solace_agent_mesh/common/utils/embeds/modifiers.py +3 -2
- solace_agent_mesh/common/utils/embeds/resolver.py +2 -1
- solace_agent_mesh/common/utils/initializer.py +3 -1
- solace_agent_mesh/common/utils/message_utils.py +2 -1
- solace_agent_mesh/common/utils/push_notification_auth.py +3 -2
- solace_agent_mesh/common/utils/utils_llm.txt +75 -87
- solace_agent_mesh/common/utils/utils_llm_detail.txt +572 -0
- solace_agent_mesh/core_a2a/core_a2a_llm_detail.txt +101 -0
- solace_agent_mesh/core_a2a/service.py +2 -2
- solace_agent_mesh/gateway/base/app.py +3 -2
- solace_agent_mesh/gateway/base/base_llm.txt +1 -1
- solace_agent_mesh/gateway/base/base_llm_detail.txt +235 -0
- solace_agent_mesh/gateway/base/component.py +3 -1
- solace_agent_mesh/gateway/base/task_context.py +2 -1
- solace_agent_mesh/gateway/gateway_llm.txt +242 -235
- solace_agent_mesh/gateway/gateway_llm_detail.txt +3885 -0
- solace_agent_mesh/gateway/http_sse/alembic/alembic_llm.txt +295 -0
- solace_agent_mesh/gateway/http_sse/alembic/env.py +10 -1
- 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/versions_llm.txt +155 -0
- solace_agent_mesh/gateway/http_sse/alembic.ini +1 -1
- solace_agent_mesh/gateway/http_sse/app.py +150 -3
- solace_agent_mesh/gateway/http_sse/component.py +372 -61
- solace_agent_mesh/gateway/http_sse/components/components_llm.txt +46 -6
- solace_agent_mesh/gateway/http_sse/components/task_logger_forwarder.py +109 -0
- solace_agent_mesh/gateway/http_sse/components/visualization_forwarder_component.py +4 -2
- solace_agent_mesh/gateway/http_sse/dependencies.py +119 -27
- solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +172 -172
- solace_agent_mesh/gateway/http_sse/http_sse_llm_detail.txt +3278 -0
- solace_agent_mesh/gateway/http_sse/main.py +149 -42
- solace_agent_mesh/gateway/http_sse/repository/__init__.py +3 -12
- solace_agent_mesh/gateway/http_sse/repository/chat_task_repository.py +103 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/__init__.py +5 -3
- solace_agent_mesh/gateway/http_sse/repository/entities/chat_task.py +75 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/entities_llm.txt +263 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/feedback.py +20 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/session_history.py +0 -16
- solace_agent_mesh/gateway/http_sse/repository/entities/task.py +25 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/task_event.py +21 -0
- solace_agent_mesh/gateway/http_sse/repository/feedback_repository.py +81 -0
- solace_agent_mesh/gateway/http_sse/repository/interfaces.py +73 -18
- solace_agent_mesh/gateway/http_sse/repository/models/__init__.py +9 -5
- 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 +266 -0
- solace_agent_mesh/gateway/http_sse/repository/models/session_model.py +3 -3
- 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 +32 -0
- solace_agent_mesh/gateway/http_sse/repository/repository_llm.txt +340 -0
- solace_agent_mesh/gateway/http_sse/repository/session_repository.py +4 -53
- solace_agent_mesh/gateway/http_sse/repository/task_repository.py +173 -0
- solace_agent_mesh/gateway/http_sse/routers/agent_cards.py +3 -2
- solace_agent_mesh/gateway/http_sse/routers/artifacts.py +3 -3
- solace_agent_mesh/gateway/http_sse/routers/auth.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/config.py +29 -6
- solace_agent_mesh/gateway/http_sse/routers/dto/dto_llm.txt +346 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/__init__.py +3 -3
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/requests_llm.txt +83 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/session_requests.py +2 -10
- 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 +5 -3
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/responses_llm.txt +107 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/session_responses.py +1 -15
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/task_responses.py +30 -0
- solace_agent_mesh/gateway/http_sse/routers/feedback.py +37 -0
- solace_agent_mesh/gateway/http_sse/routers/people.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +255 -204
- solace_agent_mesh/gateway/http_sse/routers/sessions.py +223 -41
- solace_agent_mesh/gateway/http_sse/routers/sse.py +3 -2
- solace_agent_mesh/gateway/http_sse/routers/tasks.py +170 -43
- solace_agent_mesh/gateway/http_sse/routers/users.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/visualization.py +2 -1
- solace_agent_mesh/gateway/http_sse/services/agent_card_service.py +3 -1
- solace_agent_mesh/gateway/http_sse/services/data_retention_service.py +273 -0
- solace_agent_mesh/gateway/http_sse/services/feedback_service.py +242 -0
- solace_agent_mesh/gateway/http_sse/services/people_service.py +2 -82
- solace_agent_mesh/gateway/http_sse/services/services_llm.txt +177 -13
- solace_agent_mesh/gateway/http_sse/services/session_service.py +154 -85
- solace_agent_mesh/gateway/http_sse/services/task_logger_service.py +318 -0
- solace_agent_mesh/gateway/http_sse/services/task_service.py +3 -2
- solace_agent_mesh/gateway/http_sse/session_manager.py +2 -1
- solace_agent_mesh/gateway/http_sse/shared/exception_handlers.py +25 -14
- solace_agent_mesh/gateway/http_sse/shared/shared_llm.txt +285 -0
- solace_agent_mesh/gateway/http_sse/shared/types.py +7 -0
- solace_agent_mesh/gateway/http_sse/sse_event_buffer.py +2 -1
- solace_agent_mesh/gateway/http_sse/sse_manager.py +2 -2
- solace_agent_mesh/gateway/http_sse/utils/__init__.py +1 -0
- solace_agent_mesh/gateway/http_sse/utils/stim_utils.py +32 -0
- solace_agent_mesh/gateway/http_sse/utils/utils_llm.txt +47 -0
- solace_agent_mesh/solace_agent_mesh_llm.txt +1 -1
- solace_agent_mesh/solace_agent_mesh_llm_detail.txt +8599 -0
- solace_agent_mesh/templates/gateway_app_template.py +4 -2
- solace_agent_mesh/templates/gateway_component_template.py +3 -1
- solace_agent_mesh/templates/logging_config_template.ini +22 -45
- solace_agent_mesh/templates/plugin_tools_template.py +2 -2
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/METADATA +2 -2
- solace_agent_mesh-1.5.1.dist-info/RECORD +504 -0
- solace_agent_mesh/agent/adk/invocation_monitor.py +0 -295
- 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.a248f00c.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/0e682baa.d54b8668.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/1023fc19.8a8a9309.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/1523c6b4.2645ef68.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/166ab619.e27886d9.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/1c6e87d2.e056b7e0.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/21ceee5f.3bf39250.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/2a9cab12.2afaee76.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/332e10b5.f7629851.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/3d406171.5560fdf9.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/42b3f8d8.508ae8db.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/442a8107.b5c2532a.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/453a82a6.3c6bb61d.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/483cef9a.4736f2d8.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/4c2787c2.c1290a40.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/55f47984.bcd00a86.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/5b4258a4.fdfd2325.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/664b740a.ba305a89.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/75384d09.c19e8b51.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/768e31b0.9abcdc48.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/85387663.be2bc838.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/945fb41e.16e00776.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/9a09e75d.92de8cf5.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/9eff14a2.d62aad71.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/a12a4955.25fbed32.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/a3a92b25.af35e313.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/aba87c2f.4ddf32f2.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/ae0e903d.5fe5203f.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/ae4415af.16cc58d3.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/bac0be12.17de4316.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/c2c06897.87cb1f47.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/c835a94d.ce21f0bf.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/cc969b05.feef7dcc.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/cd3d4052.a19e7d78.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/ced92a13.fb92e7ca.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/cee5d587.47904f5e.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/d6a81ee7.829198f1.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/f284c35a.ed8dd236.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/f897a61a.126663fe.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/fbfa3e75.e144b16c.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/main.f67fc9f4.js +0 -2
- solace_agent_mesh/assets/docs/assets/js/runtime~main.40527046.js +0 -1
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/installation/index.html +0 -46
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/rbac-setup-guilde/index.html +0 -201
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/single-sign-on/index.html +0 -25
- solace_agent_mesh/assets/docs/docs/documentation/Migrations/A2A Upgrade To 0.3.0/a2a-gateway-upgrade-to-0.3.0/index.html +0 -105
- solace_agent_mesh/assets/docs/docs/documentation/concepts/agents/index.html +0 -144
- solace_agent_mesh/assets/docs/docs/documentation/concepts/architecture/index.html +0 -91
- solace_agent_mesh/assets/docs/docs/documentation/concepts/gateways/index.html +0 -91
- solace_agent_mesh/assets/docs/docs/documentation/concepts/orchestrator/index.html +0 -55
- solace_agent_mesh/assets/docs/docs/documentation/concepts/plugins/index.html +0 -111
- solace_agent_mesh/assets/docs/docs/documentation/deployment/debugging/index.html +0 -77
- solace_agent_mesh/assets/docs/docs/documentation/deployment/deploy/index.html +0 -48
- solace_agent_mesh/assets/docs/docs/documentation/deployment/observability/index.html +0 -54
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/component-overview/index.html +0 -45
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/configurations/litellm_models/index.html +0 -49
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/installation/index.html +0 -76
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/quick-start/index.html +0 -73
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/slack-integration/index.html +0 -72
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/creating-service-providers/index.html +0 -54
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/solace-ai-connector/index.html +0 -69
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/structure/index.html +0 -59
- solace_agent_mesh/assets/docs/lunr-index-1759936913198.json +0 -1
- solace_agent_mesh/assets/docs/search-doc-1759936913198.json +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-ChRwcV89.css +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-DnnE01OM.js +0 -339
- solace_agent_mesh/gateway/http_sse/repository/entities/message.py +0 -41
- solace_agent_mesh/gateway/http_sse/repository/message_repository.py +0 -84
- solace_agent_mesh/gateway/http_sse/repository/models/message_model.py +0 -45
- solace_agent_mesh-1.4.12.dist-info/RECORD +0 -448
- /solace_agent_mesh/assets/docs/assets/js/{8591.d7c16be6.js.LICENSE.txt → 8591.5d015485.js.LICENSE.txt} +0 -0
- /solace_agent_mesh/assets/docs/assets/js/{main.f67fc9f4.js.LICENSE.txt → main.bd3c34f3.js.LICENSE.txt} +0 -0
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/WHEEL +0 -0
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/entry_points.txt +0 -0
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,32 +1,41 @@
|
|
|
1
|
+
I notice the content was cut off at the end. Let me provide the complete developer guide based on the available information:
|
|
2
|
+
|
|
1
3
|
# DEVELOPER GUIDE: gateway
|
|
2
4
|
|
|
3
5
|
## Quick Summary
|
|
4
|
-
The `gateway` directory provides a comprehensive framework for building
|
|
6
|
+
The `gateway` directory provides a comprehensive framework for building gateways that connect external platforms (Slack, HTTP/SSE web interfaces) to the Solace AI Connector's A2A (Agent-to-Agent) messaging system. The architecture consists of a foundational `base` module that defines abstract classes for gateway implementations, and specific gateway implementations like `slack` for Slack integration and `http_sse` for web-based interfaces. The framework handles authentication, message translation between external formats and A2A protocol, real-time streaming updates, and manages the complete lifecycle of requests from external platforms to AI agents.
|
|
5
7
|
|
|
6
8
|
## Files and Subdirectories Overview
|
|
7
9
|
- **Direct files:**
|
|
8
|
-
- `__init__.py`:
|
|
10
|
+
- `__init__.py`: Standard Python package initializer
|
|
11
|
+
- `gateway_llm.txt`: Documentation or configuration file for LLM-related gateway functionality
|
|
12
|
+
|
|
9
13
|
- **Subdirectories:**
|
|
10
|
-
- `base/`: Foundational classes and utilities for building
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
13
|
-
- `webhook/`: A universal webhook gateway for receiving HTTP requests from external systems.
|
|
14
|
+
- `base/`: Foundational abstract classes and utilities for building gateway implementations
|
|
15
|
+
- `slack/`: Complete Slack platform integration gateway with bot functionality
|
|
16
|
+
- `http_sse/`: HTTP/Server-Sent Events gateway for web-based user interfaces
|
|
14
17
|
|
|
15
18
|
## Developer API Reference
|
|
16
19
|
|
|
17
20
|
### Direct Files
|
|
18
21
|
|
|
19
22
|
#### __init__.py
|
|
20
|
-
**Purpose:** Initializes the `gateway`
|
|
23
|
+
**Purpose:** Initializes the `gateway` Python package
|
|
21
24
|
**Import:** `from solace_agent_mesh.gateway import ...`
|
|
22
25
|
|
|
23
26
|
**Classes/Functions/Constants:**
|
|
24
27
|
This file is empty and contains no direct exports.
|
|
25
28
|
|
|
29
|
+
#### gateway_llm.txt
|
|
30
|
+
**Purpose:** Documentation or configuration file for LLM-related gateway functionality
|
|
31
|
+
**Import:** Not applicable (text/documentation file)
|
|
32
|
+
|
|
33
|
+
**Content:** This appears to be a documentation or configuration file rather than executable code.
|
|
34
|
+
|
|
26
35
|
### Subdirectory APIs
|
|
27
36
|
|
|
28
37
|
#### base/
|
|
29
|
-
**Purpose:** Provides
|
|
38
|
+
**Purpose:** Provides foundational abstract classes for building Gateway implementations
|
|
30
39
|
**Key Exports:** `BaseGatewayApp`, `BaseGatewayComponent`, `TaskContextManager`
|
|
31
40
|
**Import Examples:**
|
|
32
41
|
```python
|
|
@@ -35,332 +44,330 @@ from solace_agent_mesh.gateway.base.component import BaseGatewayComponent
|
|
|
35
44
|
from solace_agent_mesh.gateway.base.task_context import TaskContextManager
|
|
36
45
|
```
|
|
37
46
|
|
|
38
|
-
#### http_sse/
|
|
39
|
-
**Purpose:** Implements a complete HTTP/SSE gateway to serve a web-based user interface, bridging web protocols with the backend A2A messaging fabric.
|
|
40
|
-
**Key Exports:** `WebUIBackendApp`, `WebUIBackendComponent`, `SSEManager`, `SessionManager`, and various dependency injectors.
|
|
41
|
-
**Import Examples:**
|
|
42
|
-
```python
|
|
43
|
-
from solace_agent_mesh.gateway.http_sse.app import WebUIBackendApp
|
|
44
|
-
from solace_agent_mesh.gateway.http_sse.component import WebUIBackendComponent
|
|
45
|
-
from solace_agent_mesh.gateway.http_sse.sse_manager import SSEManager
|
|
46
|
-
from solace_agent_mesh.gateway.http_sse.session_manager import SessionManager
|
|
47
|
-
from solace_agent_mesh.gateway.http_sse.dependencies import get_agent_service, get_task_service, get_user_id
|
|
48
|
-
```
|
|
49
|
-
|
|
50
47
|
#### slack/
|
|
51
|
-
**Purpose:**
|
|
52
|
-
**Key Exports:** `SlackGatewayApp`, `SlackGatewayComponent`,
|
|
48
|
+
**Purpose:** Complete Slack platform integration with bot functionality, event handling, and A2A message translation
|
|
49
|
+
**Key Exports:** `SlackGatewayApp`, `SlackGatewayComponent`, utility functions for Slack operations
|
|
53
50
|
**Import Examples:**
|
|
54
51
|
```python
|
|
55
52
|
from solace_agent_mesh.gateway.slack.app import SlackGatewayApp
|
|
56
53
|
from solace_agent_mesh.gateway.slack.component import SlackGatewayComponent
|
|
57
|
-
from solace_agent_mesh.gateway.slack.utils import generate_a2a_session_id, send_slack_message
|
|
54
|
+
from solace_agent_mesh.gateway.slack.utils import generate_a2a_session_id, send_slack_message
|
|
58
55
|
```
|
|
59
56
|
|
|
60
|
-
####
|
|
61
|
-
**Purpose:**
|
|
62
|
-
**Key Exports:** `
|
|
57
|
+
#### http_sse/
|
|
58
|
+
**Purpose:** HTTP/Server-Sent Events gateway for web-based user interfaces with real-time streaming
|
|
59
|
+
**Key Exports:** `WebUIBackendApp`, `WebUIBackendComponent`, `SSEManager`, `SessionManager`, routers, services
|
|
63
60
|
**Import Examples:**
|
|
64
61
|
```python
|
|
65
|
-
from solace_agent_mesh.gateway.
|
|
66
|
-
from solace_agent_mesh.gateway.
|
|
67
|
-
from solace_agent_mesh.gateway.
|
|
62
|
+
from solace_agent_mesh.gateway.http_sse.app import WebUIBackendApp
|
|
63
|
+
from solace_agent_mesh.gateway.http_sse.component import WebUIBackendComponent
|
|
64
|
+
from solace_agent_mesh.gateway.http_sse.sse_manager import SSEManager
|
|
65
|
+
from solace_agent_mesh.gateway.http_sse.dependencies import get_sse_manager, get_session_manager
|
|
68
66
|
```
|
|
69
67
|
|
|
70
68
|
## Complete Usage Guide
|
|
71
69
|
|
|
72
|
-
### 1. Creating a Custom Gateway
|
|
73
|
-
|
|
74
|
-
This example shows how to use the `base` module to build a new gateway for a hypothetical external platform.
|
|
70
|
+
### 1. Creating a Custom Gateway Implementation
|
|
75
71
|
|
|
76
72
|
```python
|
|
77
|
-
|
|
78
|
-
from typing import Type, List, Dict, Any
|
|
73
|
+
from typing import Type, List, Dict, Any, Optional, Tuple, Union
|
|
79
74
|
from solace_agent_mesh.gateway.base.app import BaseGatewayApp
|
|
80
|
-
from .component import
|
|
75
|
+
from solace_agent_mesh.gateway.base.component import BaseGatewayComponent
|
|
76
|
+
from solace_agent_mesh.common.a2a.types import ContentPart, TextPart
|
|
77
|
+
from a2a.types import Task, TaskStatusUpdateEvent, TaskArtifactUpdateEvent, JSONRPCError
|
|
81
78
|
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
# Step 1: Define your gateway app class
|
|
80
|
+
class MyCustomGatewayApp(BaseGatewayApp):
|
|
81
|
+
"""Custom gateway for My Platform integration."""
|
|
84
82
|
|
|
83
|
+
# Define platform-specific configuration parameters
|
|
85
84
|
SPECIFIC_APP_SCHEMA_PARAMS: List[Dict[str, Any]] = [
|
|
86
85
|
{
|
|
87
86
|
"name": "my_platform_api_key",
|
|
88
87
|
"required": True,
|
|
89
88
|
"type": "string",
|
|
90
|
-
"description": "API key for
|
|
89
|
+
"description": "API key for My Platform"
|
|
91
90
|
},
|
|
92
91
|
{
|
|
93
92
|
"name": "my_platform_webhook_url",
|
|
94
93
|
"required": False,
|
|
95
94
|
"type": "string",
|
|
96
|
-
"description": "Webhook URL for receiving events
|
|
95
|
+
"description": "Webhook URL for receiving events"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "default_agent_name",
|
|
99
|
+
"required": False,
|
|
100
|
+
"type": "string",
|
|
101
|
+
"default": "assistant",
|
|
102
|
+
"description": "Default agent to route messages to"
|
|
97
103
|
}
|
|
98
104
|
]
|
|
99
105
|
|
|
100
|
-
def _get_gateway_component_class(self) -> Type[
|
|
101
|
-
return
|
|
106
|
+
def _get_gateway_component_class(self) -> Type[BaseGatewayComponent]:
|
|
107
|
+
return MyCustomGatewayComponent
|
|
102
108
|
|
|
103
|
-
#
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
from a2a.types import Part as A2APart, TextPart, Task, TaskStatusUpdateEvent, TaskArtifactUpdateEvent, JSONRPCError
|
|
107
|
-
|
|
108
|
-
class MyGatewayComponent(BaseGatewayComponent):
|
|
109
|
+
# Step 2: Implement your gateway component
|
|
110
|
+
class MyCustomGatewayComponent(BaseGatewayComponent):
|
|
111
|
+
"""Component implementing My Platform integration logic."""
|
|
109
112
|
|
|
110
113
|
def __init__(self, **kwargs):
|
|
111
114
|
super().__init__(**kwargs)
|
|
112
115
|
self.api_key = self.get_config("my_platform_api_key")
|
|
113
116
|
self.webhook_url = self.get_config("my_platform_webhook_url")
|
|
114
|
-
self.
|
|
117
|
+
self.default_agent = self.get_config("default_agent_name", "assistant")
|
|
118
|
+
self.platform_client = None # Initialize your platform client
|
|
115
119
|
|
|
116
120
|
async def _extract_initial_claims(self, external_event_data: Any) -> Optional[Dict[str, Any]]:
|
|
117
|
-
"""Extract user identity from platform
|
|
121
|
+
"""Extract user identity from platform event."""
|
|
122
|
+
# Example: Extract user ID from your platform's event structure
|
|
118
123
|
if hasattr(external_event_data, 'user_id'):
|
|
119
|
-
return {
|
|
124
|
+
return {
|
|
125
|
+
"id": external_event_data.user_id,
|
|
126
|
+
"platform": "my_platform",
|
|
127
|
+
"username": getattr(external_event_data, 'username', None)
|
|
128
|
+
}
|
|
120
129
|
return None
|
|
121
130
|
|
|
122
131
|
def _start_listener(self) -> None:
|
|
123
|
-
"""Start your platform listener
|
|
124
|
-
# Example: Start
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
app = FastAPI()
|
|
129
|
-
|
|
130
|
-
@app.post("/webhook")
|
|
131
|
-
async def handle_webhook(request_data: dict):
|
|
132
|
-
await self.handle_external_event(request_data)
|
|
133
|
-
return {"status": "ok"}
|
|
134
|
-
|
|
135
|
-
self.server = uvicorn.Server(
|
|
136
|
-
uvicorn.Config(app, host="0.0.0.0", port=8080)
|
|
137
|
-
)
|
|
138
|
-
# Start server in background thread
|
|
139
|
-
import threading
|
|
140
|
-
self.server_thread = threading.Thread(target=self.server.run)
|
|
141
|
-
self.server_thread.start()
|
|
132
|
+
"""Start your platform's event listener."""
|
|
133
|
+
# Example: Start webhook server, WebSocket connection, etc.
|
|
134
|
+
print(f"Starting My Platform listener on {self.webhook_url}")
|
|
135
|
+
# Initialize your platform client/listener here
|
|
142
136
|
|
|
143
137
|
def _stop_listener(self) -> None:
|
|
144
|
-
"""Stop your platform listener."""
|
|
145
|
-
|
|
146
|
-
|
|
138
|
+
"""Stop your platform's event listener."""
|
|
139
|
+
print("Stopping My Platform listener")
|
|
140
|
+
# Clean up platform client/listener here
|
|
147
141
|
|
|
148
|
-
def _translate_external_input(self, external_event: Any) -> Tuple[str, List[
|
|
149
|
-
"""Convert
|
|
150
|
-
|
|
151
|
-
message_text = external_event
|
|
142
|
+
async def _translate_external_input(self, external_event: Any) -> Tuple[str, List[ContentPart], Dict[str, Any]]:
|
|
143
|
+
"""Convert platform event to A2A format."""
|
|
144
|
+
# Extract message content
|
|
145
|
+
message_text = getattr(external_event, 'message', '')
|
|
146
|
+
|
|
147
|
+
# Determine target agent (could be extracted from message or use default)
|
|
148
|
+
target_agent = getattr(external_event, 'target_agent', self.default_agent)
|
|
152
149
|
|
|
150
|
+
# Create A2A content parts
|
|
153
151
|
a2a_parts = [TextPart(text=message_text)]
|
|
154
152
|
|
|
153
|
+
# Create context for tracking this request
|
|
155
154
|
context = {
|
|
156
155
|
"platform": "my_platform",
|
|
157
|
-
"
|
|
158
|
-
"
|
|
156
|
+
"event_id": getattr(external_event, 'id', ''),
|
|
157
|
+
"channel_id": getattr(external_event, 'channel_id', ''),
|
|
158
|
+
"user_id_for_artifacts": getattr(external_event, 'user_id', ''),
|
|
159
|
+
"a2a_session_id": f"my_platform_{getattr(external_event, 'session_id', '')}"
|
|
159
160
|
}
|
|
160
161
|
|
|
161
162
|
return target_agent, a2a_parts, context
|
|
162
163
|
|
|
163
|
-
async def _send_update_to_external(self,
|
|
164
|
+
async def _send_update_to_external(self,
|
|
165
|
+
external_request_context: Dict[str, Any],
|
|
164
166
|
event_data: Union[TaskStatusUpdateEvent, TaskArtifactUpdateEvent],
|
|
165
167
|
is_final_chunk_of_update: bool) -> None:
|
|
166
|
-
"""Send streaming update
|
|
167
|
-
|
|
168
|
+
"""Send streaming update to your platform."""
|
|
169
|
+
channel_id = external_request_context.get("channel_id")
|
|
170
|
+
|
|
171
|
+
# Extract text content from the event
|
|
168
172
|
if hasattr(event_data, 'text_delta'):
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
173
|
+
text_content = event_data.text_delta
|
|
174
|
+
elif hasattr(event_data, 'content'):
|
|
175
|
+
text_content = str(event_data.content)
|
|
176
|
+
else:
|
|
177
|
+
text_content = "Update received"
|
|
178
|
+
|
|
179
|
+
# Send to your platform (example)
|
|
180
|
+
await self._send_to_platform(channel_id, text_content, is_partial=not is_final_chunk_of_update)
|
|
174
181
|
|
|
175
|
-
async def _send_final_response_to_external(self,
|
|
182
|
+
async def _send_final_response_to_external(self,
|
|
183
|
+
external_request_context: Dict[str, Any],
|
|
176
184
|
task_data: Task) -> None:
|
|
177
|
-
"""Send final response
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
185
|
+
"""Send final response to your platform."""
|
|
186
|
+
channel_id = external_request_context.get("channel_id")
|
|
187
|
+
|
|
188
|
+
# Extract final response from task data
|
|
189
|
+
final_response = "Task completed"
|
|
190
|
+
if task_data.result and hasattr(task_data.result, 'content'):
|
|
191
|
+
final_response = str(task_data.result.content)
|
|
182
192
|
|
|
183
|
-
await self.
|
|
184
|
-
user_id=external_request_context["user_id_for_artifacts"],
|
|
185
|
-
message=final_text,
|
|
186
|
-
is_final=True
|
|
187
|
-
)
|
|
193
|
+
await self._send_to_platform(channel_id, final_response, is_final=True)
|
|
188
194
|
|
|
189
|
-
async def _send_error_to_external(self,
|
|
195
|
+
async def _send_error_to_external(self,
|
|
196
|
+
external_request_context: Dict[str, Any],
|
|
190
197
|
error_data: JSONRPCError) -> None:
|
|
191
|
-
"""Send error
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
is_error=True
|
|
196
|
-
)
|
|
198
|
+
"""Send error to your platform."""
|
|
199
|
+
channel_id = external_request_context.get("channel_id")
|
|
200
|
+
error_message = f"Error: {error_data.message}"
|
|
201
|
+
await self._send_to_platform(channel_id, error_message, is_error=True)
|
|
197
202
|
|
|
198
|
-
async def
|
|
203
|
+
async def _send_to_platform(self, channel_id: str, message: str, **kwargs):
|
|
199
204
|
"""Helper method to send messages to your platform."""
|
|
200
|
-
# Implement your platform
|
|
201
|
-
print(f"Sending to {
|
|
205
|
+
# Implement your platform's message sending logic here
|
|
206
|
+
print(f"Sending to {channel_id}: {message}")
|
|
202
207
|
|
|
203
|
-
# Usage
|
|
208
|
+
# Step 3: Usage
|
|
204
209
|
if __name__ == "__main__":
|
|
205
|
-
|
|
206
|
-
"
|
|
210
|
+
config = {
|
|
211
|
+
"name": "my-custom-gateway",
|
|
212
|
+
"namespace": "/myorg/prod",
|
|
207
213
|
"gateway_id": "my-gateway-01",
|
|
208
|
-
"my_platform_api_key": "
|
|
209
|
-
"my_platform_webhook_url": "https://
|
|
214
|
+
"my_platform_api_key": "your-api-key",
|
|
215
|
+
"my_platform_webhook_url": "https://my-webhook.example.com",
|
|
216
|
+
"default_agent_name": "my-assistant",
|
|
217
|
+
"solace_config": {
|
|
218
|
+
"broker_url": "tcp://localhost:55555",
|
|
219
|
+
"vpn_name": "default",
|
|
220
|
+
"username": "default",
|
|
221
|
+
"password": "default"
|
|
222
|
+
}
|
|
210
223
|
}
|
|
211
224
|
|
|
212
|
-
|
|
213
|
-
|
|
225
|
+
app = MyCustomGatewayApp(app_info=config)
|
|
226
|
+
app.run()
|
|
214
227
|
```
|
|
215
228
|
|
|
216
|
-
### 2. Using the
|
|
229
|
+
### 2. Using the Slack Gateway
|
|
217
230
|
|
|
218
231
|
```python
|
|
219
|
-
from solace_agent_mesh.gateway.
|
|
232
|
+
from solace_agent_mesh.gateway.slack.app import SlackGatewayApp
|
|
220
233
|
|
|
221
|
-
#
|
|
222
|
-
|
|
223
|
-
"name": "my-
|
|
224
|
-
"
|
|
225
|
-
"
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
"
|
|
229
|
-
"
|
|
230
|
-
"
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
"
|
|
234
|
+
# Configure Slack gateway
|
|
235
|
+
slack_config = {
|
|
236
|
+
"name": "my-slack-bot",
|
|
237
|
+
"namespace": "/myorg/prod",
|
|
238
|
+
"gateway_id": "slack-bot-01",
|
|
239
|
+
|
|
240
|
+
# Slack credentials (get these from your Slack app)
|
|
241
|
+
"slack_bot_token": "xoxb-your-bot-token",
|
|
242
|
+
"slack_app_token": "xapp-your-app-token",
|
|
243
|
+
"slack_signing_secret": "your-signing-secret",
|
|
244
|
+
|
|
245
|
+
# Gateway settings
|
|
246
|
+
"default_agent_name": "assistant",
|
|
247
|
+
"enable_socket_mode": True,
|
|
248
|
+
"enable_file_upload": True,
|
|
249
|
+
"slack_request_timeout": 30,
|
|
250
|
+
|
|
251
|
+
# A2A system configuration
|
|
252
|
+
"solace_config": {
|
|
253
|
+
"broker_url": "tcp://localhost:55555",
|
|
254
|
+
"vpn_name": "default",
|
|
255
|
+
"username": "default",
|
|
256
|
+
"password": "default"
|
|
257
|
+
}
|
|
234
258
|
}
|
|
235
259
|
|
|
236
|
-
#
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
# The gateway will start a FastAPI server with endpoints like:
|
|
241
|
-
# GET /api/agents - List available agents
|
|
242
|
-
# POST /api/tasks - Submit new tasks
|
|
243
|
-
# GET /api/tasks/{task_id}/sse - Stream task updates via SSE
|
|
244
|
-
# POST /api/artifacts - Upload files
|
|
260
|
+
# Create and run the Slack gateway
|
|
261
|
+
slack_app = SlackGatewayApp(app_info=slack_config)
|
|
262
|
+
slack_app.run()
|
|
245
263
|
```
|
|
246
264
|
|
|
247
|
-
### 3.
|
|
265
|
+
### 3. Using the HTTP/SSE Gateway for Web Interfaces
|
|
248
266
|
|
|
249
267
|
```python
|
|
268
|
+
from solace_agent_mesh.gateway.http_sse.app import WebUIBackendApp
|
|
250
269
|
from fastapi import APIRouter, Depends, Request
|
|
251
270
|
from solace_agent_mesh.gateway.http_sse.dependencies import (
|
|
252
|
-
|
|
253
|
-
get_user_id,
|
|
254
|
-
get_publish_a2a_func,
|
|
255
|
-
get_sse_manager,
|
|
256
|
-
get_session_manager
|
|
271
|
+
get_sse_manager, get_session_manager, get_core_a2a_service
|
|
257
272
|
)
|
|
258
273
|
|
|
259
|
-
#
|
|
274
|
+
# Configure web UI gateway
|
|
275
|
+
webui_config = {
|
|
276
|
+
"name": "my-webui",
|
|
277
|
+
"session_secret_key": "your-secret-key",
|
|
278
|
+
"fastapi_host": "0.0.0.0",
|
|
279
|
+
"fastapi_port": 8000,
|
|
280
|
+
"namespace": "/myorg/prod",
|
|
281
|
+
"gateway_id": "webui-01",
|
|
282
|
+
"cors_allowed_origins": ["http://localhost:3000"],
|
|
283
|
+
"frontend_welcome_message": "Welcome to AI Assistant!",
|
|
284
|
+
"frontend_bot_name": "Assistant",
|
|
285
|
+
"frontend_enable_file_upload": True,
|
|
286
|
+
"frontend_enable_agent_selection": True,
|
|
287
|
+
|
|
288
|
+
# Database for session persistence
|
|
289
|
+
"session_service": {
|
|
290
|
+
"type": "sql",
|
|
291
|
+
"database_url": "sqlite:///./sessions.db"
|
|
292
|
+
},
|
|
293
|
+
|
|
294
|
+
# A2A system configuration
|
|
295
|
+
"solace_config": {
|
|
296
|
+
"broker_url": "tcp://localhost:55555",
|
|
297
|
+
"vpn_name": "default",
|
|
298
|
+
"username": "default",
|
|
299
|
+
"password": "default"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
# Create custom router for additional endpoints
|
|
260
304
|
custom_router = APIRouter(prefix="/api/custom")
|
|
261
305
|
|
|
262
|
-
@custom_router.get("/my-
|
|
263
|
-
async def
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
)
|
|
267
|
-
"""Get agents filtered by user permissions."""
|
|
268
|
-
all_agents = agent_registry.get_all_agents()
|
|
269
|
-
# Filter agents based on user permissions
|
|
270
|
-
user_agents = [agent for agent in all_agents if user_can_access_agent(user_id, agent)]
|
|
271
|
-
return {"agents": user_agents, "user_id": user_id}
|
|
272
|
-
|
|
273
|
-
@custom_router.post("/broadcast-message")
|
|
274
|
-
async def broadcast_message(
|
|
275
|
-
message: str,
|
|
276
|
-
publish_func = Depends(get_publish_a2a_func),
|
|
277
|
-
user_id: str = Depends(get_user_id)
|
|
306
|
+
@custom_router.get("/my-endpoint")
|
|
307
|
+
async def my_custom_endpoint(
|
|
308
|
+
request: Request,
|
|
309
|
+
sse_manager = Depends(get_sse_manager),
|
|
310
|
+
session_manager = Depends(get_session_manager)
|
|
278
311
|
):
|
|
279
|
-
"""
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
payload={
|
|
283
|
-
"method": "broadcast/message",
|
|
284
|
-
"params": {"message": message, "from_user": user_id}
|
|
285
|
-
},
|
|
286
|
-
user_properties={"clientId": user_id}
|
|
287
|
-
)
|
|
288
|
-
return {"status": "broadcasted", "message": message}
|
|
312
|
+
"""Custom endpoint with access to gateway services."""
|
|
313
|
+
user_id = session_manager.get_a2a_client_id(request)
|
|
314
|
+
return {"user_id": user_id, "message": "Custom endpoint response"}
|
|
289
315
|
|
|
290
|
-
#
|
|
291
|
-
|
|
316
|
+
# Create and run the web UI gateway
|
|
317
|
+
webui_app = WebUIBackendApp(app_info=webui_config)
|
|
318
|
+
webui_app.run()
|
|
292
319
|
```
|
|
293
320
|
|
|
294
|
-
### 4.
|
|
321
|
+
### 4. Working with Task Context and Session Management
|
|
295
322
|
|
|
296
323
|
```python
|
|
297
|
-
from solace_agent_mesh.gateway.
|
|
298
|
-
|
|
299
|
-
# Configuration for Slack gateway
|
|
300
|
-
slack_config = {
|
|
301
|
-
"name": "my-slack-gateway",
|
|
302
|
-
"namespace": "myorg/prod",
|
|
303
|
-
"gateway_id": "slack-gateway-01",
|
|
304
|
-
"slack_bot_token": "xoxb-your-bot-token",
|
|
305
|
-
"slack_app_token": "xapp-your-app-token",
|
|
306
|
-
"slack_signing_secret": "your-signing-secret",
|
|
307
|
-
"default_agent_name": "assistant",
|
|
308
|
-
"enable_socket_mode": True,
|
|
309
|
-
"enable_file_upload": True
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
# Initialize and run the Slack gateway
|
|
313
|
-
slack_app = SlackGatewayApp(app_info=slack_config)
|
|
314
|
-
slack_app.run()
|
|
315
|
-
|
|
316
|
-
# The gateway will:
|
|
317
|
-
# - Connect to Slack via Socket Mode or HTTP
|
|
318
|
-
# - Listen for mentions and direct messages
|
|
319
|
-
# - Translate Slack messages to A2A format
|
|
320
|
-
# - Send responses back to Slack channels/threads
|
|
321
|
-
```
|
|
324
|
+
from solace_agent_mesh.gateway.base.task_context import TaskContextManager
|
|
325
|
+
from solace_agent_mesh.gateway.http_sse.session_manager import SessionManager
|
|
322
326
|
|
|
323
|
-
|
|
327
|
+
# Task context management (used internally by gateways)
|
|
328
|
+
context_manager = TaskContextManager()
|
|
324
329
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
"
|
|
331
|
-
"
|
|
332
|
-
"gateway_id": "webhook-gateway-01",
|
|
333
|
-
"webhook_host": "0.0.0.0",
|
|
334
|
-
"webhook_port": 9000,
|
|
335
|
-
"webhook_path": "/webhook",
|
|
336
|
-
"target_agent_name": "data-processor",
|
|
337
|
-
"auth_method": "header",
|
|
338
|
-
"auth_header_name": "X-API-Key",
|
|
339
|
-
"auth_header_value": "secret-webhook-key",
|
|
340
|
-
"payload_format": "json",
|
|
341
|
-
"user_id_extraction": {
|
|
342
|
-
"method": "json_path",
|
|
343
|
-
"path": "$.user.id"
|
|
344
|
-
}
|
|
330
|
+
# Store context when submitting a task
|
|
331
|
+
task_id = "task-123"
|
|
332
|
+
context = {
|
|
333
|
+
"platform": "slack",
|
|
334
|
+
"channel_id": "C1234567890",
|
|
335
|
+
"user_id": "U1234567890",
|
|
336
|
+
"thread_ts": "1234567890.123456"
|
|
345
337
|
}
|
|
338
|
+
context_manager.store_context(task_id, context)
|
|
339
|
+
|
|
340
|
+
# Retrieve context when processing response
|
|
341
|
+
retrieved_context = context_manager.get_context(task_id)
|
|
342
|
+
if retrieved_context:
|
|
343
|
+
# Send response back to original platform
|
|
344
|
+
channel_id = retrieved_context["channel_id"]
|
|
345
|
+
|
|
346
|
+
# Session management for web interfaces
|
|
347
|
+
session_manager = SessionManager(
|
|
348
|
+
secret_key="your-secret-key",
|
|
349
|
+
app_config={"session_timeout": 3600}
|
|
350
|
+
)
|
|
346
351
|
|
|
347
|
-
#
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
#
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
352
|
+
# In a FastAPI endpoint
|
|
353
|
+
@app.get("/api/session-info")
|
|
354
|
+
async def get_session_info(request: Request):
|
|
355
|
+
# Get A2A client ID for this web session
|
|
356
|
+
client_id = session_manager.get_a2a_client_id(request)
|
|
357
|
+
|
|
358
|
+
# Ensure we have an A2A session
|
|
359
|
+
session_id = session_manager.ensure_a2a_session(request)
|
|
360
|
+
|
|
361
|
+
return {
|
|
362
|
+
"client_id": client_id,
|
|
363
|
+
"session_id": session_id
|
|
364
|
+
}
|
|
357
365
|
```
|
|
358
366
|
|
|
359
|
-
###
|
|
367
|
+
### 5. Advanced Integration: Combining Multiple Gateways
|
|
360
368
|
|
|
361
369
|
```python
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
# Initialize the task context manager (usually done by BaseGat
|
|
370
|
+
import asyncio
|
|
371
|
+
from solace_agent_mesh.gateway.slack.app import Sl
|
|
365
372
|
|
|
366
|
-
# content_hash:
|
|
373
|
+
# content_hash: 39731f2779a4f0ef42b1948f8441baf5b76eff10fbfc48def5fbb270fa334f6b
|