solace-agent-mesh 1.11.2__py3-none-any.whl → 1.12.0__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.
Files changed (308) hide show
  1. solace_agent_mesh/agent/adk/callbacks.py +177 -10
  2. solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +3 -0
  3. solace_agent_mesh/agent/adk/models/lite_llm.py +34 -16
  4. solace_agent_mesh/agent/adk/runner.py +66 -8
  5. solace_agent_mesh/agent/adk/setup.py +61 -26
  6. solace_agent_mesh/agent/protocol/event_handlers.py +48 -0
  7. solace_agent_mesh/agent/proxies/a2a/component.py +27 -0
  8. solace_agent_mesh/agent/sac/component.py +84 -2
  9. solace_agent_mesh/agent/tools/builtin_artifact_tools.py +41 -22
  10. solace_agent_mesh/agent/tools/peer_agent_tool.py +19 -12
  11. solace_agent_mesh/agent/tools/tool_config_types.py +21 -1
  12. solace_agent_mesh/agent/utils/artifact_helpers.py +54 -0
  13. solace_agent_mesh/assets/docs/404.html +3 -3
  14. solace_agent_mesh/assets/docs/assets/js/15ba94aa.e186750d.js +1 -0
  15. solace_agent_mesh/assets/docs/assets/js/240a0364.83e37aa8.js +1 -0
  16. solace_agent_mesh/assets/docs/assets/js/2e32b5e0.2f0db237.js +1 -0
  17. solace_agent_mesh/assets/docs/assets/js/3a6c6137.7e61915d.js +1 -0
  18. solace_agent_mesh/assets/docs/assets/js/{3ac1795d.28b7c67b.js → 3ac1795d.dc006e20.js} +1 -1
  19. solace_agent_mesh/assets/docs/assets/js/3ff0015d.f08618fb.js +1 -0
  20. solace_agent_mesh/assets/docs/assets/js/4667dc50.bf2ad456.js +1 -0
  21. solace_agent_mesh/assets/docs/assets/js/547e15cc.8e6da617.js +1 -0
  22. solace_agent_mesh/assets/docs/assets/js/5b8d9c11.d4eb37b8.js +1 -0
  23. solace_agent_mesh/assets/docs/assets/js/5c2bd65f.1ee87753.js +1 -0
  24. solace_agent_mesh/assets/docs/assets/js/64195356.09dbd087.js +1 -0
  25. solace_agent_mesh/assets/docs/assets/js/66d4869e.30340bd3.js +1 -0
  26. solace_agent_mesh/assets/docs/assets/js/729898df.7249e9fd.js +1 -0
  27. solace_agent_mesh/assets/docs/assets/js/7e294c01.7c5f6906.js +1 -0
  28. solace_agent_mesh/assets/docs/assets/js/8024126c.e3467286.js +1 -0
  29. solace_agent_mesh/assets/docs/assets/js/81a99df0.95be65d4.js +1 -0
  30. solace_agent_mesh/assets/docs/assets/js/9bb13469.4523ae20.js +1 -0
  31. solace_agent_mesh/assets/docs/assets/js/a7d42657.a956689d.js +1 -0
  32. solace_agent_mesh/assets/docs/assets/js/ab9708a8.3e563275.js +1 -0
  33. solace_agent_mesh/assets/docs/assets/js/e04b235d.06d23db6.js +1 -0
  34. solace_agent_mesh/assets/docs/assets/js/e1b6eeb4.deb2b62e.js +1 -0
  35. solace_agent_mesh/assets/docs/assets/js/e6f9706b.acc800d3.js +1 -0
  36. solace_agent_mesh/assets/docs/assets/js/e92d0134.c147a429.js +1 -0
  37. solace_agent_mesh/assets/docs/assets/js/ee0c2fe7.94d0a351.js +1 -0
  38. solace_agent_mesh/assets/docs/assets/js/f284c35a.08fab659.js +1 -0
  39. solace_agent_mesh/assets/docs/assets/js/main.b241af3e.js +2 -0
  40. solace_agent_mesh/assets/docs/assets/js/runtime~main.4ca7d2e2.js +1 -0
  41. solace_agent_mesh/assets/docs/docs/documentation/components/agents/index.html +4 -4
  42. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/artifact-management/index.html +4 -4
  43. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/audio-tools/index.html +4 -4
  44. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/data-analysis-tools/index.html +4 -4
  45. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/embeds/index.html +4 -4
  46. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/image-tools/index.html +81 -0
  47. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/index.html +14 -12
  48. solace_agent_mesh/assets/docs/docs/documentation/components/cli/index.html +30 -9
  49. solace_agent_mesh/assets/docs/docs/documentation/components/gateways/index.html +4 -4
  50. solace_agent_mesh/assets/docs/docs/documentation/components/index.html +6 -4
  51. solace_agent_mesh/assets/docs/docs/documentation/components/orchestrator/index.html +4 -4
  52. solace_agent_mesh/assets/docs/docs/documentation/components/platform-service/index.html +33 -0
  53. solace_agent_mesh/assets/docs/docs/documentation/components/plugins/index.html +4 -4
  54. solace_agent_mesh/assets/docs/docs/documentation/components/projects/index.html +4 -4
  55. solace_agent_mesh/assets/docs/docs/documentation/components/prompts/index.html +4 -4
  56. solace_agent_mesh/assets/docs/docs/documentation/components/proxies/index.html +4 -4
  57. solace_agent_mesh/assets/docs/docs/documentation/components/speech/index.html +4 -4
  58. solace_agent_mesh/assets/docs/docs/documentation/deploying/debugging/index.html +4 -4
  59. solace_agent_mesh/assets/docs/docs/documentation/deploying/deployment-options/index.html +5 -5
  60. solace_agent_mesh/assets/docs/docs/documentation/deploying/index.html +4 -4
  61. solace_agent_mesh/assets/docs/docs/documentation/deploying/{kubernetes-deployment → kubernetes}/index.html +6 -6
  62. solace_agent_mesh/assets/docs/docs/documentation/deploying/kubernetes/kubernetes-deployment-guide/index.html +197 -0
  63. solace_agent_mesh/assets/docs/docs/documentation/deploying/logging/index.html +11 -6
  64. solace_agent_mesh/assets/docs/docs/documentation/deploying/observability/index.html +4 -4
  65. solace_agent_mesh/assets/docs/docs/documentation/deploying/proxy_configuration/index.html +4 -4
  66. solace_agent_mesh/assets/docs/docs/documentation/developing/create-agents/index.html +4 -4
  67. solace_agent_mesh/assets/docs/docs/documentation/developing/create-gateways/index.html +4 -4
  68. solace_agent_mesh/assets/docs/docs/documentation/developing/creating-python-tools/index.html +23 -5
  69. solace_agent_mesh/assets/docs/docs/documentation/developing/creating-service-providers/index.html +4 -4
  70. solace_agent_mesh/assets/docs/docs/documentation/developing/evaluations/index.html +4 -4
  71. solace_agent_mesh/assets/docs/docs/documentation/developing/index.html +4 -4
  72. solace_agent_mesh/assets/docs/docs/documentation/developing/structure/index.html +4 -4
  73. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/bedrock-agents/index.html +4 -4
  74. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/custom-agent/index.html +4 -4
  75. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/event-mesh-gateway/index.html +4 -4
  76. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/mcp-integration/index.html +17 -8
  77. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/mongodb-integration/index.html +4 -4
  78. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/rag-integration/index.html +4 -4
  79. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/rest-gateway/index.html +4 -4
  80. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/slack-integration/index.html +4 -4
  81. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/sql-database/index.html +4 -4
  82. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/teams-integration/index.html +4 -4
  83. solace_agent_mesh/assets/docs/docs/documentation/enterprise/agent-builder/index.html +5 -5
  84. solace_agent_mesh/assets/docs/docs/documentation/enterprise/connectors/index.html +4 -4
  85. solace_agent_mesh/assets/docs/docs/documentation/enterprise/index.html +4 -4
  86. solace_agent_mesh/assets/docs/docs/documentation/enterprise/installation/index.html +4 -4
  87. solace_agent_mesh/assets/docs/docs/documentation/enterprise/openapi-tools/index.html +4 -4
  88. solace_agent_mesh/assets/docs/docs/documentation/enterprise/rbac-setup-guide/index.html +4 -4
  89. solace_agent_mesh/assets/docs/docs/documentation/enterprise/secure-user-delegated-access/index.html +4 -4
  90. solace_agent_mesh/assets/docs/docs/documentation/enterprise/single-sign-on/index.html +4 -4
  91. solace_agent_mesh/assets/docs/docs/documentation/enterprise/wheel-installation/index.html +4 -4
  92. solace_agent_mesh/assets/docs/docs/documentation/getting-started/architecture/index.html +4 -4
  93. solace_agent_mesh/assets/docs/docs/documentation/getting-started/index.html +6 -5
  94. solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +4 -4
  95. solace_agent_mesh/assets/docs/docs/documentation/getting-started/try-agent-mesh/index.html +4 -4
  96. solace_agent_mesh/assets/docs/docs/documentation/getting-started/vibe_coding/index.html +62 -0
  97. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/artifact-storage/index.html +25 -4
  98. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/configurations/index.html +4 -4
  99. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/index.html +4 -4
  100. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/installation/index.html +4 -4
  101. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/large_language_models/index.html +4 -4
  102. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/run-project/index.html +4 -4
  103. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/session-storage/index.html +4 -4
  104. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/user-feedback/index.html +4 -4
  105. solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0/index.html +4 -4
  106. solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-technical-migration-map/index.html +4 -4
  107. solace_agent_mesh/assets/docs/docs/documentation/migrations/platform-service-split/index.html +85 -0
  108. solace_agent_mesh/assets/docs/lunr-index-1767712284328.json +1 -0
  109. solace_agent_mesh/assets/docs/lunr-index.json +1 -1
  110. solace_agent_mesh/assets/docs/search-doc-1767712284328.json +1 -0
  111. solace_agent_mesh/assets/docs/search-doc.json +1 -1
  112. solace_agent_mesh/assets/docs/sitemap.xml +1 -1
  113. solace_agent_mesh/cli/__init__.py +1 -1
  114. solace_agent_mesh/cli/commands/init_cmd/__init__.py +15 -0
  115. solace_agent_mesh/cli/commands/init_cmd/directory_step.py +1 -1
  116. solace_agent_mesh/cli/commands/init_cmd/env_step.py +29 -2
  117. solace_agent_mesh/cli/commands/init_cmd/platform_service_step.py +85 -0
  118. solace_agent_mesh/cli/commands/tools_cmd.py +315 -0
  119. solace_agent_mesh/cli/main.py +2 -0
  120. solace_agent_mesh/client/webui/frontend/static/assets/{authCallback-Dj3JtK42.js → authCallback-8Nihi8rv.js} +1 -1
  121. solace_agent_mesh/client/webui/frontend/static/assets/{client-ZKk9kEJ5.js → client-DYtZN8p-.js} +1 -1
  122. solace_agent_mesh/client/webui/frontend/static/assets/main-BYGUHQMk.js +435 -0
  123. solace_agent_mesh/client/webui/frontend/static/assets/main-D2CSH1bp.css +1 -0
  124. solace_agent_mesh/client/webui/frontend/static/assets/{vendor-BNV4kZN0.js → vendor-XBWAmrun.js} +106 -101
  125. solace_agent_mesh/client/webui/frontend/static/auth-callback.html +3 -3
  126. solace_agent_mesh/client/webui/frontend/static/index.html +4 -4
  127. solace_agent_mesh/client/webui/frontend/static/ui-version.json +1 -1
  128. solace_agent_mesh/common/a2a/types.py +1 -1
  129. solace_agent_mesh/common/agent_registry.py +38 -11
  130. solace_agent_mesh/common/data_parts.py +28 -0
  131. solace_agent_mesh/common/error_handlers.py +83 -0
  132. solace_agent_mesh/common/sam_events/event_service.py +2 -2
  133. solace_agent_mesh/config_portal/backend/common.py +2 -0
  134. solace_agent_mesh/config_portal/frontend/static/client/assets/_index-ZV-jX48T.js +103 -0
  135. solace_agent_mesh/config_portal/frontend/static/client/assets/{manifest-ba77705e.js → manifest-ce5bc5da.js} +1 -1
  136. solace_agent_mesh/config_portal/frontend/static/client/index.html +1 -1
  137. solace_agent_mesh/core_a2a/service.py +3 -2
  138. solace_agent_mesh/gateway/adapter/base.py +28 -1
  139. solace_agent_mesh/gateway/adapter/types.py +9 -0
  140. solace_agent_mesh/gateway/base/auth_interface.py +103 -0
  141. solace_agent_mesh/gateway/base/component.py +68 -1
  142. solace_agent_mesh/gateway/generic/component.py +195 -30
  143. solace_agent_mesh/gateway/http_sse/app.py +23 -6
  144. solace_agent_mesh/gateway/http_sse/component.py +9 -61
  145. solace_agent_mesh/gateway/http_sse/dependencies.py +9 -51
  146. solace_agent_mesh/gateway/http_sse/main.py +28 -418
  147. solace_agent_mesh/gateway/http_sse/repository/chat_task_repository.py +2 -2
  148. solace_agent_mesh/gateway/http_sse/repository/entities/project.py +1 -1
  149. solace_agent_mesh/gateway/http_sse/repository/entities/project_user.py +1 -1
  150. solace_agent_mesh/gateway/http_sse/repository/entities/session.py +2 -2
  151. solace_agent_mesh/gateway/http_sse/repository/feedback_repository.py +2 -2
  152. solace_agent_mesh/gateway/http_sse/repository/interfaces.py +2 -2
  153. solace_agent_mesh/gateway/http_sse/repository/models/prompt_model.py +1 -1
  154. solace_agent_mesh/gateway/http_sse/repository/models/session_model.py +1 -1
  155. solace_agent_mesh/gateway/http_sse/repository/project_repository.py +1 -1
  156. solace_agent_mesh/gateway/http_sse/repository/project_user_repository.py +1 -1
  157. solace_agent_mesh/gateway/http_sse/repository/session_repository.py +4 -4
  158. solace_agent_mesh/gateway/http_sse/repository/task_repository.py +2 -2
  159. solace_agent_mesh/gateway/http_sse/routers/artifacts.py +16 -15
  160. solace_agent_mesh/gateway/http_sse/routers/auth.py +61 -132
  161. solace_agent_mesh/gateway/http_sse/routers/config.py +12 -8
  162. solace_agent_mesh/gateway/http_sse/routers/dto/requests/session_requests.py +1 -1
  163. solace_agent_mesh/gateway/http_sse/routers/dto/responses/base_responses.py +1 -1
  164. solace_agent_mesh/gateway/http_sse/routers/dto/responses/session_responses.py +2 -2
  165. solace_agent_mesh/gateway/http_sse/routers/feedback.py +2 -2
  166. solace_agent_mesh/gateway/http_sse/routers/people.py +2 -2
  167. solace_agent_mesh/gateway/http_sse/routers/projects.py +2 -1
  168. solace_agent_mesh/gateway/http_sse/routers/prompts.py +2 -1
  169. solace_agent_mesh/gateway/http_sse/routers/sessions.py +3 -3
  170. solace_agent_mesh/gateway/http_sse/routers/speech.py +1 -1
  171. solace_agent_mesh/gateway/http_sse/routers/tasks.py +3 -2
  172. solace_agent_mesh/gateway/http_sse/routers/users.py +1 -1
  173. solace_agent_mesh/gateway/http_sse/routers/visualization.py +2 -1
  174. solace_agent_mesh/gateway/http_sse/services/background_task_monitor.py +1 -1
  175. solace_agent_mesh/gateway/http_sse/services/data_retention_service.py +1 -1
  176. solace_agent_mesh/gateway/http_sse/services/feedback_service.py +1 -1
  177. solace_agent_mesh/gateway/http_sse/services/session_service.py +4 -4
  178. solace_agent_mesh/gateway/http_sse/services/task_logger_service.py +1 -1
  179. solace_agent_mesh/services/platform/__init__.py +23 -12
  180. solace_agent_mesh/services/platform/api/dependencies.py +23 -16
  181. solace_agent_mesh/services/platform/api/main.py +118 -43
  182. solace_agent_mesh/services/platform/api/routers/__init__.py +12 -3
  183. solace_agent_mesh/services/platform/api/routers/health_router.py +31 -0
  184. solace_agent_mesh/services/platform/app.py +101 -7
  185. solace_agent_mesh/services/platform/component.py +552 -33
  186. solace_agent_mesh/shared/__init__.py +14 -0
  187. solace_agent_mesh/shared/api/__init__.py +42 -0
  188. solace_agent_mesh/shared/auth/__init__.py +26 -0
  189. solace_agent_mesh/shared/auth/dependencies.py +204 -0
  190. solace_agent_mesh/shared/auth/middleware.py +291 -0
  191. solace_agent_mesh/shared/database/__init__.py +20 -0
  192. solace_agent_mesh/{gateway/http_sse/shared → shared/database}/base_repository.py +1 -1
  193. solace_agent_mesh/{gateway/http_sse/shared → shared/database}/database_exceptions.py +1 -1
  194. solace_agent_mesh/{gateway/http_sse/shared → shared/database}/database_helpers.py +1 -1
  195. solace_agent_mesh/shared/exceptions/__init__.py +36 -0
  196. solace_agent_mesh/{gateway/http_sse/shared → shared/exceptions}/exception_handlers.py +1 -1
  197. solace_agent_mesh/shared/utils/__init__.py +21 -0
  198. solace_agent_mesh/templates/platform.yaml +49 -0
  199. solace_agent_mesh/templates/webui.yaml +12 -3
  200. {solace_agent_mesh-1.11.2.dist-info → solace_agent_mesh-1.12.0.dist-info}/METADATA +2 -1
  201. {solace_agent_mesh-1.11.2.dist-info → solace_agent_mesh-1.12.0.dist-info}/RECORD +214 -258
  202. solace_agent_mesh/agent/adk/adk_llm.txt +0 -226
  203. solace_agent_mesh/agent/adk/adk_llm_detail.txt +0 -566
  204. solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +0 -171
  205. solace_agent_mesh/agent/adk/models/models_llm.txt +0 -189
  206. solace_agent_mesh/agent/agent_llm.txt +0 -369
  207. solace_agent_mesh/agent/agent_llm_detail.txt +0 -1702
  208. solace_agent_mesh/agent/protocol/protocol_llm.txt +0 -81
  209. solace_agent_mesh/agent/protocol/protocol_llm_detail.txt +0 -92
  210. solace_agent_mesh/agent/proxies/a2a/a2a_llm.txt +0 -190
  211. solace_agent_mesh/agent/proxies/base/base_llm.txt +0 -148
  212. solace_agent_mesh/agent/proxies/proxies_llm.txt +0 -283
  213. solace_agent_mesh/agent/sac/sac_llm.txt +0 -189
  214. solace_agent_mesh/agent/sac/sac_llm_detail.txt +0 -200
  215. solace_agent_mesh/agent/testing/testing_llm.txt +0 -58
  216. solace_agent_mesh/agent/testing/testing_llm_detail.txt +0 -68
  217. solace_agent_mesh/agent/tools/tools_llm.txt +0 -276
  218. solace_agent_mesh/agent/tools/tools_llm_detail.txt +0 -275
  219. solace_agent_mesh/agent/utils/utils_llm.txt +0 -152
  220. solace_agent_mesh/agent/utils/utils_llm_detail.txt +0 -149
  221. solace_agent_mesh/assets/docs/assets/js/15ba94aa.92fea363.js +0 -1
  222. solace_agent_mesh/assets/docs/assets/js/240a0364.9ad94d1b.js +0 -1
  223. solace_agent_mesh/assets/docs/assets/js/2e32b5e0.33f5d75b.js +0 -1
  224. solace_agent_mesh/assets/docs/assets/js/3a6c6137.f5940cfa.js +0 -1
  225. solace_agent_mesh/assets/docs/assets/js/3ff0015d.2ddc75c0.js +0 -1
  226. solace_agent_mesh/assets/docs/assets/js/547e15cc.2f7790c1.js +0 -1
  227. solace_agent_mesh/assets/docs/assets/js/5c2bd65f.90a87880.js +0 -1
  228. solace_agent_mesh/assets/docs/assets/js/64195356.c498c4d0.js +0 -1
  229. solace_agent_mesh/assets/docs/assets/js/66d4869e.b77431fc.js +0 -1
  230. solace_agent_mesh/assets/docs/assets/js/8024126c.fa0e7186.js +0 -1
  231. solace_agent_mesh/assets/docs/assets/js/81a99df0.2484b8d9.js +0 -1
  232. solace_agent_mesh/assets/docs/assets/js/9bb13469.b2333011.js +0 -1
  233. solace_agent_mesh/assets/docs/assets/js/ab9708a8.245ae0ef.js +0 -1
  234. solace_agent_mesh/assets/docs/assets/js/db5d6442.3daf1696.js +0 -1
  235. solace_agent_mesh/assets/docs/assets/js/e04b235d.52cb25ed.js +0 -1
  236. solace_agent_mesh/assets/docs/assets/js/e1b6eeb4.b1068f9b.js +0 -1
  237. solace_agent_mesh/assets/docs/assets/js/e6f9706b.4488e34c.js +0 -1
  238. solace_agent_mesh/assets/docs/assets/js/e92d0134.3bda61dd.js +0 -1
  239. solace_agent_mesh/assets/docs/assets/js/f284c35a.250993bf.js +0 -1
  240. solace_agent_mesh/assets/docs/assets/js/main.7acf7ace.js +0 -2
  241. solace_agent_mesh/assets/docs/assets/js/runtime~main.9e0813a2.js +0 -1
  242. solace_agent_mesh/assets/docs/lunr-index-1765810064709.json +0 -1
  243. solace_agent_mesh/assets/docs/search-doc-1765810064709.json +0 -1
  244. solace_agent_mesh/cli/commands/add_cmd/add_cmd_llm.txt +0 -250
  245. solace_agent_mesh/cli/commands/init_cmd/init_cmd_llm.txt +0 -365
  246. solace_agent_mesh/cli/commands/plugin_cmd/plugin_cmd_llm.txt +0 -305
  247. solace_agent_mesh/client/webui/frontend/static/assets/main-BcUaNZ-Q.css +0 -1
  248. solace_agent_mesh/client/webui/frontend/static/assets/main-vjch4RYc.js +0 -435
  249. solace_agent_mesh/common/a2a/a2a_llm.txt +0 -175
  250. solace_agent_mesh/common/a2a/a2a_llm_detail.txt +0 -193
  251. solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +0 -445
  252. solace_agent_mesh/common/a2a_spec/a2a_spec_llm_detail.txt +0 -736
  253. solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +0 -330
  254. solace_agent_mesh/common/common_llm.txt +0 -230
  255. solace_agent_mesh/common/common_llm_detail.txt +0 -2562
  256. solace_agent_mesh/common/middleware/middleware_llm.txt +0 -174
  257. solace_agent_mesh/common/middleware/middleware_llm_detail.txt +0 -185
  258. solace_agent_mesh/common/sac/sac_llm.txt +0 -71
  259. solace_agent_mesh/common/sac/sac_llm_detail.txt +0 -82
  260. solace_agent_mesh/common/sam_events/sam_events_llm.txt +0 -104
  261. solace_agent_mesh/common/sam_events/sam_events_llm_detail.txt +0 -115
  262. solace_agent_mesh/common/services/providers/providers_llm.txt +0 -81
  263. solace_agent_mesh/common/services/services_llm.txt +0 -368
  264. solace_agent_mesh/common/services/services_llm_detail.txt +0 -459
  265. solace_agent_mesh/common/utils/embeds/embeds_llm.txt +0 -220
  266. solace_agent_mesh/common/utils/utils_llm.txt +0 -335
  267. solace_agent_mesh/common/utils/utils_llm_detail.txt +0 -572
  268. solace_agent_mesh/config_portal/frontend/static/client/assets/_index-DiOiAjzL.js +0 -103
  269. solace_agent_mesh/core_a2a/core_a2a_llm.txt +0 -90
  270. solace_agent_mesh/core_a2a/core_a2a_llm_detail.txt +0 -101
  271. solace_agent_mesh/gateway/base/base_llm.txt +0 -226
  272. solace_agent_mesh/gateway/base/base_llm_detail.txt +0 -235
  273. solace_agent_mesh/gateway/gateway_llm.txt +0 -369
  274. solace_agent_mesh/gateway/gateway_llm_detail.txt +0 -3885
  275. solace_agent_mesh/gateway/http_sse/alembic/alembic_llm.txt +0 -345
  276. solace_agent_mesh/gateway/http_sse/alembic/versions/versions_llm.txt +0 -161
  277. solace_agent_mesh/gateway/http_sse/components/components_llm.txt +0 -105
  278. solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +0 -299
  279. solace_agent_mesh/gateway/http_sse/http_sse_llm_detail.txt +0 -3278
  280. solace_agent_mesh/gateway/http_sse/repository/entities/entities_llm.txt +0 -221
  281. solace_agent_mesh/gateway/http_sse/repository/models/models_llm.txt +0 -257
  282. solace_agent_mesh/gateway/http_sse/repository/repository_llm.txt +0 -308
  283. solace_agent_mesh/gateway/http_sse/routers/dto/dto_llm.txt +0 -450
  284. solace_agent_mesh/gateway/http_sse/routers/dto/requests/requests_llm.txt +0 -133
  285. solace_agent_mesh/gateway/http_sse/routers/dto/responses/responses_llm.txt +0 -123
  286. solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +0 -312
  287. solace_agent_mesh/gateway/http_sse/services/services_llm.txt +0 -303
  288. solace_agent_mesh/gateway/http_sse/shared/__init__.py +0 -146
  289. solace_agent_mesh/gateway/http_sse/shared/shared_llm.txt +0 -319
  290. solace_agent_mesh/gateway/http_sse/utils/utils_llm.txt +0 -47
  291. solace_agent_mesh/llm.txt +0 -228
  292. solace_agent_mesh/llm_detail.txt +0 -2835
  293. solace_agent_mesh/solace_agent_mesh_llm.txt +0 -362
  294. solace_agent_mesh/solace_agent_mesh_llm_detail.txt +0 -8599
  295. solace_agent_mesh/templates/templates_llm.txt +0 -147
  296. /solace_agent_mesh/assets/docs/assets/js/{main.7acf7ace.js.LICENSE.txt → main.b241af3e.js.LICENSE.txt} +0 -0
  297. /solace_agent_mesh/{gateway/http_sse/shared → shared/api}/auth_utils.py +0 -0
  298. /solace_agent_mesh/{gateway/http_sse/shared → shared/api}/pagination.py +0 -0
  299. /solace_agent_mesh/{gateway/http_sse/shared → shared/api}/response_utils.py +0 -0
  300. /solace_agent_mesh/{gateway/http_sse/shared → shared/exceptions}/error_dto.py +0 -0
  301. /solace_agent_mesh/{gateway/http_sse/shared → shared/exceptions}/exceptions.py +0 -0
  302. /solace_agent_mesh/{gateway/http_sse/shared → shared/utils}/enums.py +0 -0
  303. /solace_agent_mesh/{gateway/http_sse/shared → shared/utils}/timestamp_utils.py +0 -0
  304. /solace_agent_mesh/{gateway/http_sse/shared → shared/utils}/types.py +0 -0
  305. /solace_agent_mesh/{gateway/http_sse/shared → shared/utils}/utils.py +0 -0
  306. {solace_agent_mesh-1.11.2.dist-info → solace_agent_mesh-1.12.0.dist-info}/WHEEL +0 -0
  307. {solace_agent_mesh-1.11.2.dist-info → solace_agent_mesh-1.12.0.dist-info}/entry_points.txt +0 -0
  308. {solace_agent_mesh-1.11.2.dist-info → solace_agent_mesh-1.12.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[868],{1740:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>r,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"documentation/deploying/kubernetes/kubernetes","title":"Kubernetes","description":"You can deploy Agent Mesh to Kubernetes using Helm charts, which handle the complexity of creating and configuring Kubernetes resources such as deployments, services, persistent volumes, and configuration management.","source":"@site/docs/documentation/deploying/kubernetes/kubernetes.md","sourceDirName":"documentation/deploying/kubernetes","slug":"/documentation/deploying/kubernetes/","permalink":"/solace-agent-mesh/docs/documentation/deploying/kubernetes/","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/deploying/kubernetes/kubernetes.md","tags":[],"version":"current","sidebarPosition":11,"frontMatter":{"title":"Kubernetes","sidebar_position":11},"sidebar":"docSidebar","previous":{"title":"Choosing Deployment Options","permalink":"/solace-agent-mesh/docs/documentation/deploying/deployment-options"},"next":{"title":"Kubernetes Deployment Guide","permalink":"/solace-agent-mesh/docs/documentation/deploying/kubernetes/kubernetes-deployment-guide"}}');var o=t(4848),i=t(8453);const r={title:"Kubernetes",sidebar_position:11},a="Deploying Agent Mesh to Kubernetes",l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Understanding Kubernetes Deployment",id:"understanding-kubernetes-deployment",level:2},{value:"Using the Helm Quickstart",id:"using-the-helm-quickstart",level:2},{value:"Kubernetes Deployment Architecture",id:"kubernetes-deployment-architecture",level:2},{value:"Configuring for Kubernetes",id:"configuring-for-kubernetes",level:2},{value:"Queue Configuration",id:"queue-configuration",level:3},{value:"Secrets Management",id:"secrets-management",level:3},{value:"Storage",id:"storage",level:3},{value:"Resource Limits",id:"resource-limits",level:3}];function u(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"deploying-agent-mesh-to-kubernetes",children:"Deploying Agent Mesh to Kubernetes"})}),"\n",(0,o.jsx)(n.p,{children:"You can deploy Agent Mesh to Kubernetes using Helm charts, which handle the complexity of creating and configuring Kubernetes resources such as deployments, services, persistent volumes, and configuration management."}),"\n",(0,o.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,o.jsx)(n.p,{children:"To deploy Agent Mesh to Kubernetes, you need:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"A running Kubernetes cluster (version 1.20 or later)"}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.code,{children:"kubectl"})," command-line tool configured to access your cluster"]}),"\n",(0,o.jsx)(n.li,{children:"Helm installed on your system (version 3.0 or later)"}),"\n",(0,o.jsx)(n.li,{children:"Container registry credentials (if you use private registries)"}),"\n",(0,o.jsx)(n.li,{children:"Solace broker credentials or Solace Cloud connection details"}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"understanding-kubernetes-deployment",children:"Understanding Kubernetes Deployment"}),"\n",(0,o.jsx)(n.p,{children:"The deployment process involves adding the Helm chart repository, customizing values for your environment, and deploying Agent Mesh to your cluster. The Helm charts simplify this process compared to manually managing individual YAML manifests."}),"\n",(0,o.jsx)(n.h2,{id:"using-the-helm-quickstart",children:"Using the Helm Quickstart"}),"\n",(0,o.jsx)(n.p,{children:"The Solace Agent Mesh Helm quickstart includes pre-configured Helm values, deployment examples, and detailed documentation for common deployment scenarios."}),"\n",(0,o.jsxs)(n.p,{children:["For the quickstart repository and installation files, see ",(0,o.jsx)(n.a,{href:"https://github.com/SolaceProducts/solace-agent-mesh-helm-quickstart",children:"solace-agent-mesh-helm-quickstart"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["For step-by-step deployment instructions, see the ",(0,o.jsx)(n.a,{href:"https://solaceproducts.github.io/solace-agent-mesh-helm-quickstart/docs-site/",children:"Helm Deployment Guide"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"kubernetes-deployment-architecture",children:"Kubernetes Deployment Architecture"}),"\n",(0,o.jsx)(n.p,{children:"You can deploy Agent Mesh as a single monolithic deployment or as multiple specialized deployments that scale independently. The Helm charts support both patterns based on your scale requirements and operational preferences."}),"\n",(0,o.jsx)(n.p,{children:"When you deploy multiple components as separate deployments, each component runs independently and communicates through the Solace event broker. This approach provides better fault isolation and allows you to scale specific components based on demand. All components must connect to the same Solace broker and use consistent storage configurations to maintain system coherence."}),"\n",(0,o.jsx)(n.h2,{id:"configuring-for-kubernetes",children:"Configuring for Kubernetes"}),"\n",(0,o.jsx)(n.p,{children:"Several configuration considerations apply specifically to Kubernetes deployments."}),"\n",(0,o.jsx)(n.h3,{id:"queue-configuration",children:"Queue Configuration"}),"\n",(0,o.jsx)(n.p,{children:"For Kubernetes environments with container restarts, you should configure Agent Mesh to use durable queues instead of temporary queues. Set the environment variable:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"USE_TEMPORARY_QUEUES=false\n"})}),"\n",(0,o.jsxs)(n.p,{children:["This configuration ensures that messages persist even when pods restart and allows multiple instances to connect to the same queue. For detailed queue configuration guidance, including Queue Template setup in Solace Cloud, see ",(0,o.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/deploying/deployment-options#setting-up-queue-templates",children:"Choosing Deployment Options"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"secrets-management",children:"Secrets Management"}),"\n",(0,o.jsx)(n.p,{children:"You should use Kubernetes Secrets to store sensitive information such as API keys, broker credentials, and authentication tokens. Never embed these values in container images or configuration files."}),"\n",(0,o.jsx)(n.h3,{id:"storage",children:"Storage"}),"\n",(0,o.jsx)(n.p,{children:"If you run multiple pod replicas, ensure all instances access the same persistent storage with identical configurations. Inconsistent storage across instances can cause data synchronization issues."}),"\n",(0,o.jsx)(n.h3,{id:"resource-limits",children:"Resource Limits"}),"\n",(0,o.jsx)(n.p,{children:"You should define resource requests and limits for your containers to ensure stable operation and enable effective autoscaling. The Helm quickstart includes recommended resource configurations."})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var s=t(6540);const o={},i=s.createContext(o);function r(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[9324],{305:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"documentation/components/plugins","title":"Plugins","description":"Plugins provide a mechanism to extend the functionality of Agent Mesh in a modular, shareable, and reusable way. The current plugin ecosystem includes agents, gateways, and specialized integrations.","source":"@site/docs/documentation/components/plugins.md","sourceDirName":"documentation/components","slug":"/documentation/components/plugins","permalink":"/solace-agent-mesh/docs/documentation/components/plugins","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/components/plugins.md","tags":[],"version":"current","sidebarPosition":270,"frontMatter":{"title":"Plugins","sidebar_position":270},"sidebar":"docSidebar","previous":{"title":"Platform Service","permalink":"/solace-agent-mesh/docs/documentation/components/platform-service"},"next":{"title":"Projects","permalink":"/solace-agent-mesh/docs/documentation/components/projects"}}');var s=t(4848),l=t(8453);const a={title:"Plugins",sidebar_position:270},o=void 0,r={},c=[{value:"Official Core Plugins",id:"official-core-plugins",level:3},{value:"Create a Plugin",id:"create-a-plugin",level:2},{value:"Build the Plugin",id:"build-the-plugin",level:3},{value:"Share the Plugin",id:"share-the-plugin",level:3},{value:"Use a Plugin",id:"use-a-plugin",level:2},{value:"Plugin Catalog Dashboard",id:"plugin-catalog-dashboard",level:2},{value:"Agent or Plugin: Which To Use?",id:"agent-or-plugin-which-to-use",level:2},{value:"When To Use a Standalone Agent",id:"when-to-use-a-standalone-agent",level:3},{value:"When To Use an Agent Plugin",id:"when-to-use-an-agent-plugin",level:3},{value:"Recommendation",id:"recommendation",level:3}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Plugins provide a mechanism to extend the functionality of Agent Mesh in a modular, shareable, and reusable way. The current plugin ecosystem includes agents, gateways, and specialized integrations."}),"\n",(0,s.jsx)(n.admonition,{title:"In one sentence",type:"tip",children:(0,s.jsx)(n.p,{children:"Plugins are modular Python packages that extend Solace the capabilities of Agent Mesh through agents, gateways, and specialized integrations."})}),"\n",(0,s.jsxs)(n.p,{children:["Plugins are packaged as Python modules that can be installed using various package managers (",(0,s.jsx)(n.code,{children:"pip"}),", ",(0,s.jsx)(n.code,{children:"uv"}),", ",(0,s.jsx)(n.code,{children:"poetry"}),", ",(0,s.jsx)(n.code,{children:"conda"}),"). They integrate seamlessly with the A2A protocol and can provide:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Agent Plugins"}),": Specialized agents with domain-specific capabilities"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Gateway Plugins"}),": New interface types for external system integration"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Custom Plugins"}),": Custom integrations such as HR providers."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"All plugin interactions (create, build, add) are managed through the Agent Mesh CLI."}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["Run ",(0,s.jsx)(n.code,{children:"sam plugin --help"})," to see the list of available commands for plugins."]})}),"\n",(0,s.jsx)(n.h3,{id:"official-core-plugins",children:"Official Core Plugins"}),"\n",(0,s.jsxs)(n.p,{children:["Agent Mesh comes with a set of official core plugins that can be used to extend the functionality of the system. You can find the repository of the official core plugins ",(0,s.jsx)(n.a,{href:"https://github.com/SolaceLabs/solace-agent-mesh-core-plugins",children:"here \ud83d\udd17"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about how to use the official core plugins, see ",(0,s.jsx)(n.a,{href:"#use-a-plugin",children:"Use Plugins"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"create-a-plugin",children:"Create a Plugin"}),"\n",(0,s.jsxs)(n.p,{children:["To get started, ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/installing-and-configuring/installation",children:"install the Agent Mesh CLI"})," and run the following command:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"solace-agent-mesh plugin create <plugin-name>\n"})}),"\n",(0,s.jsx)(n.p,{children:"Follow the prompts to create a new plugin. A plugin can be one of the following types:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Agent Plugin"}),": Contains custom agents that can be used in a Agent Mesh project."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Gateway Plugin"}),": Contains custom gateways that can be used in a Agent Mesh project."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Custom Plugin"}),": Contains custom integrations such as HR providers or other specialized functionality."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The Agent Mesh CLI creates a directory with the provided name and the following structure:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"plugin-name/\n\u251c\u2500 config.yaml\n\u251c\u2500 src/\n\u2502 \u251c\u2500 __init__.py\n\u2502 \u251c\u2500 [...Other type specific python files]\n\u251c\u2500 .gitignore\n\u251c\u2500 pyproject.toml\n\u251c\u2500 README.md\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.code,{children:"src"})," directory contains the python source code."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.code,{children:"config.yaml"})," file holds the configuration for the plugin, and how to be used in a Agent Mesh application."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Once the plugin is created, you can start customizing the config.yaml or the python files."}),"\n",(0,s.jsx)(n.h3,{id:"build-the-plugin",children:"Build the Plugin"}),"\n",(0,s.jsxs)(n.p,{children:["Building the plugin creates a Python wheel package that can be installed using ",(0,s.jsx)(n.code,{children:"pip"})," or other package managers."]}),"\n",(0,s.jsxs)(n.p,{children:["Python ",(0,s.jsx)(n.code,{children:"build"})," package must be installed already since ",(0,s.jsx)(n.code,{children:"sam plugin build"})," command uses ",(0,s.jsx)(n.code,{children:"build"})," package, if not, run ",(0,s.jsx)(n.code,{children:"pip install build"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"To build the plugin, run the following Agent Mesh CLI command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"solace-agent-mesh plugin build\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The plugin uses the standard ",(0,s.jsx)(n.code,{children:"pyproject.toml"})," file to build the package."]}),"\n",(0,s.jsx)(n.h3,{id:"share-the-plugin",children:"Share the Plugin"}),"\n",(0,s.jsxs)(n.p,{children:["To share the plugin, you can upload the wheel package to a package repository or share the wheel package directly, or any other valid way to share a ",(0,s.jsx)(n.code,{children:"pyproject"})," project."]}),"\n",(0,s.jsx)(n.h2,{id:"use-a-plugin",children:"Use a Plugin"}),"\n",(0,s.jsxs)(n.p,{children:["To use a plugin in your project, use the ",(0,s.jsx)(n.code,{children:"plugin add"})," command, which performs two steps under-the-hood:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Locates the plugin or installs the plugin package using a Python package manager (like ",(0,s.jsx)(n.code,{children:"pip"})," or ",(0,s.jsx)(n.code,{children:"uv"}),")"]}),"\n",(0,s.jsx)(n.li,{children:"Creates a component instance based on the plugin"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"solace-agent-mesh plugin add <COMPONENT_NAME> --plugin <PLUGIN_NAME>\n"})}),"\n",(0,s.jsx)(n.p,{children:"where:"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"<COMPONENT_NAME>"})," is the name you choose for the component instance in your project."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"<PLUGIN_NAME>"}),", you can use:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Name of the plugin as published to a package manager like ",(0,s.jsx)(n.code,{children:"pypi"}),", for example ",(0,s.jsx)(n.code,{children:"my-plugin"})]}),"\n",(0,s.jsx)(n.li,{children:"Name of the plugin that has been already installed into your Python environment."}),"\n",(0,s.jsxs)(n.li,{children:["A local path to the plugin directory, for example ",(0,s.jsx)(n.code,{children:"./my-plugin"})]}),"\n",(0,s.jsxs)(n.li,{children:["A path to a wheel package, for example ",(0,s.jsx)(n.code,{children:"./my-plugin/dist/my_plugin-0.1.0-py3-none-any.whl"})]}),"\n",(0,s.jsxs)(n.li,{children:["A URL to a git repository, for example ",(0,s.jsx)(n.code,{children:"git+https://github.com/<USERNAME>/<REPOSITORY>"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["If the plugin is in a subdirectory of the repository, you can specify the subdirectory using the ",(0,s.jsx)(n.code,{children:"git+https://github.com/<USERNAME>/<REPOSITORY>#subdirectory=<PLUGIN_NAME>"})," syntax."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The CLI handles both steps automatically, or you can manage the plugin installation yourself using your preferred Python package manager."}),"\n",(0,s.jsxs)(n.admonition,{type:"tip",children:[(0,s.jsxs)(n.p,{children:["You can also customize the python package manager command used to install the plugin by setting the ",(0,s.jsx)(n.code,{children:"SAM_PLUGIN_INSTALL_COMMAND"})," environment variable or passing the ",(0,s.jsx)(n.code,{children:"--install-command"})," option to the ",(0,s.jsx)(n.code,{children:"plugin add"})," command.\nFor example, to use ",(0,s.jsx)(n.code,{children:"uv"})," as the package manager, you can run:"]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'export SAM_PLUGIN_INSTALL_COMMAND="uv pip install {package}"\n'})}),(0,s.jsx)(n.p,{children:"or"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'solace-agent-mesh plugin add <COMPONENT_NAME> --plugin <PLUGIN_NAME> --install-command "uv pip install {package}"\n'})})]}),"\n",(0,s.jsxs)(n.p,{children:["This command adds the plugin instance configuration to your ",(0,s.jsx)(n.code,{children:"configs"})," directory."]}),"\n",(0,s.jsx)(n.p,{children:"Depending on the plugin, you may need to update the newly added plugin configuration file. Follow the instructions provided by the plugin author for any specific configurations."}),"\n",(0,s.jsx)(n.h2,{id:"plugin-catalog-dashboard",children:"Plugin Catalog Dashboard"}),"\n",(0,s.jsxs)(n.p,{children:["You can manage available plugins with the ",(0,s.jsx)(n.code,{children:"plugin catalog"})," command, which launches a user-friendly interface."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"solace-agent-mesh plugin catalog\n"})}),"\n",(0,s.jsx)(n.h2,{id:"agent-or-plugin-which-to-use",children:"Agent or Plugin: Which To Use?"}),"\n",(0,s.jsx)(n.p,{children:"In simple terms, plugins of type agent are just packaged agents. However, there are distinct advantages to each approach, and choosing the right one depends on your use case."}),"\n",(0,s.jsx)(n.p,{children:"Here\u2019s a detailed comparison to help you decide."}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{style:{textAlign:"left"},children:"Feature"}),(0,s.jsxs)(n.th,{style:{textAlign:"left"},children:["Standalone Agent (",(0,s.jsx)(n.code,{children:"sam add agent"}),")"]}),(0,s.jsxs)(n.th,{style:{textAlign:"left"},children:["Agent Plugin (",(0,s.jsx)(n.code,{children:"sam plugin create"}),")"]})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"left"},children:(0,s.jsx)(n.strong,{children:"Creation"})}),(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"A single command creates a configuration file in your project."}),(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Creates a complete, standard Python project structure."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"left"},children:(0,s.jsx)(n.strong,{children:"Structure"})}),(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Consists of a YAML configuration file and associated Python tool files within a Agent Mesh project."}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["A self-contained Python package with ",(0,s.jsx)(n.code,{children:"pyproject.toml"}),", a ",(0,s.jsx)(n.code,{children:"src"})," directory, and configuration templates."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"left"},children:(0,s.jsx)(n.strong,{children:"Packaging"})}),(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Not packaged. It exists as a component within a larger Agent Mesh project."}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Packaged into a standard Python wheel (",(0,s.jsx)(n.code,{children:".whl"}),") file using ",(0,s.jsx)(n.code,{children:"sam plugin build"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"left"},children:(0,s.jsx)(n.strong,{children:"Distribution"})}),(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Shared by copying files or sharing the entire project."}),(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Easily distributed as a wheel file, via a Git repository, or published to a package index like PyPI."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"left"},children:(0,s.jsx)(n.strong,{children:"Reusability"})}),(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Primarily for use within the project where it was created."}),(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Designed for high reusability across different projects, teams, and communities."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"left"},children:(0,s.jsx)(n.strong,{children:"Installation"})}),(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"No installation needed. The agent is configured and run as part of the main project."}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Installed into the Python environment using ",(0,s.jsx)(n.code,{children:"sam plugin add"}),", which handles the package installation."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"left"},children:(0,s.jsx)(n.strong,{children:"Versioning"})}),(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Versioned along with the main project."}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Can be versioned independently according to Python packaging standards (e.g., ",(0,s.jsx)(n.code,{children:"v0.1.0"}),", ",(0,s.jsx)(n.code,{children:"v0.2.0"}),")."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"left"},children:(0,s.jsx)(n.strong,{children:"Development"})}),(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Simple and direct. Edit files and run. Ideal for rapid prototyping."}),(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Involves a build/install cycle. Better for structured, long-term development."})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"when-to-use-a-standalone-agent",children:"When To Use a Standalone Agent"}),"\n",(0,s.jsx)(n.p,{children:"Create a standalone agent when:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"You need to quickly test an idea or build a proof-of-concept."}),"\n",(0,s.jsx)(n.li,{children:"The agent is tightly coupled to a single project and is not intended for reuse."}),"\n",(0,s.jsx)(n.li,{children:"You want the most straightforward path to adding a simple agent without the overhead of a full package structure."}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"when-to-use-an-agent-plugin",children:"When To Use an Agent Plugin"}),"\n",(0,s.jsx)(n.p,{children:"Create an agent as a plugin when:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"You plan to use the same agent in multiple projects."}),"\n",(0,s.jsx)(n.li,{children:"You want to share your agent with other developers, teams, or the open-source community."}),"\n",(0,s.jsx)(n.li,{children:"You are building a robust, production-ready agent that benefits from a formal package structure, dependency management, and versioning."}),"\n",(0,s.jsx)(n.li,{children:"You are building a collection of standardized agents for your organization."}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"recommendation",children:"Recommendation"}),"\n",(0,s.jsx)(n.p,{children:"The choice of how to build your agent depends on your goals and the requirements of your project:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Standalone Agents"})," should be viewed as tactical tools for rapid, isolated prototyping. They serve immediate, project-specific needs but do not contribute to a scalable, long-term asset library."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Agent Plugins"})," are the foundation for building a robust, governable, and reusable AI ecosystem. This model treats AI capabilities as enterprise assets, promoting standardization, reducing redundant development costs, and accelerating innovation across the organization. For any capability intended for broader use or long-term value, the plugin framework is the mandated path to maximize return on investment and ensure architectural integrity."]}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var i=t(6540);const s={},l=i.createContext(s);function a(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[8396],{1781:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"documentation/migrations/platform-service-split","title":"Migration to Platform Service (Enterprise v1.27.0+)","description":"\u2705 This Guide Applies To:","source":"@site/docs/documentation/migrations/platform-service-split.md","sourceDirName":"documentation/migrations","slug":"/documentation/migrations/platform-service-split","permalink":"/solace-agent-mesh/docs/documentation/migrations/platform-service-split","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/migrations/platform-service-split.md","tags":[],"version":"current","sidebarPosition":20,"frontMatter":{"title":"Migration to Platform Service (Enterprise v1.27.0+)","sidebar_position":20},"sidebar":"docSidebar","previous":{"title":"Proxy Configuration","permalink":"/solace-agent-mesh/docs/documentation/deploying/proxy_configuration"},"next":{"title":"Migration Guide: Upgrading to the A2A SDK","permalink":"/solace-agent-mesh/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0"}}');var s=i(4848),r=i(8453);const a={title:"Migration to Platform Service (Enterprise v1.27.0+)",sidebar_position:20},o=void 0,l={},c=[{value:"\u2705 This Guide Applies To:",id:"-this-guide-applies-to",level:3},{value:"\u274c This Guide Does NOT Apply To:",id:"-this-guide-does-not-apply-to",level:3},{value:"Overview",id:"overview",level:2},{value:"What&#39;s Changing",id:"whats-changing",level:2},{value:"Split",id:"split",level:3},{value:"Functionality Distribution",id:"functionality-distribution",level:3},{value:"Migration Steps",id:"migration-steps",level:2},{value:"Step 1: Create Platform Service Configuration",id:"step-1-create-platform-service-configuration",level:3},{value:"Step 2: Update WebUI Configuration",id:"step-2-update-webui-configuration",level:3},{value:"Step 3: Run Platform Service",id:"step-3-run-platform-service",level:3},{value:"Verification",id:"verification",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h3,{id:"-this-guide-applies-to",children:"\u2705 This Guide Applies To:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Users running SAM manually with YAML files"})," - Typically after generating your SAM application with ",(0,s.jsx)(n.code,{children:"sam init"}),", you run SAM directly using configuration files (e.g., ",(0,s.jsx)(n.code,{children:"sam run configs/gateways/webui.yaml"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsxs)(n.strong,{children:["Users using Enterprise features and have an existing ",(0,s.jsx)(n.code,{children:"platform.db"})]})," - You are using features like Agent Builder, Connectors, or other enterprise capabilities that have created a ",(0,s.jsx)(n.code,{children:"platform.db"})," file"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"-this-guide-does-not-apply-to",children:"\u274c This Guide Does NOT Apply To:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Users using Docker images"})," - If you're using Solace's pre-packaged Docker images via the Docker quickstart or Kubernetes deployments with Helm charts, this migration is handled automatically"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsxs)(n.strong,{children:["Users with no existing ",(0,s.jsx)(n.code,{children:"platform.db"})]})," - If you don't have an existing ",(0,s.jsx)(n.code,{children:"platform.db"})," file or have not been using enterprise features"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"SAM Community Edition users"})," - This migration only applies to SAM Enterprise"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(n.p,{children:"Previously, backend enterprise functionality was served from the WebUI Gateway. With version 1.27.0+, the architecture splits the WebUI Gateway into two separate services:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"WebUI Gateway"})," (port 8000): Handles chat sessions, task submissions, and real-time streaming"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Platform Service"})," (port 8001): Handles Agent Builder, Connector management, and deployment orchestration"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"whats-changing",children:"What's Changing"}),"\n",(0,s.jsx)(n.h3,{id:"split",children:"Split"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{}),(0,s.jsx)(n.th,{children:"Until v1.24.x"}),(0,s.jsx)(n.th,{children:"After v1.27.0"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Architecture"})}),(0,s.jsx)(n.td,{children:"WebUI Gateway"}),(0,s.jsx)(n.td,{children:"WebUI Gateway + Platform Service"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Ports"})}),(0,s.jsx)(n.td,{children:"Single port (8000)"}),(0,s.jsx)(n.td,{children:"WebUI (8000) + Platform (8001)"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Configuration"})}),(0,s.jsx)(n.td,{children:"One YAML file"}),(0,s.jsx)(n.td,{children:"Two YAML files"})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"functionality-distribution",children:"Functionality Distribution"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"WebUI Gateway (port 8000)"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Chat interface and sessions"}),"\n",(0,s.jsx)(n.li,{children:"Task submission and management"}),"\n",(0,s.jsx)(n.li,{children:"Server-Sent Events (SSE) streaming"}),"\n",(0,s.jsx)(n.li,{children:"Artifact management"}),"\n",(0,s.jsx)(n.li,{children:"Real-time agent interactions"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Platform Service (port 8001)"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Agent Builder (UI-based agent creation)"}),"\n",(0,s.jsx)(n.li,{children:"Connector management"}),"\n",(0,s.jsx)(n.li,{children:"Deployment orchestration"}),"\n",(0,s.jsx)(n.li,{children:"Background tasks (heartbeat monitoring, deployment tracking)"}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"warning",children:(0,s.jsx)(n.p,{children:"If you upgrade to v1.27.0+ without completing this migration, users will lose access to the Agent Builder, Connector management, and dynamic agent deployment capabilities. Chat functionality will continue to work, but enterprise features will be unavailable."})}),"\n",(0,s.jsx)(n.h2,{id:"migration-steps",children:"Migration Steps"}),"\n",(0,s.jsx)(n.h3,{id:"step-1-create-platform-service-configuration",children:"Step 1: Create Platform Service Configuration"}),"\n",(0,s.jsxs)(n.p,{children:["Create a new file ",(0,s.jsx)(n.code,{children:"configs/services/platform.yaml"})," in your project with the contents from ",(0,s.jsx)(n.a,{href:"https://raw.githubusercontent.com/SolaceLabs/solace-agent-mesh/main/templates/platform.yaml",children:"templates/platform.yaml"}),":"]}),"\n",(0,s.jsx)(n.admonition,{type:"important",children:(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"app_config.database_url"})," must point to the existing ",(0,s.jsx)(n.code,{children:"platform.db"})," to retain agent and deployment data."]})}),"\n",(0,s.jsx)(n.h3,{id:"step-2-update-webui-configuration",children:"Step 2: Update WebUI Configuration"}),"\n",(0,s.jsxs)(n.p,{children:["Update your existing ",(0,s.jsx)(n.code,{children:"configs/gateways/webui.yaml"})," to include the Platform Service URL:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'apps:\n - name: a2a_webui_app\n app_module: solace_agent_mesh.gateway.http_sse.app\n \n # Omitted sections for brevity...\n\n app_config:\n namespace: ${NAMESPACE}\n\n # Add the following section to point to the Platform Service\n platform_service:\n url: "${PLATFORM_SERVICE_URL, http://localhost:8001}"\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Delete ",(0,s.jsx)(n.code,{children:"platform_service.database_url"})," from your WebUI yaml, as it is no longer needed."]}),"\n",(0,s.jsx)(n.h3,{id:"step-3-run-platform-service",children:"Step 3: Run Platform Service"}),"\n",(0,s.jsx)(n.p,{children:"In addition to running the WebUI Gateway, also start the Platform Service:"}),"\n",(0,s.jsx)(n.p,{children:"Within the same process:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sam run configs/gateways/webui.yaml configs/services/platform.yaml\n"})}),"\n",(0,s.jsx)(n.p,{children:"Or within its own process:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sam run configs/services/platform.yaml\n"})}),"\n",(0,s.jsx)(n.h2,{id:"verification",children:"Verification"}),"\n",(0,s.jsx)(n.p,{children:"After completing the migration, verify both services are running correctly:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Check WebUI Gateway"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'curl http://localhost:8000/health\n# Should return: {"status":"A2A Web UI Backend is running"}\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Check Platform Service"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'curl http://localhost:8001/health\n# Should return: {"status":"healthy","service":"Platform Service"}\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Verify Frontend Configuration"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'curl http://localhost:8000/api/v1/config\n# Should include frontend_platform_server_url set to the Platform Service URL"\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Test Agent Builder"})," - Access the web UI and navigate to Agent Builder. You should be able to create and manage agents through the UI."]}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>a,x:()=>o});var t=i(6540);const s={},r=t.createContext(s);function a(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[5236],{4473:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"documentation/deploying/deployment-options","title":"Choosing Deployment Options","description":"Agent Mesh offers flexible deployment options designed to meet different operational requirements. Understanding these options helps you choose the right approach for your specific environment and scale needs.","source":"@site/docs/documentation/deploying/deployment-options.md","sourceDirName":"documentation/deploying","slug":"/documentation/deploying/deployment-options","permalink":"/solace-agent-mesh/docs/documentation/deploying/deployment-options","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/deploying/deployment-options.md","tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"title":"Choosing Deployment Options","sidebar_position":10},"sidebar":"docSidebar","previous":{"title":"Deploying Agent Mesh","permalink":"/solace-agent-mesh/docs/documentation/deploying/"},"next":{"title":"Kubernetes","permalink":"/solace-agent-mesh/docs/documentation/deploying/kubernetes/"}}');var s=t(4848),o=t(8453);const r={title:"Choosing Deployment Options",sidebar_position:10},a="Choosing Deployment Options",l={},c=[{value:"Development Environment",id:"development-environment",level:2},{value:"Production Environment",id:"production-environment",level:2},{value:"Deploying with Docker",id:"deploying-with-docker",level:3},{value:"Deploying with Kubernetes",id:"deploying-with-kubernetes",level:3},{value:"Separating and Scaling Components",id:"separating-and-scaling-components",level:3},{value:"Managing Storage Requirements",id:"managing-storage-requirements",level:3},{value:"Implementing Security Best Practices",id:"implementing-security-best-practices",level:3},{value:"Configuring Solace Event Broker",id:"configuring-solace-event-broker",level:3},{value:"Setting up Queue Templates",id:"setting-up-queue-templates",level:3}];function d(e){const n={a:"a",admonition:"admonition",br:"br",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"choosing-deployment-options",children:"Choosing Deployment Options"})}),"\n",(0,s.jsx)(n.p,{children:"Agent Mesh offers flexible deployment options designed to meet different operational requirements. Understanding these options helps you choose the right approach for your specific environment and scale needs."}),"\n",(0,s.jsx)(n.h2,{id:"development-environment",children:"Development Environment"}),"\n",(0,s.jsx)(n.p,{children:"During development, simplicity and rapid iteration are key priorities. The Agent Mesh CLI provides a streamlined way to run your entire project as a single application, making it easy to test changes and debug issues locally."}),"\n",(0,s.jsxs)(n.p,{children:["The development setup automatically loads environment variables from your configuration file (typically a ",(0,s.jsx)(n.code,{children:".env"})," file at the project root), eliminating the need for complex environment management:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sam run\n"})}),"\n",(0,s.jsx)(n.p,{children:"This command starts all configured components together, providing immediate feedback and allowing you to see how different agents interact within your mesh."}),"\n",(0,s.jsx)(n.h2,{id:"production-environment",children:"Production Environment"}),"\n",(0,s.jsx)(n.p,{children:"Production deployments require different considerations than development environments. You need reproducible builds, scalable infrastructure, and robust monitoring capabilities. Containerization addresses these requirements by providing consistent runtime environments and enabling modern orchestration platforms."}),"\n",(0,s.jsx)(n.p,{children:"We recommend using Docker for single-node deployments or Kubernetes for multi-node, scalable deployments. These technologies ensure your application runs consistently across different environments and can scale to meet demand."}),"\n",(0,s.jsx)(n.admonition,{title:"Platform Compatibility",type:"note",children:(0,s.jsxs)(n.p,{children:["If your host system architecture is not ",(0,s.jsx)(n.code,{children:"linux/amd64"}),", add the ",(0,s.jsx)(n.code,{children:"--platform linux/amd64"})," flag when you run the container to ensure compatibility with the pre-built images."]})}),"\n",(0,s.jsx)(n.h3,{id:"deploying-with-docker",children:"Deploying with Docker"}),"\n",(0,s.jsx)(n.p,{children:"Docker provides an excellent foundation for production deployments because it packages your application with all its dependencies into a portable container. This approach ensures consistent behavior across different environments and simplifies deployment processes."}),"\n",(0,s.jsx)(n.p,{children:"The following Dockerfile demonstrates how to containerize an Agent Mesh project:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-Dockerfile",children:'FROM solace/solace-agent-mesh:latest\nWORKDIR /app\n\n# Install Python dependencies\nCOPY ./requirements.txt /app/requirements.txt\nRUN python3.11 -m pip install --no-cache-dir -r /app/requirements.txt\n\n# Copy project files\nCOPY . /app\n\nCMD ["run", "--system-env"]\n\n# To run one specific component, use:\n# CMD ["run", "--system-env", "configs/agents/main_orchestrator.yaml"]\n\n'})}),"\n",(0,s.jsxs)(n.p,{children:["To optimize build performance and security, create a ",(0,s.jsx)(n.code,{children:".dockerignore"})," file that excludes unnecessary files from the Docker build context:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:".env\n*.log\ndist\n.git\n.vscode\n.DS_Store\n"})}),"\n",(0,s.jsx)(n.h3,{id:"deploying-with-kubernetes",children:"Deploying with Kubernetes"}),"\n",(0,s.jsx)(n.p,{children:"Kubernetes excels at managing containerized applications at scale, providing features like automatic scaling, rolling updates, and self-healing capabilities. When your Agent Mesh deployment needs to handle varying loads or requires high availability, Kubernetes becomes the preferred orchestration platform."}),"\n",(0,s.jsxs)(n.p,{children:["Agent Mesh provides Helm charts for Kubernetes deployments that handle resource management, scaling, and configuration. For prerequisites, Helm setup, and production configurations, see ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/deploying/kubernetes/",children:"Kubernetes"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"separating-and-scaling-components",children:"Separating and Scaling Components"}),"\n",(0,s.jsx)(n.p,{children:"A microservices approach to deployment offers significant advantages for production systems. By splitting your Agent Mesh components into separate containers, you achieve better fault isolation, independent scaling, and more granular resource management."}),"\n",(0,s.jsx)(n.p,{children:"This architectural pattern ensures that if one component experiences issues, the rest of your system continues operating normally. When the failed component restarts, it automatically rejoins the mesh through the Solace event broker, maintaining system resilience."}),"\n",(0,s.jsx)(n.p,{children:"To implement component separation:"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Reuse the same Docker image"}),": Your base container image remains consistent across all components, simplifying maintenance and ensuring compatibility."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Customize startup commands"}),": Each container runs only the components it needs by specifying different configuration files in the startup command."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Scale independently"}),": Components with higher resource demands or traffic can be scaled separately, optimizing resource utilization and cost."]}),"\n",(0,s.jsx)(n.p,{children:"For example, you might run your main orchestrator in one deployment while scaling your specialized tool agents in separate deployments based on demand."}),"\n",(0,s.jsx)(n.h3,{id:"managing-storage-requirements",children:"Managing Storage Requirements"}),"\n",(0,s.jsx)(n.p,{children:"When deploying multiple containers, shared storage becomes critical for maintaining consistency across your Agent Mesh deployment. All container instances must access the same storage location with identical configurations to ensure proper operation."}),"\n",(0,s.jsx)(n.admonition,{title:"Shared Storage Requirement",type:"warning",children:(0,s.jsx)(n.p,{children:"If using multiple containers, ensure all instances access the same storage with identical configurations. Inconsistent storage configurations can lead to data synchronization issues and unpredictable behavior."})}),"\n",(0,s.jsx)(n.p,{children:"Consider using persistent volumes in Kubernetes or shared file systems in Docker deployments to meet this requirement."}),"\n",(0,s.jsx)(n.h3,{id:"implementing-security-best-practices",children:"Implementing Security Best Practices"}),"\n",(0,s.jsx)(n.p,{children:"Production deployments require robust security measures to protect sensitive data and ensure system integrity. Implementing these practices helps safeguard your Agent Mesh deployment against common security threats."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Environment Variables and Secrets Management"}),": Never store sensitive information like API keys, passwords, or certificates in ",(0,s.jsx)(n.code,{children:".env"})," files or container images. Instead, use dedicated secret management solutions such as AWS Secrets Manager, HashiCorp Vault, or Kubernetes Secrets. These tools provide encryption at rest, access controls, and audit trails for sensitive data."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"TLS Encryption"}),": All communication channels should use TLS encryption to protect data in transit. This includes communication between Agent Mesh components and connections to the Solace event broker. TLS prevents eavesdropping and ensures data integrity during transmission."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Container Security"}),": Maintain security throughout your container lifecycle by regularly updating base images to include the latest security patches. Implement security scanning tools like Trivy or Clair in your CI/CD pipeline to identify vulnerabilities before deployment. Additionally, run containers with minimal privileges and avoid running processes as root when possible."]}),"\n",(0,s.jsx)(n.h3,{id:"configuring-solace-event-broker",children:"Configuring Solace Event Broker"}),"\n",(0,s.jsx)(n.p,{children:"The Solace event broker serves as the communication backbone for your agent mesh, handling all message routing and delivery between components. For production environments, using a Solace Cloud-managed event broker provides significant advantages over self-managed installations."}),"\n",(0,s.jsx)(n.p,{children:"Solace Cloud-managed event brokers offer built-in high availability, automatic scaling, security updates, and professional support. These managed services eliminate the operational overhead of maintaining event broker infrastructure while providing enterprise-grade reliability and performance."}),"\n",(0,s.jsxs)(n.p,{children:["For more information about cloud-managed options, see ",(0,s.jsx)(n.a,{href:"https://solace.com/products/event-broker/",children:"Solace Cloud"}),". For detailed configuration instructions, see ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/installing-and-configuring/configurations#event-broker-connection",children:"Configuring the Event Broker Connection"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"setting-up-queue-templates",children:"Setting up Queue Templates"}),"\n",(0,s.jsxs)(n.p,{children:["When the ",(0,s.jsx)(n.code,{children:"app.broker.temporary_queue"})," parameter is set to ",(0,s.jsx)(n.code,{children:"true"})," (default), the system uses ",(0,s.jsx)(n.a,{href:"https://docs.solace.com/Messaging/Guaranteed-Msg/Endpoints.htm#temporary-endpoints",children:"temporary endpoints"})," for A2A communication. Temporary queues are automatically created and deleted by the broker, which simplifies management and removes the need for manual cleanup. However, temporary queues do not support multiple client connections to the same queue, which may be limiting in scenarios where you run multiple instances of the same agent or need to start a new instance while an old one is still running."]}),"\n",(0,s.jsxs)(n.p,{children:["If you set ",(0,s.jsx)(n.code,{children:"temporary_queue"})," to ",(0,s.jsx)(n.code,{children:"false"}),", the system will create a durable queue for the client. Durable queues persist beyond the lifetime of a client connection, allowing multiple clients to connect to the same queue and ensuring messages are not lost if the client disconnects. However, this requires manual management of queues, including cleanup of unused ones."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["For production environments that are container-managed (for example, Kubernetes), we recommend setting ",(0,s.jsx)(n.code,{children:"temporary_queue"})," to ",(0,s.jsx)(n.code,{children:"false"})," by setting the environment variable ",(0,s.jsx)(n.code,{children:"USE_TEMPORARY_QUEUES=false"}),".",(0,s.jsx)(n.br,{}),"\n","Using temporary queues in these environments can cause startup issues, since a new container may fail to connect if the previous instance is still running and holding the queue. Durable queues avoid this by allowing multiple agent instances to share the same queue."]})}),"\n",(0,s.jsxs)(n.p,{children:["To prevent messages from piling up in a durable queue when an agent is not running, the queue should be configured with a message TTL (time-to-live) and the ",(0,s.jsx)(n.strong,{children:"Respect Message TTL"})," option enabled. To apply these settings automatically for all new queues, you can create a ",(0,s.jsx)(n.a,{href:"https://docs.solace.com/Messaging/Guaranteed-Msg/Configuring-Endpoint-Templates.htm",children:"Queue Template"})," for your Solace Agent Mesh clients."]}),"\n",(0,s.jsx)(n.p,{children:"To create a queue template in the Solace Cloud Console:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Navigate to ",(0,s.jsx)(n.strong,{children:"Message VPNs"})," and select your VPN."]}),"\n",(0,s.jsxs)(n.li,{children:["Go to the ",(0,s.jsx)(n.strong,{children:"Queues"})," page."]}),"\n",(0,s.jsxs)(n.li,{children:["Open the ",(0,s.jsx)(n.strong,{children:"Templates"})," tab."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"+ Queue Template"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Use the following settings for the template:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Queue Name Filter"})," = ",(0,s.jsx)(n.code,{children:"{NAMESPACE}/>"}),(0,s.jsx)(n.br,{}),"\n","(Replace ",(0,s.jsx)(n.code,{children:"{NAMESPACE}"})," with the namespace defined in your configuration, for example, ",(0,s.jsx)(n.code,{children:"sam/"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Respect TTL"})," = ",(0,s.jsx)(n.code,{children:"true"}),(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.em,{children:"(Under: Advanced Settings > Message Expiry)"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Maximum TTL (sec)"})," = ",(0,s.jsx)(n.code,{children:"18000"}),(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.em,{children:"(Under: Advanced Settings > Message Expiry)"})]}),"\n"]}),"\n",(0,s.jsxs)(n.admonition,{type:"info",children:[(0,s.jsxs)(n.p,{children:["Queue templates are only applied when a new queue is created from the messaging client.",(0,s.jsx)(n.br,{}),"\n","If you have already been running SAM with ",(0,s.jsx)(n.code,{children:"temporary_queue"})," set to ",(0,s.jsx)(n.code,{children:"false"}),", your durable queues were created before the template existed.",(0,s.jsx)(n.br,{}),"\n","To apply TTL settings to those queues, either:"]}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Enable ",(0,s.jsx)(n.strong,{children:"TTL"})," and ",(0,s.jsx)(n.strong,{children:"Respect TTL"})," manually in the Solace console on each queue, or"]}),"\n",(0,s.jsx)(n.li,{children:"Delete the existing queues and restart SAM to have them recreated automatically using the new template."}),"\n"]})]})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var i=t(6540);const s={},o=i.createContext(s);function r(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[3870],{6247:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"documentation/installing-and-configuring/artifact-storage","title":"Artifact Storage","description":"This guide explains how to configure storage for artifacts\u2014files and data created by your agents\u2014from development to production deployments.","source":"@site/docs/documentation/installing-and-configuring/artifact-storage.md","sourceDirName":"documentation/installing-and-configuring","slug":"/documentation/installing-and-configuring/artifact-storage","permalink":"/solace-agent-mesh/docs/documentation/installing-and-configuring/artifact-storage","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/installing-and-configuring/artifact-storage.md","tags":[],"version":"current","sidebarPosition":360,"frontMatter":{"title":"Artifact Storage","sidebar_position":360},"sidebar":"docSidebar","previous":{"title":"Session Storage","permalink":"/solace-agent-mesh/docs/documentation/installing-and-configuring/session-storage"},"next":{"title":"Developing with Agent Mesh","permalink":"/solace-agent-mesh/docs/documentation/developing/"}}');var t=s(4848),r=s(8453);const a={title:"Artifact Storage",sidebar_position:360},c="Configuring Artifact Storage",o={},l=[{value:"Understanding Artifacts",id:"understanding-artifacts",level:2},{value:"Artifact Storage vs Session Storage",id:"artifact-storage-vs-session-storage",level:3},{value:"Artifact Scoping",id:"artifact-scoping",level:2},{value:"Scope Types",id:"scope-types",level:3},{value:"Namespace Scope (Default)",id:"namespace-scope-default",level:3},{value:"App Scope",id:"app-scope",level:3},{value:"Custom Scope",id:"custom-scope",level:3},{value:"Artifact Storage Backends",id:"artifact-storage-backends",level:2},{value:"Filesystem Storage (Default)",id:"filesystem-storage-default",level:3},{value:"S3 (AWS)",id:"s3-aws",level:3},{value:"S3-Compatible API Endpoint",id:"s3-compatible-api-endpoint",level:3},{value:"Google Cloud Storage (GCS)",id:"google-cloud-storage-gcs",level:3},{value:"Understanding Artifact Versioning",id:"understanding-artifact-versioning",level:2},{value:"Configuring Artifact Storage",id:"configuring-artifact-storage-1",level:2},{value:"Development Setup",id:"development-setup",level:3},{value:"AWS Production Deployment",id:"aws-production-deployment",level:3},{value:"On-Premises or Private Cloud",id:"on-premises-or-private-cloud",level:3},{value:"Google Cloud Deployment",id:"google-cloud-deployment",level:3},{value:"Migrating Artifact Storage Backends",id:"migrating-artifact-storage-backends",level:2},{value:"Before Migration",id:"before-migration",level:3},{value:"Migration Steps",id:"migration-steps",level:3},{value:"Data Retention for Artifacts",id:"data-retention-for-artifacts",level:2},{value:"Troubleshooting",id:"troubleshooting",level:2},{value:"Backend Connectivity Issues",id:"backend-connectivity-issues",level:3},{value:"Authentication Errors",id:"authentication-errors",level:3},{value:"Artifact Not Found",id:"artifact-not-found",level:3},{value:"Performance Issues",id:"performance-issues",level:3},{value:"Next Steps",id:"next-steps",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"configuring-artifact-storage",children:"Configuring Artifact Storage"})}),"\n",(0,t.jsx)(n.p,{children:"This guide explains how to configure storage for artifacts\u2014files and data created by your agents\u2014from development to production deployments."}),"\n",(0,t.jsx)(n.h2,{id:"understanding-artifacts",children:"Understanding Artifacts"}),"\n",(0,t.jsx)(n.p,{children:"Artifacts are files and data created by agents during task execution. Examples include generated reports, analysis results, processed documents, or any files that agents produce for users. Agent Mesh provides built-in tools for agents to create, manage, and reference artifacts."}),"\n",(0,t.jsx)(n.p,{children:"Key characteristics:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Automatic versioning: Each time an artifact is updated, a new version is created (v0, v1, v2, etc.)"}),"\n",(0,t.jsx)(n.li,{children:"User-scoped: Artifacts belong to specific users and sessions"}),"\n",(0,t.jsx)(n.li,{children:"Retrievable: Users can access, download, and view artifact history"}),"\n",(0,t.jsx)(n.li,{children:"Tool-driven: Agents use built-in tools to create and manage artifacts"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"artifact-storage-vs-session-storage",children:"Artifact Storage vs Session Storage"}),"\n",(0,t.jsx)(n.p,{children:"Unlike session storage (which is separate for WebUI Gateway and each agent), artifact storage is shared across all agents and gateways in your deployment."}),"\n",(0,t.jsx)(n.p,{children:"How it works:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"All agents and gateways connect to the same artifact storage backend"}),"\n",(0,t.jsxs)(n.li,{children:["Artifacts are scoped by ",(0,t.jsx)(n.code,{children:"(user_id, session_id, app_name)"})," to maintain isolation"]}),"\n",(0,t.jsx)(n.li,{children:"Any agent or gateway can access artifacts within their scope"}),"\n",(0,t.jsx)(n.li,{children:"This allows agents to share files and data within a conversation"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Example:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'# WebUI Gateway and all agents share this artifact storage\nartifact_service:\n type: "s3"\n bucket_name: "shared-artifacts-bucket"\n region: "us-west-2"\n'})}),"\n",(0,t.jsx)(n.p,{children:"Contrast with session storage:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Session storage: Each agent has its own separate database"}),"\n",(0,t.jsx)(n.li,{children:"Artifact storage: All agents and gateways share the same storage backend"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["For session storage configuration, see ",(0,t.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/installing-and-configuring/session-storage",children:"Session Storage"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"artifact-scoping",children:"Artifact Scoping"}),"\n",(0,t.jsx)(n.p,{children:"Artifact scoping controls how artifacts are organized and isolated within your storage backend. This determines which components can access which artifacts."}),"\n",(0,t.jsx)(n.h3,{id:"scope-types",children:"Scope Types"}),"\n",(0,t.jsx)(n.p,{children:"Agent Mesh supports three artifact scope types:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Scope Type"}),(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Use Case"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"namespace"})}),(0,t.jsx)(n.td,{children:"Artifacts scoped to namespace"}),(0,t.jsx)(n.td,{children:"Default; isolates artifacts by namespace"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"app"})}),(0,t.jsx)(n.td,{children:"Artifacts scoped to application instance"}),(0,t.jsx)(n.td,{children:"Isolates artifacts per agent/gateway"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"custom"})}),(0,t.jsx)(n.td,{children:"Custom scope identifier"}),(0,t.jsx)(n.td,{children:"Advanced use cases requiring custom isolation"})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"namespace-scope-default",children:"Namespace Scope (Default)"}),"\n",(0,t.jsx)(n.p,{children:"Artifacts are organized by namespace, allowing all agents and gateways within the same namespace to share artifacts:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'artifact_service:\n type: "filesystem"\n base_path: "/tmp/artifacts"\n artifact_scope: "namespace" # Default\n'})}),"\n",(0,t.jsx)(n.h3,{id:"app-scope",children:"App Scope"}),"\n",(0,t.jsx)(n.p,{children:"Artifacts are isolated per application instance, preventing sharing between different agents or gateways:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'artifact_service:\n type: "filesystem"\n base_path: "/tmp/artifacts"\n artifact_scope: "app"\n'})}),"\n",(0,t.jsx)(n.h3,{id:"custom-scope",children:"Custom Scope"}),"\n",(0,t.jsx)(n.p,{children:"For advanced scenarios requiring custom isolation logic:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'artifact_service:\n type: "filesystem"\n base_path: "/tmp/artifacts"\n artifact_scope: "custom"\n artifact_scope_value: "my-custom-scope"\n'})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Use Cases for Custom Scope:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Multi-tenant deployments with custom tenant identifiers"}),"\n",(0,t.jsx)(n.li,{children:"Departmental isolation within an organization"}),"\n",(0,t.jsx)(n.li,{children:"Environment-specific artifact separation (dev/staging/prod)"}),"\n",(0,t.jsx)(n.li,{children:"Custom compliance or regulatory requirements"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"artifact-storage-backends",children:"Artifact Storage Backends"}),"\n",(0,t.jsx)(n.p,{children:"Agent Mesh supports multiple storage backends for artifacts. Choose based on your deployment environment and requirements."}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Backend"}),(0,t.jsx)(n.th,{children:"Best For"}),(0,t.jsx)(n.th,{children:"Production Ready"}),(0,t.jsx)(n.th,{children:"Setup Complexity"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Filesystem"}),(0,t.jsx)(n.td,{children:"Local development"}),(0,t.jsx)(n.td,{children:"\u274c"}),(0,t.jsx)(n.td,{children:"Simple"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"S3 (AWS)"}),(0,t.jsx)(n.td,{children:"AWS deployments"}),(0,t.jsx)(n.td,{children:"\u2705"}),(0,t.jsx)(n.td,{children:"Medium"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"S3-Compatible API"}),(0,t.jsx)(n.td,{children:"On-premises, private cloud"}),(0,t.jsx)(n.td,{children:"\u2705"}),(0,t.jsx)(n.td,{children:"Medium"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"GCS"}),(0,t.jsx)(n.td,{children:"Google Cloud deployments"}),(0,t.jsx)(n.td,{children:"\u2705"}),(0,t.jsx)(n.td,{children:"Medium"})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"filesystem-storage-default",children:"Filesystem Storage (Default)"}),"\n",(0,t.jsx)(n.p,{children:"Filesystem storage saves artifacts to local disk directories. This is the default configuration and is suitable for development and local testing."}),"\n",(0,t.jsx)(n.p,{children:"Characteristics:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Artifacts stored in transparent directory structure"}),"\n",(0,t.jsx)(n.li,{children:"Data persists across restarts"}),"\n",(0,t.jsx)(n.li,{children:"Single instance only (not shared across pods)"}),"\n",(0,t.jsx)(n.li,{children:"Simple backup (copy directories)"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Use only for local development and single-machine deployments."}),"\n",(0,t.jsx)(n.p,{children:"Configuration:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'artifact_service:\n type: "filesystem"\n base_path: "/tmp/sam-artifacts"\n'})}),"\n",(0,t.jsx)(n.p,{children:"Storage structure:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"/tmp/sam-artifacts/\n\u251c\u2500\u2500 app-name/\n\u2502 \u2514\u2500\u2500 user-id/\n\u2502 \u251c\u2500\u2500 session-id/\n\u2502 \u2502 \u251c\u2500\u2500 report.pdf/\n\u2502 \u2502 \u2502 \u251c\u2500\u2500 0 (version 0 data)\n\u2502 \u2502 \u2502 \u251c\u2500\u2500 0.metadata (version 0 metadata)\n\u2502 \u2502 \u2502 \u251c\u2500\u2500 1 (version 1 data)\n\u2502 \u2502 \u2502 \u2514\u2500\u2500 1.metadata\n\u2502 \u2502 \u2514\u2500\u2500 data.csv/\n\u2502 \u2502 \u251c\u2500\u2500 0\n\u2502 \u2502 \u2514\u2500\u2500 0.metadata\n\u2502 \u2514\u2500\u2500 user/ (user-scoped artifacts)\n\u2502 \u2514\u2500\u2500 config.json/\n\u2502 \u251c\u2500\u2500 0\n\u2502 \u2514\u2500\u2500 0.metadata\n"})}),"\n",(0,t.jsx)(n.h3,{id:"s3-aws",children:"S3 (AWS)"}),"\n",(0,t.jsx)(n.p,{children:"S3 storage uses Amazon S3 for artifact persistence. This is the recommended production backend for AWS deployments."}),"\n",(0,t.jsx)(n.p,{children:"Characteristics:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Highly durable"}),"\n",(0,t.jsx)(n.li,{children:"Scalable to any size"}),"\n",(0,t.jsx)(n.li,{children:"Access from any location"}),"\n",(0,t.jsx)(n.li,{children:"Automatic backups and redundancy"}),"\n",(0,t.jsx)(n.li,{children:"IAM-based security"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Configuration:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'artifact_service:\n type: "s3"\n bucket_name: "my-artifacts-bucket"\n region: "us-west-2"\n'})}),"\n",(0,t.jsx)(n.p,{children:"Environment variables:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'export AWS_ACCESS_KEY_ID="your-access-key"\nexport AWS_SECRET_ACCESS_KEY="your-secret-key"\nexport AWS_REGION="us-west-2"\n'})}),"\n",(0,t.jsx)(n.p,{children:"IAM permissions required:"}),"\n",(0,t.jsx)(n.p,{children:"The credentials must have these permissions for the bucket:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"s3:GetObject"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"s3:PutObject"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"s3:DeleteObject"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"s3:ListBucket"})}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Example IAM policy:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "Version": "2012-10-17",\n "Statement": [\n {\n "Effect": "Allow",\n "Action": [\n "s3:GetObject",\n "s3:PutObject",\n "s3:DeleteObject",\n "s3:ListBucket"\n ],\n "Resource": [\n "arn:aws:s3:::my-artifacts-bucket",\n "arn:aws:s3:::my-artifacts-bucket/*"\n ]\n }\n ]\n}\n'})}),"\n",(0,t.jsx)(n.h3,{id:"s3-compatible-api-endpoint",children:"S3-Compatible API Endpoint"}),"\n",(0,t.jsx)(n.p,{children:"S3-compatible storage allows any storage service that implements the S3 API to work with Agent Mesh. This includes on-premises solutions and services from cloud providers other than AWS."}),"\n",(0,t.jsx)(n.p,{children:"Characteristics:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Works with any S3-compatible API implementation"}),"\n",(0,t.jsx)(n.li,{children:"Custom endpoints for private or on-premises storage"}),"\n",(0,t.jsx)(n.li,{children:"Same versioning and management as AWS S3"}),"\n",(0,t.jsx)(n.li,{children:"Requires compatible storage service"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Configuration:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'artifact_service:\n type: "s3"\n bucket_name: "my-artifacts-bucket"\n endpoint_url: "${S3_ENDPOINT_URL}"\n'})}),"\n",(0,t.jsx)(n.p,{children:"Environment variables:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'export S3_ENDPOINT_URL="https://storage.example.com"\nexport S3_ACCESS_KEY_ID="your-access-key"\nexport S3_SECRET_ACCESS_KEY="your-secret-key"\nexport AWS_REGION="us-east-1" # Required but can be arbitrary for S3-compatible endpoints\n'})}),"\n",(0,t.jsx)(n.p,{children:"Supported services:"}),"\n",(0,t.jsx)(n.p,{children:"This configuration works with any S3-compatible storage service, including self-hosted and cloud-provider solutions. Examples include storage services from various cloud providers and on-premises object storage systems."}),"\n",(0,t.jsx)(n.h3,{id:"google-cloud-storage-gcs",children:"Google Cloud Storage (GCS)"}),"\n",(0,t.jsx)(n.p,{children:"GCS storage uses Google Cloud Storage for artifact persistence. This is the recommended backend for Google Cloud deployments."}),"\n",(0,t.jsx)(n.p,{children:"Characteristics:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"High availability and durability"}),"\n",(0,t.jsx)(n.li,{children:"Integration with Google Cloud ecosystem"}),"\n",(0,t.jsx)(n.li,{children:"Scalable and managed by Google"}),"\n",(0,t.jsx)(n.li,{children:"Fine-grained IAM controls"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Configuration:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'artifact_service:\n type: "gcs"\n bucket_name: "my-artifacts-bucket"\n'})}),"\n",(0,t.jsx)(n.p,{children:"Authentication:"}),"\n",(0,t.jsx)(n.p,{children:"GCS authentication uses Google Cloud Application Default Credentials. Set up via:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"\n'})}),"\n",(0,t.jsx)(n.p,{children:"Or configure via environment variables if you use workload identity in Kubernetes."}),"\n",(0,t.jsx)(n.p,{children:"Permissions required:"}),"\n",(0,t.jsx)(n.p,{children:"The service account must have these roles on the bucket:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"roles/storage.objectViewer"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"roles/storage.objectCreator"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"roles/storage.objectDeleter"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"understanding-artifact-versioning",children:"Understanding Artifact Versioning"}),"\n",(0,t.jsx)(n.p,{children:"Agent Mesh automatically manages artifact versions, allowing users to access previous versions of files."}),"\n",(0,t.jsx)(n.p,{children:"How versioning works:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"First artifact create: version 0"}),"\n",(0,t.jsx)(n.li,{children:"Append or update: version 1 (automatic increment)"}),"\n",(0,t.jsx)(n.li,{children:"Continue appending: version 2, 3, 4, etc."}),"\n",(0,t.jsx)(n.li,{children:"Versions persist independently"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Example lifecycle:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"Agent creates report.pdf\n \u2192 version 0 created\n\nAgent appends more data to report.pdf\n \u2192 version 1 created (v0 still exists)\n\nAgent appends additional data\n \u2192 version 2 created (v0 and v1 still exist)\n\nUser can access any version:\n- Latest version (automatic)\n- Specific version (v0, v1, v2)\n- Version history (list all versions)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Metadata:"}),"\n",(0,t.jsx)(n.p,{children:"Each artifact version includes metadata:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "filename": "report.pdf",\n "mime_type": "application/pdf",\n "version": 0,\n "size_bytes": 2048,\n "timestamp": "2024-10-29T12:34:56Z"\n}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"configuring-artifact-storage-1",children:"Configuring Artifact Storage"}),"\n",(0,t.jsx)(n.p,{children:"Choose your artifact storage backend based on your deployment environment."}),"\n",(0,t.jsx)(n.h3,{id:"development-setup",children:"Development Setup"}),"\n",(0,t.jsx)(n.p,{children:"For local development and testing, use filesystem storage:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'artifact_service:\n type: "filesystem"\n base_path: "/tmp/sam-artifacts"\n'})}),"\n",(0,t.jsx)(n.p,{children:"Create the base directory if it doesn't exist:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"mkdir -p /tmp/sam-artifacts\n"})}),"\n",(0,t.jsx)(n.h3,{id:"aws-production-deployment",children:"AWS Production Deployment"}),"\n",(0,t.jsx)(n.p,{children:"For production deployments on AWS:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Create S3 Bucket:"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"aws s3 mb s3://my-artifacts-bucket --region us-west-2\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Configure IAM User or Role"})," with required permissions (see IAM Policy above)"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Configure Agent Mesh:"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'artifact_service:\n type: "s3"\n bucket_name: "my-artifacts-bucket"\n region: "us-west-2"\n'})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Set Environment Variables:"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'export AWS_ACCESS_KEY_ID="your-key"\nexport AWS_SECRET_ACCESS_KEY="your-secret"\nexport AWS_REGION="us-west-2"\n'})}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"on-premises-or-private-cloud",children:"On-Premises or Private Cloud"}),"\n",(0,t.jsx)(n.p,{children:"For on-premises deployments using S3-compatible storage:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Set Up S3-Compatible Storage"})," (ensure it's running and accessible)"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Create Bucket:"})," Use your storage system's administration tools"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Configure Agent Mesh:"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'artifact_service:\n type: "s3"\n bucket_name: "my-bucket"\n endpoint_url: "${S3_ENDPOINT_URL}"\n'})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Set Environment Variables:"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'export S3_ENDPOINT_URL="https://storage.example.com:9000"\nexport S3_ACCESS_KEY_ID="your-access-key"\nexport S3_SECRET_ACCESS_KEY="your-secret-key"\nexport AWS_REGION="us-east-1"\n'})}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"google-cloud-deployment",children:"Google Cloud Deployment"}),"\n",(0,t.jsx)(n.p,{children:"For production deployments on Google Cloud:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Create GCS Bucket:"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"gsutil mb gs://my-artifacts-bucket\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Set Up Service Account with required permissions"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Configure Agent Mesh:"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'artifact_service:\n type: "gcs"\n bucket_name: "my-artifacts-bucket"\n'})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Set Up Authentication:"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"\n'})}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"migrating-artifact-storage-backends",children:"Migrating Artifact Storage Backends"}),"\n",(0,t.jsx)(n.p,{children:"Moving from one artifact storage backend to another requires no special migration procedure\u2014the system starts fresh with the new backend."}),"\n",(0,t.jsx)(n.h3,{id:"before-migration",children:"Before Migration"}),"\n",(0,t.jsx)(n.p,{children:"Understand the implications:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Existing artifacts stored in the old backend will not be accessible after switching"}),"\n",(0,t.jsx)(n.li,{children:"New artifacts will be stored in the new backend"}),"\n",(0,t.jsx)(n.li,{children:"If you need to preserve existing artifacts, export them first from the old storage"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"migration-steps",children:"Migration Steps"}),"\n",(0,t.jsx)(n.p,{children:"Step 1: Set up new storage backend"}),"\n",(0,t.jsx)(n.p,{children:"Create the new storage location:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["For filesystem: ",(0,t.jsx)(n.code,{children:"mkdir -p /path/to/new/storage"})]}),"\n",(0,t.jsx)(n.li,{children:"For S3: Create bucket and set up credentials"}),"\n",(0,t.jsx)(n.li,{children:"For GCS: Create bucket and set up service account"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Step 2: Update configuration"}),"\n",(0,t.jsx)(n.p,{children:"Update your artifact service configuration:"}),"\n",(0,t.jsx)(n.p,{children:"From:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'artifact_service:\n type: "filesystem"\n base_path: "/old/path"\n'})}),"\n",(0,t.jsx)(n.p,{children:"To:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'artifact_service:\n type: "s3"\n bucket_name: "my-bucket"\n region: "us-west-2"\n'})}),"\n",(0,t.jsx)(n.p,{children:"Step 3: Set environment variables"}),"\n",(0,t.jsx)(n.p,{children:"Configure credentials for the new backend:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'export AWS_ACCESS_KEY_ID="your-key"\nexport AWS_SECRET_ACCESS_KEY="your-secret"\nexport AWS_REGION="us-west-2"\n'})}),"\n",(0,t.jsx)(n.p,{children:"Step 4: Restart application"}),"\n",(0,t.jsx)(n.p,{children:"When the application restarts, it will use the new backend for all subsequent artifact operations."}),"\n",(0,t.jsx)(n.p,{children:"Step 5: Verify"}),"\n",(0,t.jsx)(n.p,{children:"Test artifact creation and retrieval:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Create a new artifact"}),"\n",(0,t.jsx)(n.li,{children:"Verify it appears in the new storage backend"}),"\n",(0,t.jsx)(n.li,{children:"Retrieve it through the API or agent tools"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"data-retention-for-artifacts",children:"Data Retention for Artifacts"}),"\n",(0,t.jsx)(n.p,{children:"Like session data, artifact storage can be configured with automatic cleanup policies."}),"\n",(0,t.jsx)(n.p,{children:"Configuration:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"data_retention:\n enabled: true\n task_retention_days: 90\n cleanup_interval_hours: 24\n"})}),"\n",(0,t.jsx)(n.p,{children:"How it works:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Artifacts older than ",(0,t.jsx)(n.code,{children:"task_retention_days"})," may be cleaned up"]}),"\n",(0,t.jsxs)(n.li,{children:["Cleanup runs every ",(0,t.jsx)(n.code,{children:"cleanup_interval_hours"})]}),"\n",(0,t.jsx)(n.li,{children:"Prevents unbounded storage growth"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Check your specific artifact storage backend documentation for retention policies and best practices."}),"\n",(0,t.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,t.jsx)(n.h3,{id:"backend-connectivity-issues",children:"Backend Connectivity Issues"}),"\n",(0,t.jsxs)(n.p,{children:["Error: ",(0,t.jsx)(n.code,{children:"Failed to access storage"})," or ",(0,t.jsx)(n.code,{children:"Connection refused"})]}),"\n",(0,t.jsx)(n.p,{children:"Solutions:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Verify storage backend is running and accessible"}),"\n",(0,t.jsx)(n.li,{children:"Check network connectivity and firewall rules"}),"\n",(0,t.jsx)(n.li,{children:"Verify endpoint URL is correct (for S3-compatible)"}),"\n",(0,t.jsx)(n.li,{children:"Check credentials and permissions"}),"\n",(0,t.jsx)(n.li,{children:"Review application logs for detailed errors"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"authentication-errors",children:"Authentication Errors"}),"\n",(0,t.jsxs)(n.p,{children:["Error: ",(0,t.jsx)(n.code,{children:"Access Denied"})," or ",(0,t.jsx)(n.code,{children:"Unauthorized"})]}),"\n",(0,t.jsx)(n.p,{children:"Solutions:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Verify AWS/GCS credentials are correct"}),"\n",(0,t.jsx)(n.li,{children:"Confirm IAM/service account has required permissions"}),"\n",(0,t.jsx)(n.li,{children:"Check that credentials are set in environment variables"}),"\n",(0,t.jsx)(n.li,{children:"Verify bucket name is correct and matches configuration"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"artifact-not-found",children:"Artifact Not Found"}),"\n",(0,t.jsxs)(n.p,{children:["Error: ",(0,t.jsx)(n.code,{children:"404 Not Found"})," when retrieving artifact"]}),"\n",(0,t.jsx)(n.p,{children:"Solutions:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Verify artifact was successfully created"}),"\n",(0,t.jsx)(n.li,{children:"Check that session ID is correct"}),"\n",(0,t.jsx)(n.li,{children:"Confirm storage backend has the artifact"}),"\n",(0,t.jsx)(n.li,{children:"Verify you're accessing the correct version"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"performance-issues",children:"Performance Issues"}),"\n",(0,t.jsx)(n.p,{children:"Slow artifact creation or retrieval:"}),"\n",(0,t.jsx)(n.p,{children:"Solutions:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Check network latency to storage backend"}),"\n",(0,t.jsx)(n.li,{children:"Verify storage backend performance"}),"\n",(0,t.jsx)(n.li,{children:"Check for throttling or rate limiting"}),"\n",(0,t.jsx)(n.li,{children:"Consider object size and any upload/download limits"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"next-steps",children:"Next Steps"}),"\n",(0,t.jsx)(n.p,{children:"After configuring artifact storage, you may want to:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Configure ",(0,t.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/installing-and-configuring/session-storage",children:"Session Storage"})," for conversation persistence"]}),"\n",(0,t.jsxs)(n.li,{children:["Explore ",(0,t.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/developing/create-agents",children:"agent tools"})," for working with artifacts"]}),"\n",(0,t.jsxs)(n.li,{children:["Review ",(0,t.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/deploying/deployment-options",children:"deployment options"})," for production considerations"]}),"\n",(0,t.jsxs)(n.li,{children:["Set up ",(0,t.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/deploying/observability",children:"monitoring and observability"})," to track artifact activity"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>c});var i=s(6540);const t={},r=i.createContext(t);function a(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[3243],{6009:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>g,frontMatter:()=>l,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"documentation/deploying/logging","title":"Logging","description":"This guide covers the essential information you need to effectively configure and manage logging in your Agent Mesh applications. Proper logging configuration is critical for troubleshooting issues, monitoring system behavior, and maintaining reliable production deployments.","source":"@site/docs/documentation/deploying/logging.md","sourceDirName":"documentation/deploying","slug":"/documentation/deploying/logging","permalink":"/solace-agent-mesh/docs/documentation/deploying/logging","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/deploying/logging.md","tags":[],"version":"current","sidebarPosition":35,"frontMatter":{"title":"Logging","sidebar_position":35},"sidebar":"docSidebar","previous":{"title":"Diagnosing and Resolving Problems","permalink":"/solace-agent-mesh/docs/documentation/deploying/debugging"},"next":{"title":"Proxy Configuration","permalink":"/solace-agent-mesh/docs/documentation/deploying/proxy_configuration"}}');var t=o(4848),s=o(8453);const l={title:"Logging",sidebar_position:35},r="Logging",a={},d=[{value:"Configuration",id:"configuration",level:2},{value:"Simple Logging Configuration",id:"simple-logging-configuration",level:2},{value:"Advanced Logging Configuration",id:"advanced-logging-configuration",level:2},{value:"Loggers",id:"loggers",level:3},{value:"Handlers",id:"handlers",level:3},{value:"Formatters",id:"formatters",level:3},{value:"Understanding Effective Log Levels",id:"understanding-effective-log-levels",level:3},{value:"Environment Variable Substitution",id:"env-var-substitution",level:2},{value:"Common Configuration Scenarios",id:"common-configuration-scenarios",level:2},{value:"Structured Logging",id:"structured-logging",level:3},{value:"1- Enable JSON Formatter",id:"1--enable-json-formatter",level:4},{value:"2- Configure Contextual Info (Optional)",id:"2--configure-contextual-info-optional",level:4},{value:"Customizing Log Levels",id:"customizing-log-levels",level:3},{value:"Agent-Specific Log File",id:"agent-specific-log-file",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"logging",children:"Logging"})}),"\n",(0,t.jsx)(n.p,{children:"This guide covers the essential information you need to effectively configure and manage logging in your Agent Mesh applications. Proper logging configuration is critical for troubleshooting issues, monitoring system behavior, and maintaining reliable production deployments."}),"\n",(0,t.jsxs)(n.p,{children:["Agent Mesh uses ",(0,t.jsx)(n.a,{href:"https://docs.python.org/3/library/logging.html",children:"Python's built-in logging module"})," to provide flexible and powerful logging capabilities."]}),"\n",(0,t.jsx)(n.p,{children:"This approach provides several advantages:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Centralized Control"}),": Single configuration file manages logging for all components"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Python Native"}),": Built on Python's standard ",(0,t.jsx)(n.code,{children:"logging"})," module"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Flexible and Powerful"}),": Full access to Python's logging capabilities"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Production-Ready"}),": Industry-standard approach used by many Python applications"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,t.jsxs)(n.p,{children:["Agent Mesh supports logging configuration as either a YAML or JSON file. Both formats leverage Python's ",(0,t.jsx)(n.a,{href:"https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig",children:"dictConfig"})," method for advanced logging features."]}),"\n",(0,t.jsxs)(n.p,{children:["To provide a logging configuration, set the ",(0,t.jsx)(n.code,{children:"LOGGING_CONFIG_PATH=path/to/logging_config.yaml"})," environment variable in your ",(0,t.jsx)(n.code,{children:".env"})," file or with the ",(0,t.jsx)(n.code,{children:"export"})," command."]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["While the INI format using Python's ",(0,t.jsx)(n.code,{children:"fileConfig()"})," is still supported by Agent Mesh, it is not recommended due to ",(0,t.jsx)(n.a,{href:"https://docs.python.org/3/library/logging.config.html#configuration-file-format",children:"its limitations"})," compared to YAML and JSON formats."]})}),"\n",(0,t.jsx)(n.h2,{id:"simple-logging-configuration",children:"Simple Logging Configuration"}),"\n",(0,t.jsx)(n.p,{children:"While individual agent and gateway YAML files may contain a log section similar to the example below:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"log:\n stdout_log_level: INFO\n log_file_level: INFO\n log_file: my-agent.log\n"})}),"\n",(0,t.jsxs)(n.p,{children:["When using the simple ",(0,t.jsx)(n.code,{children:"log:"})," section in agent or gateway configuration files, the following fields are available:"]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Field"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Required"}),(0,t.jsx)(n.th,{children:"Default"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"stdout_log_level"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"Yes"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"INFO"})}),(0,t.jsxs)(n.td,{children:["Logging level for console output. Valid values: ",(0,t.jsx)(n.code,{children:"DEBUG"}),", ",(0,t.jsx)(n.code,{children:"INFO"}),", ",(0,t.jsx)(n.code,{children:"WARNING"}),", ",(0,t.jsx)(n.code,{children:"ERROR"}),", ",(0,t.jsx)(n.code,{children:"CRITICAL"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"log_file_level"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"No"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"INFO"})}),(0,t.jsxs)(n.td,{children:["Logging level for file output. Typically set to ",(0,t.jsx)(n.code,{children:"DEBUG"})," for detailed troubleshooting"]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"log_file"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"No"}),(0,t.jsx)(n.td,{children:"None"}),(0,t.jsxs)(n.td,{children:["Path to the log file. If not specified, file logging is disabled. Examples: ",(0,t.jsx)(n.code,{children:"agent.log"}),", ",(0,t.jsx)(n.code,{children:"/var/log/sam/agent.log"})]})]})]})]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["using a dedicated logging configuration file (YAML, JSON) is the recommended approach. The simple ",(0,t.jsx)(n.code,{children:"log:"})," section configuration has lower precedence and will only be active when a dedicated logging configuration file is not provided."]})}),"\n",(0,t.jsx)(n.h2,{id:"advanced-logging-configuration",children:"Advanced Logging Configuration"}),"\n",(0,t.jsxs)(n.p,{children:["When you run ",(0,t.jsx)(n.code,{children:"sam init"}),", Agent Mesh automatically generates a ",(0,t.jsx)(n.code,{children:"configs/logging_config.yaml"})," file in your project directory. This file establishes sensible defaults while remaining easy to customize for your specific needs."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'# Python logging configuration version (always 1)\nversion: 1\n\n# Don\'t disable existing loggers when this config is loaded\ndisable_existing_loggers: false\n\n# Formatters control the structure and appearance of log messages\nformatters:\n # Simple human-readable format\n simpleFormatter:\n format: "%(asctime)s | %(levelname)-5s | %(threadName)s | %(name)s | %(message)s"\n\n # Colored simple human-readable format \n coloredFormatter:\n class: solace_ai_connector.logging.ColoredFormatter\n format: "%(asctime)s | %(levelname)-5s | %(threadName)s | %(name)s | %(message)s"\n \n # JSON format for structured logging\n jsonFormatter:\n "()": pythonjsonlogger.json.JsonFormatter # The python-json-logger package is used for JSON formatting\n format: "%(timestamp)s %(levelname)s %(threadName)s %(name)s %(message)s"\n timestamp: "timestamp" # Generates ISO 8601-formatted timestamps for %(timestamp)s placeholder\n\n# Handlers determine where log messages go\nhandlers:\n # Stream handler - outputs logs to console (stdout)\n streamHandler:\n class: logging.StreamHandler\n formatter: coloredFormatter\n stream: "ext://sys.stdout"\n \n # Rotating file handler - writes to log files with automatic rotation\n rotatingFileHandler:\n class: logging.handlers.RotatingFileHandler\n formatter: simpleFormatter\n filename: ${LOGGING_FILE_NAME, sam.log}\n mode: a # Append mode - don\'t overwrite existing logs\n maxBytes: 52428800 # 50 MB - rotate when file reaches this size\n backupCount: 10 # Keep up to 10 historical log files\n\n# Loggers \nloggers:\n # Keys are logger names used in the application code\n solace_ai_connector:\n level: ${LOGGING_SAC_LEVEL, INFO}\n handlers: []\n \n solace_agent_mesh:\n level: ${LOGGING_SAM_LEVEL, INFO}\n handlers: []\n \n # Special trace logger for detailed troubleshooting. Set to DEBUG to enable.\n sam_trace:\n level: ${LOGGING_SAM_TRACE_LEVEL, INFO}\n handlers: []\n\n# Root logger - applies to all log statements (including those from external libraries) that propagate up to root\n# The root logger also specifies handlers for the application\nroot:\n level: ${LOGGING_ROOT_LEVEL, WARNING}\n handlers:\n - streamHandler\n - rotatingFileHandler\n'})}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsx)(n.mdxAdmonitionTitle,{}),(0,t.jsx)(n.p,{children:"The examples in this documentation use YAML format, but examples can be easily converted to JSON if preferred."})]}),"\n",(0,t.jsx)(n.h3,{id:"loggers",children:"Loggers"}),"\n",(0,t.jsx)(n.p,{children:"Loggers are organized in a hierarchical namespace using dot-separated names, forming a tree structure where child loggers inherit configuration from their parents. When a logger is asked to handle a log record, it propagates the record up through the logger hierarchy until it reaches a logger with handlers configured or reaches the root logger."}),"\n",(0,t.jsx)(n.h3,{id:"handlers",children:"Handlers"}),"\n",(0,t.jsx)(n.p,{children:"Handlers determine where log messages go. The default configuration includes:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"streamHandler"})}),": Outputs logs to the console (stdout) for immediate visibility"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"rotatingFileHandler"})}),": Writes logs to files with automatic rotation when size limits are reached."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["For complete details on handlers, see ",(0,t.jsx)(n.a,{href:"https://docs.python.org/3/library/logging.handlers.html",children:"Python's supported handlers documentation"})]}),"\n",(0,t.jsx)(n.h3,{id:"formatters",children:"Formatters"}),"\n",(0,t.jsx)(n.p,{children:"Formatters control the structure and appearance of log messages. The default configuration includes:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"simpleFormatter"})}),": Human-readable format including timestamp, level, thread, logger name, and message."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"coloredFormatter"})}),": Similar to ",(0,t.jsx)(n.code,{children:"simpleFormatter"})," but with color coding for log levels and backend component logs to enhance readability in the console."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"jsonFormatter"})}),": JSON format for log aggregation and analysis tools. See ",(0,t.jsx)(n.a,{href:"#structured-logging",children:"Structured Logging"})," for possible customizations."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Consult Python's documentation for complete details on ",(0,t.jsx)(n.a,{href:"https://docs.python.org/3/library/logging.html#formatter-objects",children:"formatters"})," and ",(0,t.jsx)(n.a,{href:"https://docs.python.org/3/library/logging.html#logrecord-attributes",children:"available fields"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"understanding-effective-log-levels",children:"Understanding Effective Log Levels"}),"\n",(0,t.jsx)(n.p,{children:"The effective log level for a logger is determined by the most specific configuration in the logger hierarchy. If a logger doesn't have a level explicitly set, it inherits from its parent. The root logger applies to all modules that do not have a logger defined."}),"\n",(0,t.jsx)(n.p,{children:"For example, if you set the root logger to DEBUG but create a more specific logger for solace_ai_connector at the INFO level, the effective log level for the solace_ai_connector module will be INFO. This means DEBUG level logs from solace_ai_connector will not be handled, as they fall below the effective log level."}),"\n",(0,t.jsx)(n.h2,{id:"env-var-substitution",children:"Environment Variable Substitution"}),"\n",(0,t.jsx)(n.p,{children:"All configuration formats (YAML, JSON, and INI) support environment variable substitution using the syntax:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"${VARIABLE_NAME, default_value}\n"})}),"\n",(0,t.jsx)(n.p,{children:"Users can use variable names of their choice; the application will look for these environment variables at runtime and substitute their values accordingly. If the environment variable is not set, the provided default value will be used."}),"\n",(0,t.jsx)(n.h2,{id:"common-configuration-scenarios",children:"Common Configuration Scenarios"}),"\n",(0,t.jsx)(n.h3,{id:"structured-logging",children:"Structured Logging"}),"\n",(0,t.jsx)(n.p,{children:"Structured logging outputs log messages in JSON format, making them easier to parse, search, and analyze in log aggregation systems like Datadog, Splunk, Elasticsearch, and others."}),"\n",(0,t.jsx)(n.p,{children:"Enabling structured logging includes two steps."}),"\n",(0,t.jsx)(n.h4,{id:"1--enable-json-formatter",children:"1- Enable JSON Formatter"}),"\n",(0,t.jsxs)(n.p,{children:["Structured logging is enabled by assigning the ",(0,t.jsx)(n.code,{children:"jsonFormatter"}),", which is provided in the default logging configuration, to one or more logging handlers in your configuration. This means log messages handled by those specific handlers will be output in structured JSON format."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'handlers:\n rotatingFileHandler:\n class: logging.handlers.RotatingFileHandler\n formatter: jsonFormatter # Changed from simpleFormatter\n filename: ${LOGGING_FILE_NAME, sam.log}\n mode: a\n maxBytes: 52428800\n backupCount: 10\n \n streamHandler:\n class: logging.StreamHandler\n formatter: simpleFormatter # Kept as simpleFormatter to show handlers can have different formatters\n stream: "ext://sys.stdout"\n'})}),"\n",(0,t.jsx)(n.h4,{id:"2--configure-contextual-info-optional",children:"2- Configure Contextual Info (Optional)"}),"\n",(0,t.jsxs)(n.p,{children:["Log aggregation systems often expect contextual fields to be included in log records for better filtering, grouping, and analysis. For example, contextual fields like ",(0,t.jsx)(n.code,{children:"service"})," and ",(0,t.jsx)(n.code,{children:"env"})," can be added to each log record to indicate which service generated the log and the environment it ran in."]}),"\n",(0,t.jsxs)(n.p,{children:["To add contextual info to every log record, use ",(0,t.jsx)(n.a,{href:"https://nhairs.github.io/python-json-logger/latest/quickstart/#static-fields",children:"python-json-logger's static_fields feature"})," as shown below:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:' jsonFormatter:\n "()": pythonjsonlogger.json.JsonFormatter\n format: "%(asctime)s %(levelname)s %(threadName)s %(name)s %(message)s"\n static_fields:\n service: ${SERVICE_NAME, payment-service}\n env: ${ENV, production}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["With this ",(0,t.jsx)(n.code,{children:"jsonFormatter"})," configuration, all JSON log records will automatically include the specified static fields:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "asctime":"2025-10-30 22:25:56,960",\n "levelname":"INFO",\n "threadName":"MainThread",\n "name":"solace_ai_connector.flow",\n "message":"Processing message",\n "service": "payment-service",\n "env": "production"\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Notice that ",(0,t.jsx)(n.a,{href:"#env-var-substitution",children:"environment variable substitution"})," can be used for increased flexibility."]}),"\n",(0,t.jsx)(n.h3,{id:"customizing-log-levels",children:"Customizing Log Levels"}),"\n",(0,t.jsx)(n.p,{children:"You can add loggers to control the log level of specific modules or external libraries in your application. This allows you to increase verbosity for troubleshooting specific components while keeping other parts of the system quiet."}),"\n",(0,t.jsx)(n.p,{children:"For instance, imagine you are troubleshooting an issue with the HTTP SSE gateway, and you also want to see more detailed logs coming from the google_adk external library, you can add the following loggers:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"loggers:\n solace_ai_connector:\n level: INFO\n handlers: []\n \n solace_agent_mesh:\n level: INFO\n handlers: []\n \n sam_trace:\n level: INFO\n handlers: []\n \n # Increase verbosity of a specific package\n solace_agent_mesh.gateway.http_sse:\n level: DEBUG\n handlers: []\n \n # Increase verbosity of a specific external library\n google_adk:\n level: INFO\n handlers: []\n\nroot:\n level: WARNING\n handlers:\n - streamHandler\n - rotatingFileHandler\n"})}),"\n",(0,t.jsxs)(n.admonition,{title:"Discovering Logger Names",type:"tip",children:[(0,t.jsxs)(n.p,{children:["To discover what logger names are available to control, temporarily set the root logger level to ",(0,t.jsx)(n.code,{children:"DEBUG"})," and run your application. The logger names will appear in each log entry, displayed as a dot-separated hierarchy. You can control verbosity at any level of the logger hierarchy."]}),(0,t.jsx)(n.p,{children:"Once you've identified the logger names you need, you can:"}),(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Set the root logger level back to ",(0,t.jsx)(n.code,{children:"WARNING"})," to reduce overall verbosity"]}),"\n",(0,t.jsx)(n.li,{children:"Add specific logger configurations for the modules/library you want to monitor with increased verbosity"}),"\n"]}),(0,t.jsx)(n.p,{children:"This approach keeps your logs clean while giving you detailed visibility into the specific components you're troubleshooting."})]}),"\n",(0,t.jsx)(n.h3,{id:"agent-specific-log-file",children:"Agent-Specific Log File"}),"\n",(0,t.jsx)(n.p,{children:"For debugging a specific agent in isolation, you can run your SAM solution across multiple processes, with the agent you want to isolate running by itself with its own dedicated log file. This is particularly useful during development and troubleshooting."}),"\n",(0,t.jsx)(n.p,{children:"To isolate an agent's logs, run your SAM solution in two separate processes:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"# Process 1: Run your other components with default logging\nsam run configs/gateways/webui.yaml configs/agents/main_orchestrator.yaml configs/agents/some_other_agents.yaml # logs go to sam.log\n\n# Process 2: Run the isolated agent with its own log file\nexport LOGGING_FILE_NAME=my_isolated_agent.log && sam run configs/agents/my_agent_with_isolated_logs.yaml # logs go to my_isolated_agent.log\n"})}),"\n",(0,t.jsx)(n.p,{children:"This approach allows you to isolate and analyze a specific agent's behavior without interference from other components in your mesh. Each process writes to its own log file, making debugging much easier."})]})}function g(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>l,x:()=>r});var i=o(6540);const t={},s=i.createContext(t);function l(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[6310],{7048:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>a,contentTitle:()=>r,default:()=>h,frontMatter:()=>l,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"documentation/components/builtin-tools/image-tools","title":"Image Tools","description":"Overview","source":"@site/docs/documentation/components/builtin-tools/image-tools.md","sourceDirName":"documentation/components/builtin-tools","slug":"/documentation/components/builtin-tools/image-tools","permalink":"/solace-agent-mesh/docs/documentation/components/builtin-tools/image-tools","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/components/builtin-tools/image-tools.md","tags":[],"version":"current","sidebarPosition":35,"frontMatter":{"title":"Image Tools","sidebar_position":35},"sidebar":"docSidebar","previous":{"title":"Audio Tools","permalink":"/solace-agent-mesh/docs/documentation/components/builtin-tools/audio-tools"},"next":{"title":"Dynamic Embeds","permalink":"/solace-agent-mesh/docs/documentation/components/builtin-tools/embeds"}}');var t=n(4848),s=n(8453);const l={title:"Image Tools",sidebar_position:35},r="Image Tools",a={},d=[{value:"Overview",id:"overview",level:2},{value:"Available Tools",id:"available-tools",level:3},{value:"Tool Reference",id:"tool-reference",level:2},{value:"create_image_from_description",id:"create_image_from_description",level:3},{value:"Tool Configuration",id:"tool-configuration",level:4},{value:"Configuration Parameters",id:"configuration-parameters",level:4},{value:"Output Format",id:"output-format",level:4},{value:"Example Usage",id:"example-usage",level:4},{value:"describe_image",id:"describe_image",level:3},{value:"Tool Configuration",id:"tool-configuration-1",level:4},{value:"Supported Image Formats",id:"supported-image-formats",level:4},{value:"edit_image_with_gemini",id:"edit_image_with_gemini",level:3},{value:"Tool Configuration",id:"tool-configuration-2",level:4},{value:"Configuration Parameters",id:"configuration-parameters-1",level:4},{value:"Supported Input Formats",id:"supported-input-formats",level:4},{value:"Best Practices",id:"best-practices",level:4},{value:"Tool Group Configuration",id:"tool-group-configuration",level:3}];function c(e){const i={code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.header,{children:(0,t.jsx)(i.h1,{id:"image-tools",children:"Image Tools"})}),"\n",(0,t.jsx)(i.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(i.p,{children:"The image tools provide agents with capabilities for generating, editing, and analyzing images. These tools enable multimodal workflows where agents can create visual content, enhance existing images, and extract information from visual data."}),"\n",(0,t.jsx)(i.h3,{id:"available-tools",children:"Available Tools"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsxs)(i.li,{children:[(0,t.jsx)(i.strong,{children:"create_image_from_description"}),": Generate images from text descriptions"]}),"\n",(0,t.jsxs)(i.li,{children:[(0,t.jsx)(i.strong,{children:"describe_image"}),": Analyze and describe image contents"]}),"\n",(0,t.jsxs)(i.li,{children:[(0,t.jsx)(i.strong,{children:"edit_image_with_gemini"}),": Edit existing images using AI"]}),"\n",(0,t.jsxs)(i.li,{children:[(0,t.jsx)(i.strong,{children:"describe_audio"}),": Analyze audio content (cross-listed with audio tools)"]}),"\n"]}),"\n",(0,t.jsx)(i.h2,{id:"tool-reference",children:"Tool Reference"}),"\n",(0,t.jsx)(i.h3,{id:"create_image_from_description",children:"create_image_from_description"}),"\n",(0,t.jsx)(i.p,{children:"Generate images from textual descriptions using AI image generation models."}),"\n",(0,t.jsx)(i.h4,{id:"tool-configuration",children:"Tool Configuration"}),"\n",(0,t.jsx)(i.p,{children:"Configure the image generation service in your agent's tool configuration:"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-yaml",children:'tools:\n - tool_type: builtin\n tool_name: "create_image_from_description"\n tool_config:\n model: "imagen-4-ultra" # Image generation model\n api_key: "${API_KEY}" # API authentication\n api_base: "https://ENDPOINT" # API endpoint\n'})}),"\n",(0,t.jsx)(i.h4,{id:"configuration-parameters",children:"Configuration Parameters"}),"\n",(0,t.jsxs)(i.table,{children:[(0,t.jsx)(i.thead,{children:(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.th,{children:"Parameter"}),(0,t.jsx)(i.th,{children:"Type"}),(0,t.jsx)(i.th,{children:"Description"})]})}),(0,t.jsxs)(i.tbody,{children:[(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:(0,t.jsx)(i.code,{children:"model"})}),(0,t.jsx)(i.td,{children:"string"}),(0,t.jsx)(i.td,{children:"Image generation model identifier"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:(0,t.jsx)(i.code,{children:"api_key"})}),(0,t.jsx)(i.td,{children:"string"}),(0,t.jsx)(i.td,{children:"API authentication key (use environment variables)"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:(0,t.jsx)(i.code,{children:"api_base"})}),(0,t.jsx)(i.td,{children:"string"}),(0,t.jsx)(i.td,{children:"Base URL for the API endpoint"})]})]})]}),"\n",(0,t.jsx)(i.h4,{id:"output-format",children:"Output Format"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsxs)(i.li,{children:[(0,t.jsx)(i.strong,{children:"File Type"}),": PNG"]}),"\n"]}),"\n",(0,t.jsx)(i.h4,{id:"example-usage",children:"Example Usage"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-yaml",children:'# Agent configuration\napp_config:\n agent_name: "DesignAgent"\n instruction: "You create visual content based on user descriptions."\n\n tools:\n - tool_type: builtin\n tool_name: "create_image_from_description"\n tool_config:\n model: "imagen-4-ultra"\n api_key: "${OPENAI_API_KEY}"\n api_base: "https://api.openai.com"\n'})}),"\n",(0,t.jsx)(i.hr,{}),"\n",(0,t.jsx)(i.h3,{id:"describe_image",children:"describe_image"}),"\n",(0,t.jsx)(i.p,{children:"Analyze and describe the contents of an image using vision-capable AI models."}),"\n",(0,t.jsx)(i.h4,{id:"tool-configuration-1",children:"Tool Configuration"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-yaml",children:'tools:\n - tool_type: builtin\n tool_name: "describe_image"\n tool_config:\n model: "gemini-2.5-flash" # Vision model\n api_key: "${API_KEY}"\n api_base: "https://ENDPOINT"\n'})}),"\n",(0,t.jsx)(i.h4,{id:"supported-image-formats",children:"Supported Image Formats"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsxs)(i.li,{children:["PNG (",(0,t.jsx)(i.code,{children:".png"}),")"]}),"\n",(0,t.jsxs)(i.li,{children:["JPEG (",(0,t.jsx)(i.code,{children:".jpg"}),", ",(0,t.jsx)(i.code,{children:".jpeg"}),")"]}),"\n",(0,t.jsxs)(i.li,{children:["WebP (",(0,t.jsx)(i.code,{children:".webp"}),")"]}),"\n",(0,t.jsxs)(i.li,{children:["GIF (",(0,t.jsx)(i.code,{children:".gif"}),")"]}),"\n"]}),"\n",(0,t.jsx)(i.h3,{id:"edit_image_with_gemini",children:"edit_image_with_gemini"}),"\n",(0,t.jsx)(i.p,{children:"Edit existing images using Google Gemini's AI-powered image editing capabilities."}),"\n",(0,t.jsx)(i.h4,{id:"tool-configuration-2",children:"Tool Configuration"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-yaml",children:'tools:\n - tool_type: builtin\n tool_name: "edit_image_with_gemini"\n tool_config:\n gemini_api_key: "${GOOGLE_API_KEY}"\n model: "gemini-2.5-flash-image"\n'})}),"\n",(0,t.jsxs)(i.p,{children:[(0,t.jsx)(i.strong,{children:"Required"}),": Google Gemini API key"]}),"\n",(0,t.jsx)(i.h4,{id:"configuration-parameters-1",children:"Configuration Parameters"}),"\n",(0,t.jsxs)(i.table,{children:[(0,t.jsx)(i.thead,{children:(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.th,{children:"Parameter"}),(0,t.jsx)(i.th,{children:"Type"}),(0,t.jsx)(i.th,{children:"Description"})]})}),(0,t.jsxs)(i.tbody,{children:[(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:(0,t.jsx)(i.code,{children:"gemini_api_key"})}),(0,t.jsx)(i.td,{children:"string"}),(0,t.jsx)(i.td,{children:"Google Gemini API authentication key"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:(0,t.jsx)(i.code,{children:"model"})}),(0,t.jsx)(i.td,{children:"string"}),(0,t.jsxs)(i.td,{children:["Gemini model name (default: ",(0,t.jsx)(i.code,{children:"gemini-2.0-flash-preview-image-generation"}),")"]})]})]})]}),"\n",(0,t.jsx)(i.h4,{id:"supported-input-formats",children:"Supported Input Formats"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsxs)(i.li,{children:["PNG (",(0,t.jsx)(i.code,{children:".png"}),")"]}),"\n",(0,t.jsxs)(i.li,{children:["JPEG (",(0,t.jsx)(i.code,{children:".jpg"}),", ",(0,t.jsx)(i.code,{children:".jpeg"}),")"]}),"\n",(0,t.jsxs)(i.li,{children:["WebP (",(0,t.jsx)(i.code,{children:".webp"}),")"]}),"\n",(0,t.jsxs)(i.li,{children:["GIF (",(0,t.jsx)(i.code,{children:".gif"}),")"]}),"\n"]}),"\n",(0,t.jsx)(i.h4,{id:"best-practices",children:"Best Practices"}),"\n",(0,t.jsxs)(i.ol,{children:["\n",(0,t.jsxs)(i.li,{children:["\n",(0,t.jsxs)(i.p,{children:[(0,t.jsx)(i.strong,{children:"Be Specific"}),": Detailed edit prompts yield better results"]}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-yaml",children:'# Good\nedit_prompt: "Remove the person in the red shirt on the left side, fill the space with matching background"\n\n# Poor\nedit_prompt: "Remove person"\n'})}),"\n"]}),"\n",(0,t.jsxs)(i.li,{children:["\n",(0,t.jsxs)(i.p,{children:[(0,t.jsx)(i.strong,{children:"Preserve Quality"}),": Start with high-resolution source images"]}),"\n"]}),"\n",(0,t.jsxs)(i.li,{children:["\n",(0,t.jsxs)(i.p,{children:[(0,t.jsx)(i.strong,{children:"Iterative Editing"}),": Make incremental changes rather than complex multi-step edits in one prompt"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(i.h3,{id:"tool-group-configuration",children:"Tool Group Configuration"}),"\n",(0,t.jsx)(i.p,{children:"Enable all image tools at once:"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-yaml",children:'tools:\n - tool_type: builtin-group\n group_name: "image"\n'})})]})}function h(e={}){const{wrapper:i}={...(0,s.R)(),...e.components};return i?(0,t.jsx)(i,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},8453:(e,i,n)=>{n.d(i,{R:()=>l,x:()=>r});var o=n(6540);const t={},s=o.createContext(t);function l(e){const i=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function r(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),o.createElement(s.Provider,{value:i},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[3758],{3494:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>m,frontMatter:()=>i,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"documentation/components/platform-service","title":"Platform Service","description":"The Platform Service is a backend microservice responsible for management operations in Solace Agent Mesh. It operates independently from other components, allowing it to scale separately.","source":"@site/docs/documentation/components/platform-service.md","sourceDirName":"documentation/components","slug":"/documentation/components/platform-service","permalink":"/solace-agent-mesh/docs/documentation/components/platform-service","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/components/platform-service.md","tags":[],"version":"current","sidebarPosition":265,"frontMatter":{"title":"Platform Service","sidebar_position":265},"sidebar":"docSidebar","previous":{"title":"Gateways","permalink":"/solace-agent-mesh/docs/documentation/components/gateways"},"next":{"title":"Plugins","permalink":"/solace-agent-mesh/docs/documentation/components/plugins"}}');var o=t(4848),s=t(8453);const i={title:"Platform Service",sidebar_position:265},a="Platform Service",c={},l=[{value:"What Does It Provide?",id:"what-does-it-provide",level:2},{value:"Running the Platform Service",id:"running-the-platform-service",level:2}];function d(e){const n={admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"platform-service",children:"Platform Service"})}),"\n",(0,o.jsx)(n.p,{children:"The Platform Service is a backend microservice responsible for management operations in Solace Agent Mesh. It operates independently from other components, allowing it to scale separately."}),"\n",(0,o.jsx)(n.h2,{id:"what-does-it-provide",children:"What Does It Provide?"}),"\n",(0,o.jsx)(n.p,{children:"The Platform Service provides the backend infrastructure for:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Agent Builder"})," ",(0,o.jsx)(n.em,{children:"(Enterprise)"})," - Create, read, update, and delete AI agents"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Connector Management"})," ",(0,o.jsx)(n.em,{children:"(Enterprise)"})," - Manage database connectors that enable agents to query SQL databases"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Deployment Orchestration"})," ",(0,o.jsx)(n.em,{children:"(Enterprise)"})," - Deploy agents to runtime environments"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Deployer Monitoring"})," ",(0,o.jsx)(n.em,{children:"(Enterprise)"})," - Track health and availability of deployer services"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"running-the-platform-service",children:"Running the Platform Service"}),"\n",(0,o.jsx)(n.p,{children:"A sample Platform Service configuration is automatically generated when you run:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"sam init --gui\n"})}),"\n",(0,o.jsxs)(n.p,{children:["When prompted to enable the WebUI Gateway, select ",(0,o.jsx)(n.strong,{children:"Yes"}),". This will generate ",(0,o.jsx)(n.code,{children:"configs/services/platform.yaml"})," with all necessary configuration."]}),"\n",(0,o.jsx)(n.p,{children:"Start the Platform Service using the SAM CLI:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"sam run configs/services/platform.yaml\n"})}),"\n",(0,o.jsxs)(n.p,{children:["The service runs on ",(0,o.jsx)(n.strong,{children:"port 8001"})," by default."]}),"\n",(0,o.jsx)(n.admonition,{type:"note",children:(0,o.jsx)(n.p,{children:"A Platform Service instance is only required when running the WebUI Gateway in combination with Agent Mesh Enterprise."})})]})}function m(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var r=t(6540);const o={},s=r.createContext(o);function i(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[3349],{3085:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>r,contentTitle:()=>a,default:()=>h,frontMatter:()=>l,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"documentation/developing/creating-python-tools","title":"Creating Python Tools","description":"Agent Mesh provides a powerful and unified system for creating custom agent tools using Python. This is the primary way to extend an agent\'s capabilities with your own business logic, integrate with proprietary APIs, or perform specialized data processing.","source":"@site/docs/documentation/developing/creating-python-tools.md","sourceDirName":"documentation/developing","slug":"/documentation/developing/creating-python-tools","permalink":"/solace-agent-mesh/docs/documentation/developing/creating-python-tools","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/developing/creating-python-tools.md","tags":[],"version":"current","sidebarPosition":440,"frontMatter":{"title":"Creating Python Tools","sidebar_position":440},"sidebar":"docSidebar","previous":{"title":"Creating Custom Gateways","permalink":"/solace-agent-mesh/docs/documentation/developing/create-gateways"},"next":{"title":"Creating Service Providers","permalink":"/solace-agent-mesh/docs/documentation/developing/creating-service-providers"}}');var i=o(4848),s=o(8453);const l={title:"Creating Python Tools",sidebar_position:440},a="Creating Python Tools",r={},c=[{value:"Python Tool Configuration Reference",id:"python-tool-configuration-reference",level:2},{value:"Tool Creation Patterns",id:"tool-creation-patterns",level:2},{value:"Pattern 1: Simple Function-Based Tools",id:"pattern-1-simple-function-based-tools",level:2},{value:"Step 1: Write the Tool Function",id:"step-1-write-the-tool-function",level:3},{value:"Step 2: Configure the Tool",id:"step-2-configure-the-tool",level:3},{value:"Pattern 2: Advanced Single-Class Tools",id:"pattern-2-advanced-single-class-tools",level:2},{value:"Step 1: Create the <code>DynamicTool</code> Class",id:"step-1-create-the-dynamictool-class",level:3},{value:"Step 2: Configure the Tool",id:"step-2-configure-the-tool-1",level:3},{value:"Pattern 3: The Tool Provider Factory",id:"pattern-3-the-tool-provider-factory",level:2},{value:"Step 1: Create the Provider and Tools",id:"step-1-create-the-provider-and-tools",level:3},{value:"Step 2: Configure the Provider",id:"step-2-configure-the-provider",level:3},{value:"Managing Tool Lifecycles with <code>init</code> and <code>cleanup</code>",id:"managing-tool-lifecycles-with-init-and-cleanup",level:2},{value:"YAML-Based Lifecycle Hooks",id:"yaml-based-lifecycle-hooks",level:3},{value:"Step 1: Define the Tool and Hook Functions",id:"step-1-define-the-tool-and-hook-functions",level:4},{value:"Step 2: Configure the Hooks in YAML",id:"step-2-configure-the-hooks-in-yaml",level:4},{value:"Class-Based Lifecycle Methods (for <code>DynamicTool</code>)",id:"class-based-lifecycle-methods-for-dynamictool",level:3},{value:"Execution Order and Guarantees",id:"execution-order-and-guarantees",level:3},{value:"Adding Validated Configuration to Dynamic Tools",id:"adding-validated-configuration-to-dynamic-tools",level:2},{value:"Example 1: Using a Pydantic Model with a Single <code>DynamicTool</code>",id:"example-1-using-a-pydantic-model-with-a-single-dynamictool",level:3},{value:"Step 1: Define the Model and Tool Class",id:"step-1-define-the-model-and-tool-class",level:4},{value:"Step 2: Configure the Tool in YAML",id:"step-2-configure-the-tool-in-yaml",level:4},{value:"Example 2: Using a Pydantic Model with a <code>DynamicToolProvider</code>",id:"example-2-using-a-pydantic-model-with-a-dynamictoolprovider",level:3},{value:"Step 1: Define the Model and Provider Class",id:"step-1-define-the-model-and-provider-class",level:4},{value:"Step 2: Configure the Provider in YAML",id:"step-2-configure-the-provider-in-yaml",level:4},{value:"Complete Configuration Examples",id:"complete-configuration-examples",level:2},{value:"Example 1: Simple Function-Based Tool with All Options",id:"example-1-simple-function-based-tool-with-all-options",level:3},{value:"Example 2: DynamicTool Class with Lifecycle Hooks",id:"example-2-dynamictool-class-with-lifecycle-hooks",level:3},{value:"Example 3: Function-Based Tool with YAML Lifecycle Hooks",id:"example-3-function-based-tool-with-yaml-lifecycle-hooks",level:3},{value:"Example 4: DynamicToolProvider for Multiple Tools",id:"example-4-dynamictoolprovider-for-multiple-tools",level:3}];function d(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"creating-python-tools",children:"Creating Python Tools"})}),"\n",(0,i.jsx)(n.p,{children:"Agent Mesh provides a powerful and unified system for creating custom agent tools using Python. This is the primary way to extend an agent's capabilities with your own business logic, integrate with proprietary APIs, or perform specialized data processing."}),"\n",(0,i.jsx)(n.h2,{id:"python-tool-configuration-reference",children:"Python Tool Configuration Reference"}),"\n",(0,i.jsxs)(n.p,{children:["All Python tools are configured in your agent's YAML file under the ",(0,i.jsx)(n.code,{children:"tools"})," list with ",(0,i.jsx)(n.code,{children:"tool_type: python"}),". The following configuration fields are available:"]}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Field"}),(0,i.jsx)(n.th,{children:"Type"}),(0,i.jsx)(n.th,{children:"Required"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"tool_type"})}),(0,i.jsx)(n.td,{children:"string"}),(0,i.jsx)(n.td,{children:"Yes"}),(0,i.jsxs)(n.td,{children:["Must be ",(0,i.jsx)(n.code,{children:"python"})]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"tool_name"})}),(0,i.jsx)(n.td,{children:"string"}),(0,i.jsx)(n.td,{children:"No"}),(0,i.jsx)(n.td,{children:"Tool name for the LLM (auto-generated from function/class name if omitted)"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"tool_description"})}),(0,i.jsx)(n.td,{children:"string"}),(0,i.jsx)(n.td,{children:"No"}),(0,i.jsx)(n.td,{children:"Tool description for the LLM (auto-generated from docstring if omitted)"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"component_module"})}),(0,i.jsx)(n.td,{children:"string"}),(0,i.jsx)(n.td,{children:"Yes"}),(0,i.jsxs)(n.td,{children:["Python module path (e.g., ",(0,i.jsx)(n.code,{children:"my_company.tools.calculators"}),")"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"function_name"})}),(0,i.jsx)(n.td,{children:"string"}),(0,i.jsx)(n.td,{children:"Conditional"}),(0,i.jsx)(n.td,{children:"Function name within the module (required for function-based tools)"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"class_name"})}),(0,i.jsx)(n.td,{children:"string"}),(0,i.jsx)(n.td,{children:"No"}),(0,i.jsxs)(n.td,{children:["Class name for ",(0,i.jsx)(n.code,{children:"DynamicTool"})," or ",(0,i.jsx)(n.code,{children:"DynamicToolProvider"})," (auto-discovered if only one exists in module)"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"component_base_path"})}),(0,i.jsx)(n.td,{children:"string"}),(0,i.jsx)(n.td,{children:"No"}),(0,i.jsx)(n.td,{children:"Base path for module resolution (defaults to project root)"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"tool_config"})}),(0,i.jsx)(n.td,{children:"object"}),(0,i.jsx)(n.td,{children:"No"}),(0,i.jsx)(n.td,{children:"Custom tool configuration passed to the function/class"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"init_function"})}),(0,i.jsx)(n.td,{children:"string"}),(0,i.jsx)(n.td,{children:"No"}),(0,i.jsx)(n.td,{children:"Name of initialization function to call on agent startup"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"cleanup_function"})}),(0,i.jsx)(n.td,{children:"string"}),(0,i.jsx)(n.td,{children:"No"}),(0,i.jsx)(n.td,{children:"Name of cleanup function to call on agent shutdown"})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"tool-creation-patterns",children:"Tool Creation Patterns"}),"\n",(0,i.jsx)(n.p,{children:"There are three primary patterns for creating Python tools, ranging from simple to advanced. You can choose the best pattern for your needs, and even mix and match them within the same project."}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Pattern"}),(0,i.jsx)(n.th,{children:"Best For"}),(0,i.jsx)(n.th,{children:"Key Feature"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.strong,{children:"Function-Based"})}),(0,i.jsx)(n.td,{children:"Simple, self-contained tools with static inputs."}),(0,i.jsx)(n.td,{children:"Quick and easy; uses function signature."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsxs)(n.strong,{children:["Single ",(0,i.jsx)(n.code,{children:"DynamicTool"})," Class"]})}),(0,i.jsx)(n.td,{children:"Tools that require complex logic or a programmatically defined interface."}),(0,i.jsx)(n.td,{children:"Full control over the tool's definition."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsxs)(n.strong,{children:[(0,i.jsx)(n.code,{children:"DynamicToolProvider"})," Class"]})}),(0,i.jsx)(n.td,{children:"Generating multiple related tools from a single, configurable source."}),(0,i.jsx)(n.td,{children:"Maximum scalability and code reuse."})]})]})]}),"\n",(0,i.jsxs)(n.p,{children:["All three patterns are configured in your agent's YAML file under the ",(0,i.jsx)(n.code,{children:"tools"})," list with ",(0,i.jsx)(n.code,{children:"tool_type: python"}),"."]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"pattern-1-simple-function-based-tools",children:"Pattern 1: Simple Function-Based Tools"}),"\n",(0,i.jsxs)(n.p,{children:["This is the most straightforward way to create a custom tool. You define a standard Python ",(0,i.jsx)(n.code,{children:"async"})," function, and Agent Mesh automatically introspects its signature and docstring to create the tool definition for the LLM."]}),"\n",(0,i.jsx)(n.h3,{id:"step-1-write-the-tool-function",children:"Step 1: Write the Tool Function"}),"\n",(0,i.jsxs)(n.p,{children:["Create a Python file (e.g., ",(0,i.jsx)(n.code,{children:"src/my_agent/tools.py"}),") and define your tool."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:'# src/my_agent/tools.py\nfrom typing import Any, Dict, Optional\nfrom google.adk.tools import ToolContext\n\nasync def greet_user(\n name: str,\n tool_context: Optional[ToolContext] = None,\n tool_config: Optional[Dict[str, Any]] = None\n) -> Dict[str, Any]:\n """\n Greets a user with a personalized message.\n\n Args:\n name: The name of the person to greet.\n\n Returns:\n A dictionary with the greeting message.\n """\n greeting_prefix = "Hello"\n if tool_config:\n greeting_prefix = tool_config.get("greeting_prefix", "Hello")\n\n greeting_message = f"{greeting_prefix}, {name}! Welcome to Agent Mesh!"\n\n return {\n "status": "success",\n "message": greeting_message\n }\n'})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Key Requirements:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The function must be ",(0,i.jsx)(n.code,{children:"async def"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["The function's docstring is used as the tool's ",(0,i.jsx)(n.code,{children:"description"})," for the LLM."]}),"\n",(0,i.jsxs)(n.li,{children:["Type hints (",(0,i.jsx)(n.code,{children:"str"}),", ",(0,i.jsx)(n.code,{children:"int"}),", ",(0,i.jsx)(n.code,{children:"bool"}),") are used to generate the parameter schema."]}),"\n",(0,i.jsxs)(n.li,{children:["The function should accept ",(0,i.jsx)(n.code,{children:"tool_context"})," and ",(0,i.jsx)(n.code,{children:"tool_config"})," as optional keyword arguments to receive framework context and YAML configuration."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"step-2-configure-the-tool",children:"Step 2: Configure the Tool"}),"\n",(0,i.jsxs)(n.p,{children:["In your agent's YAML configuration, add a ",(0,i.jsx)(n.code,{children:"tool_type: python"})," block and point it to your function."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:'# In your agent\'s app_config:\ntools:\n - tool_type: python\n component_module: "my_agent.tools"\n function_name: "greet_user"\n tool_config:\n greeting_prefix: "Greetings"\n'})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"component_module"}),": The Python module path to your tools file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"function_name"}),": The exact name of the function to load."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"tool_config"}),": An optional dictionary passed to your tool at runtime."]}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"pattern-2-advanced-single-class-tools",children:"Pattern 2: Advanced Single-Class Tools"}),"\n",(0,i.jsxs)(n.p,{children:["For tools that require more complex logic\u2014such as defining their interface programmatically based on configuration\u2014you can use a class that inherits from ",(0,i.jsx)(n.code,{children:"DynamicTool"}),"."]}),"\n",(0,i.jsxs)(n.h3,{id:"step-1-create-the-dynamictool-class",children:["Step 1: Create the ",(0,i.jsx)(n.code,{children:"DynamicTool"})," Class"]}),"\n",(0,i.jsxs)(n.p,{children:["Instead of a function, define a class that implements the ",(0,i.jsx)(n.code,{children:"DynamicTool"})," abstract base class."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:'# src/my_agent/tools.py\nfrom typing import Optional, Dict, Any\nfrom google.genai import types as adk_types\nfrom solace_agent_mesh.agent.tools.dynamic_tool import DynamicTool\n\nclass WeatherTool(DynamicTool):\n """A dynamic tool that fetches current weather information."""\n\n @property\n def tool_name(self) -> str:\n return "get_current_weather"\n\n @property\n def tool_description(self) -> str:\n return "Get the current weather for a specified location."\n\n @property\n def parameters_schema(self) -> adk_types.Schema:\n # Programmatically define the tool\'s parameters\n return adk_types.Schema(\n type=adk_types.Type.OBJECT,\n properties={\n "location": adk_types.Schema(type=adk_types.Type.STRING, description="The city and state/country."),\n "units": adk_types.Schema(type=adk_types.Type.STRING, enum=["celsius", "fahrenheit"], nullable=True),\n },\n required=["location"],\n )\n\n async def _run_async_impl(self, args: Dict[str, Any], **kwargs) -> Dict[str, Any]:\n location = args["location"]\n # Access config via self.tool_config\n api_key = self.tool_config.get("api_key")\n if not api_key:\n return {"status": "error", "message": "API key not configured"}\n # ... implementation to call weather API ...\n return {"status": "success", "weather": "Sunny"}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"step-2-configure-the-tool-1",children:"Step 2: Configure the Tool"}),"\n",(0,i.jsxs)(n.p,{children:["The YAML configuration is very similar. You can either specify the ",(0,i.jsx)(n.code,{children:"class_name"})," or let Agent Mesh auto-discover it if it's the only ",(0,i.jsx)(n.code,{children:"DynamicTool"})," in the module."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:"# In your agent's app_config:\ntools:\n - tool_type: python\n component_module: \"my_agent.tools\"\n # class_name: WeatherTool # Optional if it's the only one\n tool_config:\n api_key: ${WEATHER_API_KEY}\n"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"pattern-3-the-tool-provider-factory",children:"Pattern 3: The Tool Provider Factory"}),"\n",(0,i.jsx)(n.p,{children:"This is the most powerful pattern, designed for generating multiple, related tools from a single module and configuration block. It's perfect for creating toolsets based on external schemas, database tables, or other dynamic sources."}),"\n",(0,i.jsx)(n.h3,{id:"step-1-create-the-provider-and-tools",children:"Step 1: Create the Provider and Tools"}),"\n",(0,i.jsxs)(n.p,{children:["In your tools module, you define your ",(0,i.jsx)(n.code,{children:"DynamicTool"})," classes as before, but you also create a ",(0,i.jsx)(n.strong,{children:"provider"})," class that inherits from ",(0,i.jsx)(n.code,{children:"DynamicToolProvider"}),". This provider acts as a factory."]}),"\n",(0,i.jsxs)(n.p,{children:["You can also use the ",(0,i.jsx)(n.code,{children:"@register_tool"})," decorator on simple functions to have them automatically included by the provider."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:'# src/my_agent/database_tools.py\nfrom typing import Optional, Dict, Any, List\nfrom google.genai import types as adk_types\nfrom solace_agent_mesh.agent.tools.dynamic_tool import DynamicTool, DynamicToolProvider\n\n# --- Tool Implementations ---\nclass DatabaseQueryTool(DynamicTool):\n # ... (implementation as in previous examples) ...\n pass\n\nclass DatabaseSchemaTool(DynamicTool):\n # ... (implementation as in previous examples) ...\n pass\n\n# --- Tool Provider Implementation ---\nclass DatabaseToolProvider(DynamicToolProvider):\n """A factory that creates all database-related tools."""\n\n # Use a decorator for a simple, function-based tool\n\n def create_tools(self, tool_config: Optional[dict] = None) -> List[DynamicTool]:\n """\n Generates a list of all database tools, passing the shared\n configuration to each one.\n """\n # 1. Create tools from any decorated functions in this module\n tools = self._create_tools_from_decorators(tool_config)\n\n # 2. Programmatically create and add more complex tools\n if tool_config and tool_config.get("connection_string"):\n tools.append(DatabaseQueryTool(tool_config=tool_config))\n tools.append(DatabaseSchemaTool(tool_config=tool_config))\n\n return tools\n\n# NOTE that you must use the decorator outside of any class with the provider\'s class name.\n@DatabaseToolProvider.register_tool\nasync def get_database_server_version(tool_config: dict, **kwargs) -> dict:\n """Returns the version of the connected PostgreSQL server."""\n # ... implementation ...\n return {"version": "PostgreSQL 15.3"}\n\n'})}),"\n",(0,i.jsx)(n.h3,{id:"step-2-configure-the-provider",children:"Step 2: Configure the Provider"}),"\n",(0,i.jsxs)(n.p,{children:["You only need a single YAML block. Agent Mesh will automatically detect the ",(0,i.jsx)(n.code,{children:"DynamicToolProvider"})," and use it to load all the tools it generates."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:'# In your agent\'s app_config:\ntools:\n # This single block loads get_database_server_version,\n # execute_database_query, and get_database_schema.\n - tool_type: python\n component_module: "my_agent.database_tools"\n tool_config:\n connection_string: ${DB_CONNECTION_STRING}\n max_rows: 1000\n'})}),"\n",(0,i.jsx)(n.p,{children:"This approach is incredibly scalable, as one configuration entry can bootstrap an entire suite of dynamically generated tools."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.h2,{id:"managing-tool-lifecycles-with-init-and-cleanup",children:["Managing Tool Lifecycles with ",(0,i.jsx)(n.code,{children:"init"})," and ",(0,i.jsx)(n.code,{children:"cleanup"})]}),"\n",(0,i.jsxs)(n.p,{children:["For tools that need to manage resources\u2014such as database connections, API clients, or temporary files\u2014Agent Mesh provides optional ",(0,i.jsx)(n.code,{children:"init"})," and ",(0,i.jsx)(n.code,{children:"cleanup"})," lifecycle hooks. These allow you to run code when the agent starts up and shuts down, ensuring that resources are acquired and released gracefully."]}),"\n",(0,i.jsx)(n.p,{children:"There are two ways to define these hooks:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsxs)(n.strong,{children:["YAML-based (",(0,i.jsx)(n.code,{children:"init_function"}),", ",(0,i.jsx)(n.code,{children:"cleanup_function"}),"):"]})," A flexible method that works for ",(0,i.jsx)(n.em,{children:"any"})," Python tool, including simple function-based ones."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsxs)(n.strong,{children:["Class-based (",(0,i.jsx)(n.code,{children:"init"}),", ",(0,i.jsx)(n.code,{children:"cleanup"})," methods):"]})," The idiomatic and recommended way for ",(0,i.jsx)(n.code,{children:"DynamicTool"})," and ",(0,i.jsx)(n.code,{children:"DynamicToolProvider"})," classes."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"yaml-based-lifecycle-hooks",children:"YAML-Based Lifecycle Hooks"}),"\n",(0,i.jsxs)(n.p,{children:["You can add ",(0,i.jsx)(n.code,{children:"init_function"})," and ",(0,i.jsx)(n.code,{children:"cleanup_function"})," to any Python tool's configuration in your agent's YAML. The lifecycle functions must be defined in the same module as the tool itself."]}),"\n",(0,i.jsx)(n.h4,{id:"step-1-define-the-tool-and-hook-functions",children:"Step 1: Define the Tool and Hook Functions"}),"\n",(0,i.jsxs)(n.p,{children:["In your tool's Python file (e.g., ",(0,i.jsx)(n.code,{children:"src/my_agent/db_tools.py"}),"), define the tool function and its corresponding ",(0,i.jsx)(n.code,{children:"init"})," and ",(0,i.jsx)(n.code,{children:"cleanup"})," functions. These functions must be ",(0,i.jsx)(n.code,{children:"async"})," and will receive the agent component instance and the tool's configuration model object as arguments."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:'# src/my_agent/db_tools.py\nfrom solace_agent_mesh.agent.sac.component import SamAgentComponent\nfrom solace_agent_mesh.agent.tools.tool_config_types import AnyToolConfig\nfrom google.adk.tools import ToolContext\nfrom typing import Dict, Any\n\n# --- Lifecycle Hooks ---\n\nasync def initialize_db_connection(component: SamAgentComponent, tool_config_model: AnyToolConfig):\n """Initializes a database connection and stores it for the agent to use."""\n print("INFO: Initializing database connection...")\n # In a real scenario, you would create a client instance\n db_client = {"connection_string": tool_config_model.tool_config.get("connection_string")}\n # Store the client in a shared state accessible by the component\n component.set_agent_specific_state("db_client", db_client)\n print("INFO: Database client initialized.")\n\nasync def close_db_connection(component: SamAgentComponent, tool_config_model: AnyToolConfig):\n """Retrieves and closes the database connection."""\n print("INFO: Closing database connection...")\n db_client = component.get_agent_specific_state("db_client")\n if db_client:\n # In a real scenario, you would call db_client.close()\n print("INFO: Database connection closed.")\n\n# --- Tool Function ---\n\nasync def query_database(query: str, tool_context: ToolContext, **kwargs) -> Dict[str, Any]:\n """Queries the database using the initialized connection."""\n host_component = tool_context._invocation_context.agent.host_component\n db_client = host_component.get_agent_specific_state("db_client")\n if not db_client:\n return {"error": "Database connection not initialized."}\n # ... use db_client to run query ...\n return {"result": "some data"}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"step-2-configure-the-hooks-in-yaml",children:"Step 2: Configure the Hooks in YAML"}),"\n",(0,i.jsxs)(n.p,{children:["In your YAML configuration, reference the lifecycle functions by name. The framework will automatically look for them in the ",(0,i.jsx)(n.code,{children:"component_module"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:'# In your agent\'s app_config:\ntools:\n - tool_type: python\n component_module: "my_agent.db_tools"\n function_name: "query_database"\n tool_config:\n connection_string: "postgresql://user:pass@host/db"\n\n # Initialize the tool on startup\n init_function: "initialize_db_connection"\n\n # Clean up the tool on shutdown\n cleanup_function: "close_db_connection"\n'})}),"\n",(0,i.jsxs)(n.h3,{id:"class-based-lifecycle-methods-for-dynamictool",children:["Class-Based Lifecycle Methods (for ",(0,i.jsx)(n.code,{children:"DynamicTool"}),")"]}),"\n",(0,i.jsxs)(n.p,{children:["For tools built with ",(0,i.jsx)(n.code,{children:"DynamicTool"})," or ",(0,i.jsx)(n.code,{children:"DynamicToolProvider"}),", the recommended approach is to override the ",(0,i.jsx)(n.code,{children:"init"})," and ",(0,i.jsx)(n.code,{children:"cleanup"})," methods directly within the class. This co-locates the entire tool's logic and improves encapsulation."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.strong,{children:["Example: Adding Lifecycle Methods to a ",(0,i.jsx)(n.code,{children:"DynamicTool"})]})}),"\n",(0,i.jsxs)(n.p,{children:["Here, we extend a ",(0,i.jsx)(n.code,{children:"DynamicTool"})," to manage its own API client."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:'# src/my_agent/api_tool.py\nfrom solace_agent_mesh.agent.sac.component import SamAgentComponent\nfrom solace_agent_mesh.agent.tools.dynamic_tool import DynamicTool\nfrom solace_agent_mesh.agent.tools.tool_config_types import AnyToolConfig\n# Assume WeatherApiClient is a custom class for an external service\nfrom my_agent.api_client import WeatherApiClient\n\nclass WeatherTool(DynamicTool):\n """A dynamic tool that fetches weather and manages its own API client."""\n\n async def init(self, component: "SamAgentComponent", tool_config: "AnyToolConfig") -> None:\n """Initializes the API client when the agent starts."""\n print("INFO: Initializing Weather API client...")\n # self.tool_config is the validated Pydantic model or dict from YAML\n api_key = self.tool_config.get("api_key")\n self.api_client = WeatherApiClient(api_key=api_key)\n print("INFO: Weather API client initialized.")\n\n async def cleanup(self, component: "SamAgentComponent", tool_config: "AnyToolConfig") -> None:\n """Closes the API client connection when the agent shuts down."""\n print("INFO: Closing Weather API client...")\n if hasattr(self, "api_client"):\n await self.api_client.close()\n print("INFO: Weather API client closed.")\n\n # ... other required properties like tool_name, tool_description, etc. ...\n\n async def _run_async_impl(self, args: dict, **kwargs) -> dict:\n """Uses the initialized client to perform its task."""\n location = args.get("location")\n if not hasattr(self, "api_client"):\n return {"error": "API client not initialized. Check lifecycle hooks."}\n weather_data = await self.api_client.get_weather(location)\n return {"weather": weather_data}\n'})}),"\n",(0,i.jsx)(n.p,{children:"The YAML configuration remains simple, as the lifecycle logic is now part of the tool's code."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:'# In your agent\'s app_config:\ntools:\n - tool_type: python\n component_module: "my_agent.api_tool"\n class_name: "WeatherTool"\n tool_config:\n api_key: ${WEATHER_API_KEY}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"execution-order-and-guarantees",children:"Execution Order and Guarantees"}),"\n",(0,i.jsx)(n.p,{children:"It's important to understand the order in which lifecycle hooks are executed, especially if you mix both YAML-based and class-based methods for a single tool."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsxs)(n.strong,{children:["Initialization (",(0,i.jsx)(n.code,{children:"init"}),"):"]})," All ",(0,i.jsx)(n.code,{children:"init"})," hooks are awaited during agent startup. A failure in any ",(0,i.jsx)(n.code,{children:"init"})," hook will prevent the agent from starting."]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["The YAML-based ",(0,i.jsx)(n.code,{children:"init_function"})," is executed first."]}),"\n",(0,i.jsxs)(n.li,{children:["The class-based ",(0,i.jsx)(n.code,{children:"init()"})," method is executed second."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsxs)(n.strong,{children:["Cleanup (",(0,i.jsx)(n.code,{children:"cleanup"}),"):"]})," All registered ",(0,i.jsx)(n.code,{children:"cleanup"})," hooks are executed during agent shutdown. They run in ",(0,i.jsx)(n.strong,{children:"LIFO (Last-In, First-Out)"})," order relative to initialization."]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["The class-based ",(0,i.jsx)(n.code,{children:"cleanup()"})," method is executed first."]}),"\n",(0,i.jsxs)(n.li,{children:["The YAML-based ",(0,i.jsx)(n.code,{children:"cleanup_function"})," is executed second."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"This LIFO order for cleanup is intuitive: the resource that was initialized last is the first one to be torn down."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"adding-validated-configuration-to-dynamic-tools",children:"Adding Validated Configuration to Dynamic Tools"}),"\n",(0,i.jsxs)(n.p,{children:["For any class-based tool (",(0,i.jsx)(n.code,{children:"DynamicTool"})," or ",(0,i.jsx)(n.code,{children:"DynamicToolProvider"}),") that requires configuration, this is the recommended pattern. By linking a Pydantic model to your tool class, you can add automatic validation and type safety to your ",(0,i.jsx)(n.code,{children:"tool_config"}),". This provides several key benefits:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Automatic Validation:"})," The agent will fail to start if the YAML configuration doesn't match your model, providing clear error messages."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Type Safety:"})," Inside your tool, ",(0,i.jsx)(n.code,{children:"self.tool_config"})," is a fully typed Pydantic object, not a dictionary, enabling autocompletion and preventing common errors."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Self-Documentation:"})," The Pydantic model itself serves as clear, machine-readable documentation for your tool's required configuration."]}),"\n"]}),"\n",(0,i.jsxs)(n.h3,{id:"example-1-using-a-pydantic-model-with-a-single-dynamictool",children:["Example 1: Using a Pydantic Model with a Single ",(0,i.jsx)(n.code,{children:"DynamicTool"})]}),"\n",(0,i.jsxs)(n.p,{children:["This example shows how to add a validated configuration to a standalone ",(0,i.jsx)(n.code,{children:"DynamicTool"})," class."]}),"\n",(0,i.jsx)(n.h4,{id:"step-1-define-the-model-and-tool-class",children:"Step 1: Define the Model and Tool Class"}),"\n",(0,i.jsxs)(n.p,{children:["In your tools file, define a ",(0,i.jsx)(n.code,{children:"pydantic.BaseModel"})," for your configuration. Then, in your ",(0,i.jsx)(n.code,{children:"DynamicTool"})," class, link to it using the ",(0,i.jsx)(n.code,{children:"config_model"})," class attribute."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:'# src/my_agent/weather_tools.py\nfrom typing import Dict, Any\nfrom pydantic import BaseModel, Field\nfrom google.genai import types as adk_types\nfrom solace_agent_mesh.agent.tools.dynamic_tool import DynamicTool\n\n# 1. Define the configuration model\nclass WeatherConfig(BaseModel):\n api_key: str = Field(..., description="The API key for the weather service.")\n default_unit: str = Field(default="celsius", description="The default temperature unit.")\n\n# 2. Create a tool and link the config model\nclass GetCurrentWeatherTool(DynamicTool):\n config_model = WeatherConfig\n\n def __init__(self, tool_config: WeatherConfig):\n super().__init__(tool_config)\n # self.tool_config is now a validated WeatherConfig instance\n # You can safely access attributes with type safety\n self.api_key = self.tool_config.api_key\n self.unit = self.tool_config.default_unit\n\n @property\n def tool_name(self) -> str:\n return "get_current_weather"\n\n @property\n def tool_description(self) -> str:\n return f"Get the current weather. The default unit is {self.unit}."\n\n @property\n def parameters_schema(self) -> adk_types.Schema:\n return adk_types.Schema(\n type=adk_types.Type.OBJECT,\n properties={\n "location": adk_types.Schema(type=adk_types.Type.STRING, description="The city and state/country."),\n },\n required=["location"],\n )\n\n async def _run_async_impl(self, args: Dict[str, Any], **kwargs) -> Dict[str, Any]:\n # ... implementation using self.api_key ...\n return {"weather": f"Sunny in {args[\'location\']}"}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"step-2-configure-the-tool-in-yaml",children:"Step 2: Configure the Tool in YAML"}),"\n",(0,i.jsx)(n.p,{children:"The YAML configuration remains simple. The framework handles the validation against your Pydantic model automatically."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:'# In your agent\'s app_config:\ntools:\n - tool_type: python\n component_module: "my_agent.weather_tools"\n # The framework will auto-discover the GetCurrentWeatherTool class\n tool_config:\n api_key: ${WEATHER_API_KEY}\n default_unit: "fahrenheit" # Optional, overrides the model\'s default\n'})}),"\n",(0,i.jsxs)(n.p,{children:["If you were to forget ",(0,i.jsx)(n.code,{children:"api_key"})," in the YAML, the agent would fail to start and print a clear error message indicating that the ",(0,i.jsx)(n.code,{children:"api_key"})," field is required, making debugging configuration issues much easier."]}),"\n",(0,i.jsxs)(n.h3,{id:"example-2-using-a-pydantic-model-with-a-dynamictoolprovider",children:["Example 2: Using a Pydantic Model with a ",(0,i.jsx)(n.code,{children:"DynamicToolProvider"})]}),"\n",(0,i.jsx)(n.p,{children:"The same pattern applies to tool providers, allowing you to pass a validated, type-safe configuration object to your tool factory."}),"\n",(0,i.jsx)(n.h4,{id:"step-1-define-the-model-and-provider-class",children:"Step 1: Define the Model and Provider Class"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:'# src/my_agent/weather_tools_provider.py\nfrom typing import List\nfrom pydantic import BaseModel, Field\nfrom solace_agent_mesh.agent.tools.dynamic_tool import DynamicTool, DynamicToolProvider\n# ... assume GetCurrentWeatherTool is defined in this file or imported ...\n\n# 1. Define the configuration model\nclass WeatherProviderConfig(BaseModel):\n api_key: str = Field(..., description="The API key for the weather service.")\n default_unit: str = Field(default="celsius", description="The default temperature unit.")\n\n# 2. Create a provider and link the config model\nclass WeatherToolProvider(DynamicToolProvider):\n config_model = WeatherProviderConfig\n\n def create_tools(self, tool_config: WeatherProviderConfig) -> List[DynamicTool]:\n # The framework passes a validated WeatherProviderConfig instance here\n return [\n GetCurrentWeatherTool(tool_config=tool_config)\n # You could create other tools here that also use the config\n ]\n'})}),"\n",(0,i.jsx)(n.h4,{id:"step-2-configure-the-provider-in-yaml",children:"Step 2: Configure the Provider in YAML"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:'# In your agent\'s app_config:\ntools:\n - tool_type: python\n component_module: "my_agent.weather_tools_provider"\n # The framework will auto-discover the WeatherToolProvider\n tool_config:\n api_key: ${WEATHER_API_KEY}\n default_unit: "fahrenheit" # Optional, overrides the model\'s default\n'})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"complete-configuration-examples",children:"Complete Configuration Examples"}),"\n",(0,i.jsx)(n.h3,{id:"example-1-simple-function-based-tool-with-all-options",children:"Example 1: Simple Function-Based Tool with All Options"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:'tools:\n - tool_type: python\n tool_name: "custom_calculator"\n tool_description: "Performs custom mathematical calculations"\n component_module: "my_company.tools.calculators"\n function_name: "calculate_advanced_metrics"\n component_base_path: "src/plugins"\n tool_config:\n precision: 6\n use_cache: true\n'})}),"\n",(0,i.jsx)(n.h3,{id:"example-2-dynamictool-class-with-lifecycle-hooks",children:"Example 2: DynamicTool Class with Lifecycle Hooks"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:'tools:\n - tool_type: python\n component_module: "my_agent.db_tools"\n class_name: "DatabaseQueryTool"\n tool_config:\n connection_string: "postgresql://user:pass@host/db"\n max_rows: 1000\n'})}),"\n",(0,i.jsx)(n.h3,{id:"example-3-function-based-tool-with-yaml-lifecycle-hooks",children:"Example 3: Function-Based Tool with YAML Lifecycle Hooks"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:'tools:\n - tool_type: python\n component_module: "my_agent.db_tools"\n function_name: "query_database"\n init_function: "initialize_db_connection"\n cleanup_function: "close_db_connection"\n tool_config:\n connection_string: "postgresql://user:pass@host/db"\n'})}),"\n",(0,i.jsx)(n.h3,{id:"example-4-dynamictoolprovider-for-multiple-tools",children:"Example 4: DynamicToolProvider for Multiple Tools"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:'tools:\n - tool_type: python\n component_module: "my_agent.database_tools"\n # The provider will be auto-discovered and will create multiple tools\n tool_config:\n connection_string: ${DB_CONNECTION_STRING}\n max_rows: 1000\n'})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.p,{children:"For additional ways to extend agent capabilities:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Built-in Tools"}),": See ",(0,i.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/components/builtin-tools/",children:"Configuring Built-in Tools"})," for pre-packaged tools for file management, data analysis, web requests, and more"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"MCP Integration"}),": See ",(0,i.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/developing/tutorials/mcp-integration",children:"MCP Integration Tutorial"})," for connecting to Model Context Protocol servers to access external tools and resources"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>l,x:()=>a});var t=o(6540);const i={},s=t.createContext(i);function l(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[1193],{8873:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>l,metadata:()=>o,toc:()=>a});const o=JSON.parse('{"id":"documentation/components/builtin-tools/builtin-tools","title":"Configuring Built-in Tools","description":"This guide provides instructions for enabling and configuring the built-in tools provided by Agent Mesh framework.","source":"@site/docs/documentation/components/builtin-tools/builtin-tools.md","sourceDirName":"documentation/components/builtin-tools","slug":"/documentation/components/builtin-tools/","permalink":"/solace-agent-mesh/docs/documentation/components/builtin-tools/","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/components/builtin-tools/builtin-tools.md","tags":[],"version":"current","sidebarPosition":60,"frontMatter":{"title":"Configuring Built-in Tools","sidebar_position":60},"sidebar":"docSidebar","previous":{"title":"Agent Mesh CLI","permalink":"/solace-agent-mesh/docs/documentation/components/cli"},"next":{"title":"Artifact Management Tools","permalink":"/solace-agent-mesh/docs/documentation/components/builtin-tools/artifact-management"}}');var t=i(4848),s=i(8453);const l={title:"Configuring Built-in Tools",sidebar_position:60},r="Configuring Built-in Tools",d={},a=[{value:"Overview",id:"overview",level:2},{value:"Configuration Methods",id:"configuration-methods",level:2},{value:"Method 1: Enabling Tool Groups (Recommended)",id:"method-1-enabling-tool-groups-recommended",level:3},{value:"Method 2: Enabling Individual Tools",id:"method-2-enabling-individual-tools",level:3},{value:"Available Tool Groups and Tools",id:"available-tool-groups-and-tools",level:2},{value:"Artifact Management",id:"artifact-management",level:3},{value:"Data Analysis",id:"data-analysis",level:3},{value:"Web",id:"web",level:3},{value:"Audio",id:"audio",level:3},{value:"Image",id:"image",level:3},{value:"General",id:"general",level:3},{value:"Complete Configuration Example",id:"complete-configuration-example",level:2},{value:"Additional Tool Types",id:"additional-tool-types",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"configuring-built-in-tools",children:"Configuring Built-in Tools"})}),"\n",(0,t.jsx)(n.p,{children:"This guide provides instructions for enabling and configuring the built-in tools provided by Agent Mesh framework."}),"\n",(0,t.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(n.p,{children:"Built-in tools are pre-packaged functionalities that can be granted to agents without requiring custom Python code. These tools address common operations such as file management, data analysis, web requests, and multi-modal generation."}),"\n",(0,t.jsxs)(n.p,{children:["The Agent Mesh framework manages these tools through a central ",(0,t.jsx)(n.code,{children:"tool_registry"}),", which is responsible for loading the tools, generating instructional prompts for the Large Language Model (LLM), and handling their execution in a consistent manner."]}),"\n",(0,t.jsx)(n.h2,{id:"configuration-methods",children:"Configuration Methods"}),"\n",(0,t.jsxs)(n.p,{children:["Tool configuration is managed within the ",(0,t.jsx)(n.code,{children:"tools"})," list in an agent's ",(0,t.jsx)(n.code,{children:"app_config"})," block in the corresponding YAML configuration file."]}),"\n",(0,t.jsx)(n.h3,{id:"method-1-enabling-tool-groups-recommended",children:"Method 1: Enabling Tool Groups (Recommended)"}),"\n",(0,t.jsx)(n.p,{children:"For efficient configuration, built-in tools are organized into logical groups. An entire group of related tools can be enabled with a single entry. This is the recommended approach for standard functionalities."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Example:"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'# In your agent\'s app_config:\ntools:\n - tool_type: builtin-group\n group_name: "artifact_management"\n - tool_type: builtin-group\n group_name: "data_analysis"\n'})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Configuration:"})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Field"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Required"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"tool_type"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"Yes"}),(0,t.jsxs)(n.td,{children:["Must be ",(0,t.jsx)(n.code,{children:"builtin-group"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"group_name"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"Yes"}),(0,t.jsxs)(n.td,{children:["Tool group identifier. Available groups: ",(0,t.jsx)(n.code,{children:"artifact_management"}),", ",(0,t.jsx)(n.code,{children:"data_analysis"}),", ",(0,t.jsx)(n.code,{children:"web"}),", ",(0,t.jsx)(n.code,{children:"audio"}),", ",(0,t.jsx)(n.code,{children:"image"}),", ",(0,t.jsx)(n.code,{children:"general"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"tool_config"})}),(0,t.jsx)(n.td,{children:"object"}),(0,t.jsx)(n.td,{children:"No"}),(0,t.jsx)(n.td,{children:"Group-specific configuration parameters"})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"method-2-enabling-individual-tools",children:"Method 2: Enabling Individual Tools"}),"\n",(0,t.jsx)(n.p,{children:"For more granular control over an agent's capabilities, specific tools can be enabled individually."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Example:"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'# In your agent\'s app_config:\ntools:\n - tool_type: builtin\n tool_name: "web_request"\n - tool_type: builtin\n tool_name: "time_delay"\n'})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Configuration:"})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Field"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Required"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"tool_type"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"Yes"}),(0,t.jsxs)(n.td,{children:["Must be ",(0,t.jsx)(n.code,{children:"builtin"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"tool_name"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"Yes"}),(0,t.jsx)(n.td,{children:"Specific tool name to enable"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"tool_config"})}),(0,t.jsx)(n.td,{children:"object"}),(0,t.jsx)(n.td,{children:"No"}),(0,t.jsx)(n.td,{children:"Tool-specific configuration parameters"})]})]})]}),"\n",(0,t.jsx)(n.admonition,{title:"Note",type:"info",children:(0,t.jsx)(n.p,{children:"The Agent Mesh framework automatically handles duplicate tool registrations. If a tool group is enabled and a tool from that group is also listed individually, the tool is only loaded once."})}),"\n",(0,t.jsx)(n.h2,{id:"available-tool-groups-and-tools",children:"Available Tool Groups and Tools"}),"\n",(0,t.jsx)(n.p,{children:"The following sections detail the available tool groups and the individual tools they contain."}),"\n",(0,t.jsx)(n.h3,{id:"artifact-management",children:"Artifact Management"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Group Name"}),": ",(0,t.jsx)(n.code,{children:"artifact_management"})]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Description"}),": Tools for creating, loading, and managing file artifacts."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Individual Tools"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"append_to_artifact"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"list_artifacts"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"load_artifact"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"apply_embed_and_create_artifact"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"extract_content_from_artifact"})}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["For a more in-depth guide on using artifact management tools, refer to the ",(0,t.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/components/builtin-tools/artifact-management",children:"Artifact Management"})," documentation."]})}),"\n",(0,t.jsx)(n.h3,{id:"data-analysis",children:"Data Analysis"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Group Name"}),": ",(0,t.jsx)(n.code,{children:"data_analysis"})]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Description"}),": Tools for querying, transforming, and visualizing data."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Individual Tools"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"query_data_with_sql"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"create_sqlite_db"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"transform_data_with_jq"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"create_chart_from_plotly_config"})}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["For a more in-depth guide on using Data Analysis tools, refer to the ",(0,t.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/components/builtin-tools/data-analysis-tools",children:"Data Analysis Tools"})," documentation."]})}),"\n",(0,t.jsx)(n.h3,{id:"web",children:"Web"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Group Name"}),": ",(0,t.jsx)(n.code,{children:"web"})]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Description"}),": Tools for interacting with web resources."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Individual Tools"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"web_request"})}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"audio",children:"Audio"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Group Name"}),": ",(0,t.jsx)(n.code,{children:"audio"})]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Description"}),": Tools for generating and transcribing audio content."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Individual Tools"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"text_to_speech"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"multi_speaker_text_to_speech"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"transcribe_audio"})}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"image",children:"Image"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Group Name"}),": ",(0,t.jsx)(n.code,{children:"image"})]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Description"}),": Tools for generating and analyzing images."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Individual Tools"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"create_image_from_description"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"describe_image"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"edit_image_with_gemini"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"describe_audio"})}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"general",children:"General"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Group Name"}),": ",(0,t.jsx)(n.code,{children:"general"})]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Description"}),": General-purpose utility tools."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Individual Tools"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"convert_file_to_markdown"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"mermaid_diagram_generator"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"complete-configuration-example",children:"Complete Configuration Example"}),"\n",(0,t.jsxs)(n.p,{children:["Below is a comprehensive example of a well-formed ",(0,t.jsx)(n.code,{children:"app_config"})," that uses the unified method to enable a mix of tool groups and individual tools."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'# In your agent\'s YAML file:\napp_config:\n namespace: "myorg/dev"\n agent_name: "DataAndWebAgent"\n model: "gemini-1.5-pro"\n instruction: "You are an agent that can analyze data and browse the web."\n\n # --- Unified Tool Configuration ---\n tools:\n # Enable a group of tools\n - tool_type: builtin-group\n group_name: "data_analysis"\n\n # Enable another group\n - tool_type: builtin-group\n group_name: "artifact_management"\n\n # Enable a single, specific tool\n - tool_type: builtin\n tool_name: "web_request"\n\n # ... other service configurations (session_service, artifact_service, etc.)\n'})}),"\n",(0,t.jsx)(n.h2,{id:"additional-tool-types",children:"Additional Tool Types"}),"\n",(0,t.jsx)(n.p,{children:"For extending agent capabilities beyond built-in tools:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Custom Python Tools"}),": See ",(0,t.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/developing/creating-python-tools",children:"Creating Python Tools"})," for creating custom tools with your own business logic"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"MCP Integration"}),": See ",(0,t.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/developing/tutorials/mcp-integration",children:"MCP Integration Tutorial"})," for connecting to Model Context Protocol servers"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>l,x:()=>r});var o=i(6540);const t={},s=o.createContext(t);function l(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[6239],{1743:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>m,frontMatter:()=>l,metadata:()=>o,toc:()=>c});const o=JSON.parse('{"id":"documentation/developing/tutorials/mcp-integration","title":"MCP Integration","description":"This tutorial walks you through the process of integrating a Model Context Protocol (MCP) Server into Agent Mesh.","source":"@site/docs/documentation/developing/tutorials/mcp-integration.md","sourceDirName":"documentation/developing/tutorials","slug":"/documentation/developing/tutorials/mcp-integration","permalink":"/solace-agent-mesh/docs/documentation/developing/tutorials/mcp-integration","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/developing/tutorials/mcp-integration.md","tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"title":"MCP Integration","sidebar_position":10},"sidebar":"docSidebar","previous":{"title":"Build Your Own Agent","permalink":"/solace-agent-mesh/docs/documentation/developing/tutorials/custom-agent"},"next":{"title":"REST Gateway","permalink":"/solace-agent-mesh/docs/documentation/developing/tutorials/rest-gateway"}}');var s=t(4848),i=t(8453);const l={title:"MCP Integration",sidebar_position:10},r="MCP Integration",a={},c=[{value:"Setting Up the Environment",id:"setting-up-the-environment",level:2},{value:"Adding MCP Tools to an Agent",id:"adding-mcp-tools-to-an-agent",level:2},{value:"1. Stdio Connection (Local MCP Servers)",id:"1-stdio-connection-local-mcp-servers",level:3},{value:"2. SSE Connection (Remote MCP Servers)",id:"2-sse-connection-remote-mcp-servers",level:3},{value:"3. StreamableHTTP Connection (Remote MCP Servers)",id:"3-streamablehttp-connection-remote-mcp-servers",level:3},{value:"4. Docker Connection (Containerized MCP Servers)",id:"4-docker-connection-containerized-mcp-servers",level:3},{value:"Complete Example: Filesystem MCP Agent",id:"complete-example-filesystem-mcp-agent",level:2},{value:"Configuration Options",id:"configuration-options",level:2},{value:"Tool Filtering",id:"tool-filtering",level:3},{value:"Single Tool (tool_name)",id:"single-tool-tool_name",level:4},{value:"Allow List",id:"allow-list",level:4},{value:"Deny List",id:"deny-list",level:4},{value:"Environment Variables",id:"environment-variables",level:3},{value:"Running Your MCP-Enabled Agent",id:"running-your-mcp-enabled-agent",level:2},{value:"How MCP Integration Works",id:"how-mcp-integration-works",level:2},{value:"Testing Your MCP Integration",id:"testing-your-mcp-integration",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"mcp-integration",children:"MCP Integration"})}),"\n",(0,s.jsx)(n.p,{children:"This tutorial walks you through the process of integrating a Model Context Protocol (MCP) Server into Agent Mesh."}),"\n",(0,s.jsx)(n.admonition,{title:"Learn about agents",type:"info",children:(0,s.jsxs)(n.p,{children:["You should have an understanding of agents in Agent Mesh. For more information, see ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/components/agents",children:"Agents"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["Agent Mesh now provides ",(0,s.jsx)(n.strong,{children:"native MCP support"})," through the framework itself. No additional plugins are required - you can connect to MCP servers directly by configuring your agent YAML file with MCP tools."]}),"\n",(0,s.jsx)(n.p,{children:"MCP integration allows your agents to connect to external MCP servers and use their tools, resources, and prompts seamlessly within the A2A protocol ecosystem."}),"\n",(0,s.jsx)(n.h2,{id:"setting-up-the-environment",children:"Setting Up the Environment"}),"\n",(0,s.jsxs)(n.p,{children:["You must ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/installing-and-configuring/installation",children:"install Agent Mesh and the CLI"}),", and then ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/installing-and-configuring/run-project",children:"create a new Agent Mesh project"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"For this tutorial using the filesystem MCP server, you also need Node.js and NPM installed."}),"\n",(0,s.jsx)(n.h2,{id:"adding-mcp-tools-to-an-agent",children:"Adding MCP Tools to an Agent"}),"\n",(0,s.jsx)(n.p,{children:"MCP integration is accomplished by adding MCP tools directly to your agent configuration. There are three main connection types supported:"}),"\n",(0,s.jsx)(n.h3,{id:"1-stdio-connection-local-mcp-servers",children:"1. Stdio Connection (Local MCP Servers)"}),"\n",(0,s.jsx)(n.p,{children:"This is the most common method for connecting to MCP servers that run as local processes:"}),"\n",(0,s.jsxs)(n.admonition,{title:"Install node package",type:"info",children:[(0,s.jsx)(n.p,{children:"You must install node package @modelcontextprotocol/server-filesystem securely in your local system."}),(0,s.jsxs)(n.p,{children:["You must set the ",(0,s.jsx)(n.code,{children:"command"})," parameter to your local path that points to the ",(0,s.jsx)(n.code,{children:"mcp-server-filesystem"})," binary executable."]})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'tools:\n - tool_type: mcp\n connection_params:\n type: stdio\n command: "./node_modules/.bin/mcp-server-filesystem"\n args:\n - "/tmp/samv2"\n'})}),"\n",(0,s.jsx)(n.h3,{id:"2-sse-connection-remote-mcp-servers",children:"2. SSE Connection (Remote MCP Servers)"}),"\n",(0,s.jsx)(n.p,{children:"For connecting to remote MCP servers using Server-Sent Events:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'tools:\n - tool_type: mcp\n connection_params:\n type: sse\n url: "https://mcp.example.com/v1/sse"\n headers:\n Authorization: "Bearer ${MCP_AUTH_TOKEN}"\n'})}),"\n",(0,s.jsx)(n.h3,{id:"3-streamablehttp-connection-remote-mcp-servers",children:"3. StreamableHTTP Connection (Remote MCP Servers)"}),"\n",(0,s.jsx)(n.p,{children:"For connecting to remote MCP servers using Server-Sent Events:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'tools:\n - tool_type: mcp\n connection_params:\n type: streamable-http\n url: "https://mcp.example.com:<port>/mcp/message"\n headers:\n Authorization: "Bearer ${MCP_AUTH_TOKEN}"\n'})}),"\n",(0,s.jsx)(n.h3,{id:"4-docker-connection-containerized-mcp-servers",children:"4. Docker Connection (Containerized MCP Servers)"}),"\n",(0,s.jsx)(n.p,{children:"For running MCP servers in Docker containers:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'tools:\n - tool_type: mcp\n connection_params:\n type: stdio\n command: "docker"\n args:\n - "run"\n - "-i"\n - "--rm"\n - "-e"\n - "API_KEY"\n - "mcp-server-image:latest"\n environment_variables:\n API_KEY: ${MY_API_KEY}\n'})}),"\n",(0,s.jsx)(n.h2,{id:"complete-example-filesystem-mcp-agent",children:"Complete Example: Filesystem MCP Agent"}),"\n",(0,s.jsx)(n.p,{children:"Here is a complete example of an agent that uses the filesystem MCP server:"}),"\n",(0,s.jsxs)(n.admonition,{title:"Install node package",type:"info",children:[(0,s.jsx)(n.p,{children:"You must install node package @modelcontextprotocol/server-filesystem securely in your local system."}),(0,s.jsxs)(n.p,{children:["You must set the ",(0,s.jsx)(n.code,{children:"command"})," parameter to your local path that points to the ",(0,s.jsx)(n.code,{children:"mcp-server-filesystem"})," binary executable."]})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'# configs/agents/filesystem_agent.yaml\nlog:\n stdout_log_level: INFO\n log_file_level: DEBUG\n log_file: filesystem_agent.log\n\n!include ../shared_config.yaml\n\napps:\n - name: filesystem_mcp_agent_app\n app_base_path: .\n app_module: solace_agent_mesh.agent.sac.app\n broker:\n <<: *broker_connection\n\n app_config:\n namespace: ${NAMESPACE}\n supports_streaming: true\n agent_name: "FileSystemAgent"\n display_name: "File System"\n model: *general_model\n \n instruction: |\n You can interact with the local filesystem using MCP tools.\n Use the available tools to read, write, and manage files as requested.\n\n tools:\n - tool_type: mcp\n connection_params:\n type: stdio\n command: "./node_modules/.bin/mcp-server-filesystem"\n args:\n - "/tmp/samv2"\n - tool_type: builtin-group\n group_name: "artifact_management"\n\n session_service: *default_session_service\n artifact_service: *default_artifact_service\n\n # Agent discovery and communication\n agent_card:\n description: "An agent that interacts with the local filesystem via MCP."\n defaultInputModes: ["text"]\n defaultOutputModes: ["text", "file"]\n skills: []\n\n agent_card_publishing: { interval_seconds: 10 }\n agent_discovery: { enabled: true }\n inter_agent_communication:\n allow_list: ["*"]\n request_timeout_seconds: 30\n'})}),"\n",(0,s.jsx)(n.h2,{id:"configuration-options",children:"Configuration Options"}),"\n",(0,s.jsx)(n.h3,{id:"tool-filtering",children:"Tool Filtering"}),"\n",(0,s.jsx)(n.p,{children:"You can control which tools from an MCP server are available to your agent using three mutually exclusive filtering options."}),"\n",(0,s.jsx)(n.admonition,{title:"Install node package",type:"info",children:(0,s.jsxs)(n.p,{children:["The examples below use the filesystem MCP server. You must install node package @modelcontextprotocol/server-filesystem securely in your local system and set the ",(0,s.jsx)(n.code,{children:"command"})," parameter to your local path that points to the ",(0,s.jsx)(n.code,{children:"mcp-server-filesystem"})," binary executable."]})}),"\n",(0,s.jsx)(n.h4,{id:"single-tool-tool_name",children:"Single Tool (tool_name)"}),"\n",(0,s.jsxs)(n.p,{children:["Use ",(0,s.jsx)(n.code,{children:"tool_name"})," to expose only a single specific tool:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'tools:\n - tool_type: mcp\n tool_name: "read_file" # Only expose the read_file tool\n connection_params:\n type: stdio\n command: "./node_modules/.bin/mcp-server-filesystem"\n args:\n - "/tmp/samv2"\n'})}),"\n",(0,s.jsx)(n.h4,{id:"allow-list",children:"Allow List"}),"\n",(0,s.jsxs)(n.p,{children:["Use ",(0,s.jsx)(n.code,{children:"allow_list"})," to expose multiple specific tools:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'tools:\n - tool_type: mcp\n allow_list: # Only expose these tools\n - read_file\n - write_file\n - list_directory\n connection_params:\n type: stdio\n command: "./node_modules/.bin/mcp-server-filesystem"\n args:\n - "/tmp/samv2"\n'})}),"\n",(0,s.jsx)(n.h4,{id:"deny-list",children:"Deny List"}),"\n",(0,s.jsxs)(n.p,{children:["Use ",(0,s.jsx)(n.code,{children:"deny_list"})," to expose all tools except specific ones:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'tools:\n - tool_type: mcp\n deny_list: # Expose all tools EXCEPT these\n - delete_file\n - move_file\n connection_params:\n type: stdio\n command: "./node_modules/.bin/mcp-server-filesystem"\n args:\n - "/tmp/samv2"\n'})}),"\n",(0,s.jsx)(n.admonition,{title:"Mutual Exclusivity",type:"warning",children:(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"tool_name"}),", ",(0,s.jsx)(n.code,{children:"allow_list"}),", and ",(0,s.jsx)(n.code,{children:"deny_list"})," options are mutually exclusive. You can only use one of these filtering options per MCP tool configuration."]})}),"\n",(0,s.jsx)(n.h3,{id:"environment-variables",children:"Environment Variables"}),"\n",(0,s.jsxs)(n.p,{children:["Pass environment variables to MCP servers using the ",(0,s.jsx)(n.code,{children:"environment_variables"})," block:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'tools:\n - tool_type: mcp\n connection_params:\n type: stdio\n command: "my-mcp-server"\n environment_variables:\n API_KEY: ${MY_API_KEY}\n DEBUG_MODE: "true"\n CONFIG_PATH: "/etc/myconfig"\n'})}),"\n",(0,s.jsx)(n.h2,{id:"running-your-mcp-enabled-agent",children:"Running Your MCP-Enabled Agent"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Create the working directory"})," (for filesystem example):"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'mkdir -p /tmp/samv2\necho "Hello MCP!" > /tmp/samv2/test.txt\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Set required environment variables"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'export NAMESPACE="myorg/dev"\nexport SOLACE_BROKER_URL="ws://localhost:8008"\n# ... other Solace broker settings\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Run the agent"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"sam run configs/agents/filesystem_agent.yaml\n"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"how-mcp-integration-works",children:"How MCP Integration Works"}),"\n",(0,s.jsx)(n.p,{children:"When your agent starts:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Connection"}),": The framework establishes a connection to the MCP server using the specified connection parameters"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Discovery"}),": It queries the MCP server for available tools, resources, and prompts"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Registration"}),": Available capabilities are registered as agent tools."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Communication"}),": The agent can use these tools through the standard A2A protocol, with the framework handling MCP protocol translation"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"testing-your-mcp-integration",children:"Testing Your MCP Integration"}),"\n",(0,s.jsx)(n.p,{children:"Once your MCP-enabled agent is running, you can test it through any gateway in your project (such as the Web UI gateway):"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Access your gateway"})," (for example, Web UI at ",(0,s.jsx)(n.code,{children:"http://localhost:8000"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Send a request"})," to test the MCP functionality:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:'"List the files in the directory"'}),"\n",(0,s.jsx)(n.li,{children:'"Create a simple text file with some content"'}),"\n",(0,s.jsx)(n.li,{children:'"Read the contents of test.txt"'}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The agent uses the MCP tools to interact with the filesystem and provide responses through the A2A protocol."})]})}function m(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>r});var o=t(6540);const s={},i=o.createContext(s);function l(e){const n=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]);