solace-agent-mesh 1.4.12__py3-none-any.whl → 1.5.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of solace-agent-mesh might be problematic. Click here for more details.

Files changed (359) hide show
  1. solace_agent_mesh/agent/adk/adk_llm.txt +3 -4
  2. solace_agent_mesh/agent/adk/adk_llm_detail.txt +566 -0
  3. solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +1 -1
  4. solace_agent_mesh/agent/adk/callbacks.py +56 -5
  5. solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +3 -1
  6. solace_agent_mesh/agent/adk/intelligent_mcp_callbacks.py +2 -1
  7. solace_agent_mesh/agent/adk/mcp_content_processor.py +2 -1
  8. solace_agent_mesh/agent/adk/models/lite_llm.py +1 -0
  9. solace_agent_mesh/agent/adk/models/models_llm.txt +1 -2
  10. solace_agent_mesh/agent/adk/runner.py +3 -1
  11. solace_agent_mesh/agent/adk/services.py +4 -1
  12. solace_agent_mesh/agent/adk/setup.py +3 -1
  13. solace_agent_mesh/agent/adk/tool_wrapper.py +2 -2
  14. solace_agent_mesh/agent/agent_llm.txt +1 -1
  15. solace_agent_mesh/agent/agent_llm_detail.txt +1702 -0
  16. solace_agent_mesh/agent/protocol/event_handlers.py +4 -14
  17. solace_agent_mesh/agent/protocol/protocol_llm.txt +15 -2
  18. solace_agent_mesh/agent/protocol/protocol_llm_detail.txt +92 -0
  19. solace_agent_mesh/agent/sac/app.py +3 -1
  20. solace_agent_mesh/agent/sac/component.py +55 -22
  21. solace_agent_mesh/agent/sac/sac_llm.txt +15 -1
  22. solace_agent_mesh/agent/sac/sac_llm_detail.txt +200 -0
  23. solace_agent_mesh/agent/sac/task_execution_context.py +73 -0
  24. solace_agent_mesh/agent/testing/testing_llm_detail.txt +68 -0
  25. solace_agent_mesh/agent/tools/audio_tools.py +2 -1
  26. solace_agent_mesh/agent/tools/builtin_artifact_tools.py +3 -1
  27. solace_agent_mesh/agent/tools/builtin_data_analysis_tools.py +3 -1
  28. solace_agent_mesh/agent/tools/dynamic_tool.py +2 -1
  29. solace_agent_mesh/agent/tools/general_agent_tools.py +2 -1
  30. solace_agent_mesh/agent/tools/image_tools.py +2 -1
  31. solace_agent_mesh/agent/tools/peer_agent_tool.py +2 -1
  32. solace_agent_mesh/agent/tools/registry.py +3 -1
  33. solace_agent_mesh/agent/tools/test_tools.py +2 -1
  34. solace_agent_mesh/agent/tools/tools_llm.txt +148 -154
  35. solace_agent_mesh/agent/tools/tools_llm_detail.txt +274 -0
  36. solace_agent_mesh/agent/tools/web_tools.py +2 -1
  37. solace_agent_mesh/agent/utils/artifact_helpers.py +3 -1
  38. solace_agent_mesh/agent/utils/config_parser.py +3 -1
  39. solace_agent_mesh/agent/utils/utils_llm.txt +1 -1
  40. solace_agent_mesh/agent/utils/utils_llm_detail.txt +149 -0
  41. solace_agent_mesh/assets/docs/404.html +3 -3
  42. solace_agent_mesh/assets/docs/assets/js/{b7006a3a.73a79653.js → 032c2d61.f3d37824.js} +1 -1
  43. solace_agent_mesh/assets/docs/assets/js/0bcf40b7.c019ad46.js +1 -0
  44. solace_agent_mesh/assets/docs/assets/js/15ba94aa.932dd2db.js +1 -0
  45. solace_agent_mesh/assets/docs/assets/js/2131ec11.5c7a1f6e.js +1 -0
  46. solace_agent_mesh/assets/docs/assets/js/{2334.622a6395.js → 2334.1cf50a20.js} +1 -1
  47. solace_agent_mesh/assets/docs/assets/js/240a0364.7eac6021.js +1 -0
  48. solace_agent_mesh/assets/docs/assets/js/2e32b5e0.33f5d75b.js +1 -0
  49. solace_agent_mesh/assets/docs/assets/js/341393d4.0fac2613.js +1 -0
  50. solace_agent_mesh/assets/docs/assets/js/{3624.b524e433.js → 3624.0eaa1fd0.js} +1 -1
  51. solace_agent_mesh/assets/docs/assets/js/3a6c6137.f5940cfa.js +1 -0
  52. solace_agent_mesh/assets/docs/assets/js/3ac1795d.76654dd9.js +1 -0
  53. solace_agent_mesh/assets/docs/assets/js/3ff0015d.2be20244.js +1 -0
  54. solace_agent_mesh/assets/docs/assets/js/509e993c.4c7a1a6d.js +1 -0
  55. solace_agent_mesh/assets/docs/assets/js/547e15cc.2cbb060a.js +1 -0
  56. solace_agent_mesh/assets/docs/assets/js/55b7b518.f2b1d1ba.js +1 -0
  57. solace_agent_mesh/assets/docs/assets/js/5c2bd65f.e49689dd.js +1 -0
  58. solace_agent_mesh/assets/docs/assets/js/6063ff4c.ef84f702.js +1 -0
  59. solace_agent_mesh/assets/docs/assets/js/631738c7.a8b1ef8b.js +1 -0
  60. solace_agent_mesh/assets/docs/assets/js/6a520c9d.ba015d81.js +1 -0
  61. solace_agent_mesh/assets/docs/assets/js/6ad8f0bd.39d5851d.js +1 -0
  62. solace_agent_mesh/assets/docs/assets/js/6d84eae0.4a5fbf39.js +1 -0
  63. solace_agent_mesh/assets/docs/assets/js/6fdfefc7.99de744e.js +1 -0
  64. solace_agent_mesh/assets/docs/assets/js/71da7b71.804d6567.js +1 -0
  65. solace_agent_mesh/assets/docs/assets/js/722f809d.965da774.js +1 -0
  66. solace_agent_mesh/assets/docs/assets/js/742f027b.46c07808.js +1 -0
  67. solace_agent_mesh/assets/docs/assets/js/77cf947d.64c9bd6c.js +1 -0
  68. solace_agent_mesh/assets/docs/assets/js/8024126c.56e59919.js +1 -0
  69. solace_agent_mesh/assets/docs/assets/js/81a99df0.07034dd9.js +1 -0
  70. solace_agent_mesh/assets/docs/assets/js/82fbfb93.139a1a1f.js +1 -0
  71. solace_agent_mesh/assets/docs/assets/js/{8591.d7c16be6.js → 8591.5d015485.js} +2 -2
  72. solace_agent_mesh/assets/docs/assets/js/{8731.49e930c2.js → 8731.6c1dbf0c.js} +1 -1
  73. solace_agent_mesh/assets/docs/assets/js/945fb41e.6f4cdffd.js +1 -0
  74. solace_agent_mesh/assets/docs/assets/js/94e8668d.b5ddb7a1.js +1 -0
  75. solace_agent_mesh/assets/docs/assets/js/9bb13469.dd1c9b54.js +1 -0
  76. solace_agent_mesh/assets/docs/assets/js/9e9d0a82.dd810042.js +1 -0
  77. solace_agent_mesh/assets/docs/assets/js/ab9708a8.3e6dd091.js +1 -0
  78. solace_agent_mesh/assets/docs/assets/js/ad71b5ed.60668e9e.js +1 -0
  79. solace_agent_mesh/assets/docs/assets/js/c198a0dc.8f31f867.js +1 -0
  80. solace_agent_mesh/assets/docs/assets/js/c93cbaa0.eaff365e.js +1 -0
  81. solace_agent_mesh/assets/docs/assets/js/da0b5bad.9d369087.js +1 -0
  82. solace_agent_mesh/assets/docs/assets/js/db924877.cbc66f02.js +1 -0
  83. solace_agent_mesh/assets/docs/assets/js/dd817ffc.0aa9630a.js +1 -0
  84. solace_agent_mesh/assets/docs/assets/js/dd81e2b8.d590bc9e.js +1 -0
  85. solace_agent_mesh/assets/docs/assets/js/de5f4c65.e8241890.js +1 -0
  86. solace_agent_mesh/assets/docs/assets/js/de915948.139b4b9c.js +1 -0
  87. solace_agent_mesh/assets/docs/assets/js/e3d9abda.2b916f9e.js +1 -0
  88. solace_agent_mesh/assets/docs/assets/js/e6f9706b.582a78ca.js +1 -0
  89. solace_agent_mesh/assets/docs/assets/js/e92d0134.cf6d6522.js +1 -0
  90. solace_agent_mesh/assets/docs/assets/js/f284c35a.5766a13d.js +1 -0
  91. solace_agent_mesh/assets/docs/assets/js/ff4d71f2.9c0297a6.js +1 -0
  92. solace_agent_mesh/assets/docs/assets/js/main.bd3c34f3.js +2 -0
  93. solace_agent_mesh/assets/docs/assets/js/runtime~main.18dc45dd.js +1 -0
  94. solace_agent_mesh/assets/docs/docs/documentation/components/agents/index.html +143 -0
  95. solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/artifact-management/index.html +7 -7
  96. solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/audio-tools/index.html +7 -7
  97. solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/data-analysis-tools/index.html +8 -8
  98. solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/embeds/index.html +6 -6
  99. solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/index.html +11 -11
  100. solace_agent_mesh/assets/docs/docs/documentation/{concepts → components}/cli/index.html +25 -25
  101. solace_agent_mesh/assets/docs/docs/documentation/components/gateways/index.html +91 -0
  102. solace_agent_mesh/assets/docs/docs/documentation/components/index.html +29 -0
  103. solace_agent_mesh/assets/docs/docs/documentation/components/orchestrator/index.html +55 -0
  104. solace_agent_mesh/assets/docs/docs/documentation/components/plugins/index.html +110 -0
  105. solace_agent_mesh/assets/docs/docs/documentation/deploying/debugging/index.html +104 -0
  106. solace_agent_mesh/assets/docs/docs/documentation/deploying/deployment-options/index.html +57 -0
  107. solace_agent_mesh/assets/docs/docs/documentation/deploying/index.html +25 -0
  108. solace_agent_mesh/assets/docs/docs/documentation/deploying/observability/index.html +59 -0
  109. solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/create-agents/index.html +113 -152
  110. solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/create-gateways/index.html +9 -9
  111. solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/creating-python-tools/index.html +12 -12
  112. solace_agent_mesh/assets/docs/docs/documentation/developing/creating-service-providers/index.html +54 -0
  113. solace_agent_mesh/assets/docs/docs/documentation/developing/index.html +32 -0
  114. solace_agent_mesh/assets/docs/docs/documentation/developing/structure/index.html +55 -0
  115. solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/bedrock-agents/index.html +25 -25
  116. solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/custom-agent/index.html +13 -13
  117. solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/event-mesh-gateway/index.html +11 -11
  118. solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/mcp-integration/index.html +10 -10
  119. solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/mongodb-integration/index.html +13 -13
  120. solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/rag-integration/index.html +13 -13
  121. solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/rest-gateway/index.html +10 -10
  122. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/slack-integration/index.html +72 -0
  123. solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/sql-database/index.html +14 -14
  124. solace_agent_mesh/assets/docs/docs/documentation/enterprise/index.html +33 -0
  125. solace_agent_mesh/assets/docs/docs/documentation/enterprise/installation/index.html +83 -0
  126. solace_agent_mesh/assets/docs/docs/documentation/enterprise/rbac-setup-guide/index.html +222 -0
  127. solace_agent_mesh/assets/docs/docs/documentation/enterprise/single-sign-on/index.html +161 -0
  128. solace_agent_mesh/assets/docs/docs/documentation/getting-started/architecture/index.html +75 -0
  129. solace_agent_mesh/assets/docs/docs/documentation/getting-started/index.html +53 -0
  130. solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +35 -100
  131. solace_agent_mesh/assets/docs/docs/documentation/getting-started/try-agent-mesh/index.html +41 -0
  132. solace_agent_mesh/assets/docs/docs/documentation/{getting-started → installing-and-configuring}/configurations/index.html +56 -50
  133. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/index.html +25 -0
  134. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/installation/index.html +76 -0
  135. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/large_language_models/index.html +63 -0
  136. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/run-project/index.html +142 -0
  137. solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0/index.html +100 -0
  138. solace_agent_mesh/assets/docs/docs/documentation/{Migrations/A2A Upgrade To 0.3.0/a2a-technical-migration-map/index.html → migrations/a2a-upgrade/a2a-technical-migration-map/index.html} +10 -11
  139. solace_agent_mesh/assets/docs/img/solace-logo.png +0 -0
  140. solace_agent_mesh/assets/docs/lunr-index-1760121512891.json +1 -0
  141. solace_agent_mesh/assets/docs/lunr-index.json +1 -1
  142. solace_agent_mesh/assets/docs/search-doc-1760121512891.json +1 -0
  143. solace_agent_mesh/assets/docs/search-doc.json +1 -1
  144. solace_agent_mesh/assets/docs/sitemap.xml +1 -1
  145. solace_agent_mesh/cli/__init__.py +1 -1
  146. solace_agent_mesh/client/webui/frontend/static/assets/{authCallback-j1LW-wlq.js → authCallback-DwrxZE0E.js} +1 -1
  147. solace_agent_mesh/client/webui/frontend/static/assets/{client-B9p_nFNA.js → client-DarGQzyw.js} +1 -1
  148. solace_agent_mesh/client/webui/frontend/static/assets/main-2nd1gbaH.js +339 -0
  149. solace_agent_mesh/client/webui/frontend/static/assets/main-DoKXctCM.css +1 -0
  150. solace_agent_mesh/client/webui/frontend/static/assets/{vendor-CS5YMf8a.js → vendor-BKIeiHj_.js} +80 -70
  151. solace_agent_mesh/client/webui/frontend/static/auth-callback.html +3 -3
  152. solace_agent_mesh/client/webui/frontend/static/index.html +4 -4
  153. solace_agent_mesh/common/a2a/a2a_llm.txt +1 -1
  154. solace_agent_mesh/common/a2a/a2a_llm_detail.txt +193 -0
  155. solace_agent_mesh/common/a2a/artifact.py +2 -1
  156. solace_agent_mesh/common/a2a/protocol.py +3 -2
  157. solace_agent_mesh/common/a2a/translation.py +3 -1
  158. solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +1 -1
  159. solace_agent_mesh/common/a2a_spec/a2a_spec_llm_detail.txt +736 -0
  160. solace_agent_mesh/common/a2a_spec/schemas/llm_invocation.json +23 -0
  161. solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +93 -15
  162. solace_agent_mesh/common/a2a_spec/schemas/tool_result.json +23 -0
  163. solace_agent_mesh/common/common_llm.txt +24 -39
  164. solace_agent_mesh/common/common_llm_detail.txt +2562 -0
  165. solace_agent_mesh/common/data_parts.py +9 -1
  166. solace_agent_mesh/common/middleware/config_resolver.py +3 -1
  167. solace_agent_mesh/common/middleware/middleware_llm_detail.txt +185 -0
  168. solace_agent_mesh/common/middleware/registry.py +3 -1
  169. solace_agent_mesh/common/sac/sac_llm.txt +1 -1
  170. solace_agent_mesh/common/sac/sac_llm_detail.txt +82 -0
  171. solace_agent_mesh/common/sac/sam_component_base.py +2 -1
  172. solace_agent_mesh/common/sam_events/event_service.py +3 -2
  173. solace_agent_mesh/common/sam_events/sam_events_llm.txt +104 -0
  174. solace_agent_mesh/common/sam_events/sam_events_llm_detail.txt +115 -0
  175. solace_agent_mesh/common/services/employee_service.py +3 -1
  176. solace_agent_mesh/common/services/identity_service.py +2 -1
  177. solace_agent_mesh/common/services/providers/local_file_identity_service.py +2 -1
  178. solace_agent_mesh/common/services/services_llm.txt +57 -6
  179. solace_agent_mesh/common/services/services_llm_detail.txt +459 -0
  180. solace_agent_mesh/common/utils/artifact_utils.py +3 -1
  181. solace_agent_mesh/common/utils/asyncio_macos_fix.py +3 -1
  182. solace_agent_mesh/common/utils/embeds/converter.py +3 -1
  183. solace_agent_mesh/common/utils/embeds/embeds_llm.txt +1 -1
  184. solace_agent_mesh/common/utils/embeds/evaluators.py +2 -1
  185. solace_agent_mesh/common/utils/embeds/modifiers.py +3 -2
  186. solace_agent_mesh/common/utils/embeds/resolver.py +2 -1
  187. solace_agent_mesh/common/utils/initializer.py +3 -1
  188. solace_agent_mesh/common/utils/message_utils.py +2 -1
  189. solace_agent_mesh/common/utils/push_notification_auth.py +3 -2
  190. solace_agent_mesh/common/utils/utils_llm.txt +75 -87
  191. solace_agent_mesh/common/utils/utils_llm_detail.txt +572 -0
  192. solace_agent_mesh/core_a2a/core_a2a_llm_detail.txt +101 -0
  193. solace_agent_mesh/core_a2a/service.py +2 -2
  194. solace_agent_mesh/gateway/base/app.py +3 -2
  195. solace_agent_mesh/gateway/base/base_llm.txt +1 -1
  196. solace_agent_mesh/gateway/base/base_llm_detail.txt +235 -0
  197. solace_agent_mesh/gateway/base/component.py +3 -1
  198. solace_agent_mesh/gateway/base/task_context.py +2 -1
  199. solace_agent_mesh/gateway/gateway_llm.txt +242 -235
  200. solace_agent_mesh/gateway/gateway_llm_detail.txt +3885 -0
  201. solace_agent_mesh/gateway/http_sse/alembic/alembic_llm.txt +295 -0
  202. solace_agent_mesh/gateway/http_sse/alembic/env.py +10 -1
  203. solace_agent_mesh/gateway/http_sse/alembic/versions/20251006_98882922fa59_add_tasks_events_feedback_chat_tasks.py +190 -0
  204. solace_agent_mesh/gateway/http_sse/alembic/versions/versions_llm.txt +155 -0
  205. solace_agent_mesh/gateway/http_sse/alembic.ini +1 -1
  206. solace_agent_mesh/gateway/http_sse/app.py +150 -3
  207. solace_agent_mesh/gateway/http_sse/component.py +372 -61
  208. solace_agent_mesh/gateway/http_sse/components/components_llm.txt +46 -6
  209. solace_agent_mesh/gateway/http_sse/components/task_logger_forwarder.py +109 -0
  210. solace_agent_mesh/gateway/http_sse/components/visualization_forwarder_component.py +4 -2
  211. solace_agent_mesh/gateway/http_sse/dependencies.py +119 -27
  212. solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +172 -172
  213. solace_agent_mesh/gateway/http_sse/http_sse_llm_detail.txt +3278 -0
  214. solace_agent_mesh/gateway/http_sse/main.py +149 -42
  215. solace_agent_mesh/gateway/http_sse/repository/__init__.py +3 -12
  216. solace_agent_mesh/gateway/http_sse/repository/chat_task_repository.py +103 -0
  217. solace_agent_mesh/gateway/http_sse/repository/entities/__init__.py +5 -3
  218. solace_agent_mesh/gateway/http_sse/repository/entities/chat_task.py +75 -0
  219. solace_agent_mesh/gateway/http_sse/repository/entities/entities_llm.txt +263 -0
  220. solace_agent_mesh/gateway/http_sse/repository/entities/feedback.py +20 -0
  221. solace_agent_mesh/gateway/http_sse/repository/entities/session_history.py +0 -16
  222. solace_agent_mesh/gateway/http_sse/repository/entities/task.py +25 -0
  223. solace_agent_mesh/gateway/http_sse/repository/entities/task_event.py +21 -0
  224. solace_agent_mesh/gateway/http_sse/repository/feedback_repository.py +81 -0
  225. solace_agent_mesh/gateway/http_sse/repository/interfaces.py +73 -18
  226. solace_agent_mesh/gateway/http_sse/repository/models/__init__.py +9 -5
  227. solace_agent_mesh/gateway/http_sse/repository/models/chat_task_model.py +31 -0
  228. solace_agent_mesh/gateway/http_sse/repository/models/feedback_model.py +21 -0
  229. solace_agent_mesh/gateway/http_sse/repository/models/models_llm.txt +266 -0
  230. solace_agent_mesh/gateway/http_sse/repository/models/session_model.py +3 -3
  231. solace_agent_mesh/gateway/http_sse/repository/models/task_event_model.py +25 -0
  232. solace_agent_mesh/gateway/http_sse/repository/models/task_model.py +32 -0
  233. solace_agent_mesh/gateway/http_sse/repository/repository_llm.txt +340 -0
  234. solace_agent_mesh/gateway/http_sse/repository/session_repository.py +4 -53
  235. solace_agent_mesh/gateway/http_sse/repository/task_repository.py +173 -0
  236. solace_agent_mesh/gateway/http_sse/routers/agent_cards.py +3 -2
  237. solace_agent_mesh/gateway/http_sse/routers/artifacts.py +3 -3
  238. solace_agent_mesh/gateway/http_sse/routers/auth.py +3 -1
  239. solace_agent_mesh/gateway/http_sse/routers/config.py +29 -6
  240. solace_agent_mesh/gateway/http_sse/routers/dto/dto_llm.txt +346 -0
  241. solace_agent_mesh/gateway/http_sse/routers/dto/requests/__init__.py +3 -3
  242. solace_agent_mesh/gateway/http_sse/routers/dto/requests/requests_llm.txt +83 -0
  243. solace_agent_mesh/gateway/http_sse/routers/dto/requests/session_requests.py +2 -10
  244. solace_agent_mesh/gateway/http_sse/routers/dto/requests/task_requests.py +58 -0
  245. solace_agent_mesh/gateway/http_sse/routers/dto/responses/__init__.py +5 -3
  246. solace_agent_mesh/gateway/http_sse/routers/dto/responses/responses_llm.txt +107 -0
  247. solace_agent_mesh/gateway/http_sse/routers/dto/responses/session_responses.py +1 -15
  248. solace_agent_mesh/gateway/http_sse/routers/dto/responses/task_responses.py +30 -0
  249. solace_agent_mesh/gateway/http_sse/routers/feedback.py +37 -0
  250. solace_agent_mesh/gateway/http_sse/routers/people.py +3 -1
  251. solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +255 -204
  252. solace_agent_mesh/gateway/http_sse/routers/sessions.py +223 -41
  253. solace_agent_mesh/gateway/http_sse/routers/sse.py +3 -2
  254. solace_agent_mesh/gateway/http_sse/routers/tasks.py +170 -43
  255. solace_agent_mesh/gateway/http_sse/routers/users.py +3 -1
  256. solace_agent_mesh/gateway/http_sse/routers/visualization.py +2 -1
  257. solace_agent_mesh/gateway/http_sse/services/agent_card_service.py +3 -1
  258. solace_agent_mesh/gateway/http_sse/services/data_retention_service.py +273 -0
  259. solace_agent_mesh/gateway/http_sse/services/feedback_service.py +242 -0
  260. solace_agent_mesh/gateway/http_sse/services/people_service.py +2 -82
  261. solace_agent_mesh/gateway/http_sse/services/services_llm.txt +177 -13
  262. solace_agent_mesh/gateway/http_sse/services/session_service.py +154 -85
  263. solace_agent_mesh/gateway/http_sse/services/task_logger_service.py +318 -0
  264. solace_agent_mesh/gateway/http_sse/services/task_service.py +3 -2
  265. solace_agent_mesh/gateway/http_sse/session_manager.py +2 -1
  266. solace_agent_mesh/gateway/http_sse/shared/exception_handlers.py +25 -14
  267. solace_agent_mesh/gateway/http_sse/shared/shared_llm.txt +285 -0
  268. solace_agent_mesh/gateway/http_sse/shared/types.py +7 -0
  269. solace_agent_mesh/gateway/http_sse/sse_event_buffer.py +2 -1
  270. solace_agent_mesh/gateway/http_sse/sse_manager.py +2 -2
  271. solace_agent_mesh/gateway/http_sse/utils/__init__.py +1 -0
  272. solace_agent_mesh/gateway/http_sse/utils/stim_utils.py +32 -0
  273. solace_agent_mesh/gateway/http_sse/utils/utils_llm.txt +47 -0
  274. solace_agent_mesh/solace_agent_mesh_llm.txt +1 -1
  275. solace_agent_mesh/solace_agent_mesh_llm_detail.txt +8599 -0
  276. solace_agent_mesh/templates/gateway_app_template.py +4 -2
  277. solace_agent_mesh/templates/gateway_component_template.py +3 -1
  278. solace_agent_mesh/templates/logging_config_template.ini +22 -45
  279. solace_agent_mesh/templates/plugin_tools_template.py +2 -2
  280. {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/METADATA +2 -2
  281. solace_agent_mesh-1.5.1.dist-info/RECORD +504 -0
  282. solace_agent_mesh/agent/adk/invocation_monitor.py +0 -295
  283. solace_agent_mesh/assets/docs/assets/images/sac-flows-80d5b603c6aafd33e87945680ce0abf3.png +0 -0
  284. solace_agent_mesh/assets/docs/assets/images/sac_parts_of_a_component-cb3d0424b1d0c17734c5435cca6b4082.png +0 -0
  285. solace_agent_mesh/assets/docs/assets/js/04989206.a248f00c.js +0 -1
  286. solace_agent_mesh/assets/docs/assets/js/0e682baa.d54b8668.js +0 -1
  287. solace_agent_mesh/assets/docs/assets/js/1023fc19.8a8a9309.js +0 -1
  288. solace_agent_mesh/assets/docs/assets/js/1523c6b4.2645ef68.js +0 -1
  289. solace_agent_mesh/assets/docs/assets/js/166ab619.e27886d9.js +0 -1
  290. solace_agent_mesh/assets/docs/assets/js/1c6e87d2.e056b7e0.js +0 -1
  291. solace_agent_mesh/assets/docs/assets/js/21ceee5f.3bf39250.js +0 -1
  292. solace_agent_mesh/assets/docs/assets/js/2a9cab12.2afaee76.js +0 -1
  293. solace_agent_mesh/assets/docs/assets/js/332e10b5.f7629851.js +0 -1
  294. solace_agent_mesh/assets/docs/assets/js/3d406171.5560fdf9.js +0 -1
  295. solace_agent_mesh/assets/docs/assets/js/42b3f8d8.508ae8db.js +0 -1
  296. solace_agent_mesh/assets/docs/assets/js/442a8107.b5c2532a.js +0 -1
  297. solace_agent_mesh/assets/docs/assets/js/453a82a6.3c6bb61d.js +0 -1
  298. solace_agent_mesh/assets/docs/assets/js/483cef9a.4736f2d8.js +0 -1
  299. solace_agent_mesh/assets/docs/assets/js/4c2787c2.c1290a40.js +0 -1
  300. solace_agent_mesh/assets/docs/assets/js/55f47984.bcd00a86.js +0 -1
  301. solace_agent_mesh/assets/docs/assets/js/5b4258a4.fdfd2325.js +0 -1
  302. solace_agent_mesh/assets/docs/assets/js/664b740a.ba305a89.js +0 -1
  303. solace_agent_mesh/assets/docs/assets/js/75384d09.c19e8b51.js +0 -1
  304. solace_agent_mesh/assets/docs/assets/js/768e31b0.9abcdc48.js +0 -1
  305. solace_agent_mesh/assets/docs/assets/js/85387663.be2bc838.js +0 -1
  306. solace_agent_mesh/assets/docs/assets/js/945fb41e.16e00776.js +0 -1
  307. solace_agent_mesh/assets/docs/assets/js/9a09e75d.92de8cf5.js +0 -1
  308. solace_agent_mesh/assets/docs/assets/js/9eff14a2.d62aad71.js +0 -1
  309. solace_agent_mesh/assets/docs/assets/js/a12a4955.25fbed32.js +0 -1
  310. solace_agent_mesh/assets/docs/assets/js/a3a92b25.af35e313.js +0 -1
  311. solace_agent_mesh/assets/docs/assets/js/aba87c2f.4ddf32f2.js +0 -1
  312. solace_agent_mesh/assets/docs/assets/js/ae0e903d.5fe5203f.js +0 -1
  313. solace_agent_mesh/assets/docs/assets/js/ae4415af.16cc58d3.js +0 -1
  314. solace_agent_mesh/assets/docs/assets/js/bac0be12.17de4316.js +0 -1
  315. solace_agent_mesh/assets/docs/assets/js/c2c06897.87cb1f47.js +0 -1
  316. solace_agent_mesh/assets/docs/assets/js/c835a94d.ce21f0bf.js +0 -1
  317. solace_agent_mesh/assets/docs/assets/js/cc969b05.feef7dcc.js +0 -1
  318. solace_agent_mesh/assets/docs/assets/js/cd3d4052.a19e7d78.js +0 -1
  319. solace_agent_mesh/assets/docs/assets/js/ced92a13.fb92e7ca.js +0 -1
  320. solace_agent_mesh/assets/docs/assets/js/cee5d587.47904f5e.js +0 -1
  321. solace_agent_mesh/assets/docs/assets/js/d6a81ee7.829198f1.js +0 -1
  322. solace_agent_mesh/assets/docs/assets/js/f284c35a.ed8dd236.js +0 -1
  323. solace_agent_mesh/assets/docs/assets/js/f897a61a.126663fe.js +0 -1
  324. solace_agent_mesh/assets/docs/assets/js/fbfa3e75.e144b16c.js +0 -1
  325. solace_agent_mesh/assets/docs/assets/js/main.f67fc9f4.js +0 -2
  326. solace_agent_mesh/assets/docs/assets/js/runtime~main.40527046.js +0 -1
  327. solace_agent_mesh/assets/docs/docs/documentation/Enterprise/installation/index.html +0 -46
  328. solace_agent_mesh/assets/docs/docs/documentation/Enterprise/rbac-setup-guilde/index.html +0 -201
  329. solace_agent_mesh/assets/docs/docs/documentation/Enterprise/single-sign-on/index.html +0 -25
  330. solace_agent_mesh/assets/docs/docs/documentation/Migrations/A2A Upgrade To 0.3.0/a2a-gateway-upgrade-to-0.3.0/index.html +0 -105
  331. solace_agent_mesh/assets/docs/docs/documentation/concepts/agents/index.html +0 -144
  332. solace_agent_mesh/assets/docs/docs/documentation/concepts/architecture/index.html +0 -91
  333. solace_agent_mesh/assets/docs/docs/documentation/concepts/gateways/index.html +0 -91
  334. solace_agent_mesh/assets/docs/docs/documentation/concepts/orchestrator/index.html +0 -55
  335. solace_agent_mesh/assets/docs/docs/documentation/concepts/plugins/index.html +0 -111
  336. solace_agent_mesh/assets/docs/docs/documentation/deployment/debugging/index.html +0 -77
  337. solace_agent_mesh/assets/docs/docs/documentation/deployment/deploy/index.html +0 -48
  338. solace_agent_mesh/assets/docs/docs/documentation/deployment/observability/index.html +0 -54
  339. solace_agent_mesh/assets/docs/docs/documentation/getting-started/component-overview/index.html +0 -45
  340. solace_agent_mesh/assets/docs/docs/documentation/getting-started/configurations/litellm_models/index.html +0 -49
  341. solace_agent_mesh/assets/docs/docs/documentation/getting-started/installation/index.html +0 -76
  342. solace_agent_mesh/assets/docs/docs/documentation/getting-started/quick-start/index.html +0 -73
  343. solace_agent_mesh/assets/docs/docs/documentation/tutorials/slack-integration/index.html +0 -72
  344. solace_agent_mesh/assets/docs/docs/documentation/user-guide/creating-service-providers/index.html +0 -54
  345. solace_agent_mesh/assets/docs/docs/documentation/user-guide/solace-ai-connector/index.html +0 -69
  346. solace_agent_mesh/assets/docs/docs/documentation/user-guide/structure/index.html +0 -59
  347. solace_agent_mesh/assets/docs/lunr-index-1759936913198.json +0 -1
  348. solace_agent_mesh/assets/docs/search-doc-1759936913198.json +0 -1
  349. solace_agent_mesh/client/webui/frontend/static/assets/main-ChRwcV89.css +0 -1
  350. solace_agent_mesh/client/webui/frontend/static/assets/main-DnnE01OM.js +0 -339
  351. solace_agent_mesh/gateway/http_sse/repository/entities/message.py +0 -41
  352. solace_agent_mesh/gateway/http_sse/repository/message_repository.py +0 -84
  353. solace_agent_mesh/gateway/http_sse/repository/models/message_model.py +0 -45
  354. solace_agent_mesh-1.4.12.dist-info/RECORD +0 -448
  355. /solace_agent_mesh/assets/docs/assets/js/{8591.d7c16be6.js.LICENSE.txt → 8591.5d015485.js.LICENSE.txt} +0 -0
  356. /solace_agent_mesh/assets/docs/assets/js/{main.f67fc9f4.js.LICENSE.txt → main.bd3c34f3.js.LICENSE.txt} +0 -0
  357. {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/WHEEL +0 -0
  358. {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/entry_points.txt +0 -0
  359. {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/licenses/LICENSE +0 -0
@@ -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:()=>l,default:()=>h,frontMatter:()=>a,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":"Create 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 a={title:"Creating Python Tools",sidebar_position:440},l="Creating Python Tools",r={},c=[{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}];function d(e){const n={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.jsxs)(n.p,{children:["This guide covers the different patterns for creating custom tools, all of which are configured using the versatile ",(0,i.jsx)(n.code,{children:"tool_type: python"}),"."]}),"\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'})})]})}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:()=>a,x:()=>l});var t=o(6540);const i={},s=t.createContext(i);function a(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(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:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>r,contentTitle:()=>a,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>d});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),l=i(8453);const s={title:"Configuring Built-in Tools",sidebar_position:60},a="Configuring Built-in Tools",r={},d=[{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}];function c(n){const e={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.R)(),...n.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e.header,{children:(0,t.jsx)(e.h1,{id:"configuring-built-in-tools",children:"Configuring Built-in Tools"})}),"\n",(0,t.jsx)(e.p,{children:"This guide provides instructions for enabling and configuring the built-in tools provided by Agent Mesh framework."}),"\n",(0,t.jsx)(e.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(e.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)(e.p,{children:["The Agent Mesh framework manages these tools through a central ",(0,t.jsx)(e.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)(e.h2,{id:"configuration-methods",children:"Configuration Methods"}),"\n",(0,t.jsxs)(e.p,{children:["Tool configuration is managed within the ",(0,t.jsx)(e.code,{children:"tools"})," list in an agent's ",(0,t.jsx)(e.code,{children:"app_config"})," block in the corresponding YAML configuration file."]}),"\n",(0,t.jsx)(e.h3,{id:"method-1-enabling-tool-groups-recommended",children:"Method 1: Enabling Tool Groups (Recommended)"}),"\n",(0,t.jsx)(e.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.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:(0,t.jsx)(e.code,{children:"tool_type"})}),": ",(0,t.jsx)(e.code,{children:"builtin-group"})]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:(0,t.jsx)(e.code,{children:"group_name"})}),": The unique identifier for the tool category."]}),"\n"]}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.strong,{children:"Example:"})}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.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)(e.h3,{id:"method-2-enabling-individual-tools",children:"Method 2: Enabling Individual Tools"}),"\n",(0,t.jsx)(e.p,{children:"For more granular control over an agent's capabilities, specific tools can be enabled individually."}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:(0,t.jsx)(e.code,{children:"tool_type"})}),": ",(0,t.jsx)(e.code,{children:"builtin"})]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:(0,t.jsx)(e.code,{children:"tool_name"})}),": The unique, registered name of the tool."]}),"\n"]}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.strong,{children:"Example:"})}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.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)(e.admonition,{title:"Note",type:"info",children:(0,t.jsx)(e.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)(e.h2,{id:"available-tool-groups-and-tools",children:"Available Tool Groups and Tools"}),"\n",(0,t.jsx)(e.p,{children:"The following sections detail the available tool groups and the individual tools they contain."}),"\n",(0,t.jsx)(e.h3,{id:"artifact-management",children:"Artifact Management"}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Group Name"}),": ",(0,t.jsx)(e.code,{children:"artifact_management"})]}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Description"}),": Tools for creating, loading, and managing file artifacts."]}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Individual Tools"}),":"]}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"create_artifact"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"append_to_artifact"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"list_artifacts"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"load_artifact"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"signal_artifact_for_return"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"apply_embed_and_create_artifact"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"extract_content_from_artifact"})}),"\n"]}),"\n",(0,t.jsx)(e.admonition,{type:"info",children:(0,t.jsxs)(e.p,{children:["For a more in-depth guide on using artifact management tools, refer to the ",(0,t.jsx)(e.a,{href:"/solace-agent-mesh/docs/documentation/components/builtin-tools/artifact-management",children:"Artifact Management"})," documentation."]})}),"\n",(0,t.jsx)(e.h3,{id:"data-analysis",children:"Data Analysis"}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Group Name"}),": ",(0,t.jsx)(e.code,{children:"data_analysis"})]}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Description"}),": Tools for querying, transforming, and visualizing data."]}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Individual Tools"}),":"]}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"query_data_with_sql"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"create_sqlite_db"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"transform_data_with_jq"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"create_chart_from_plotly_config"})}),"\n"]}),"\n",(0,t.jsx)(e.admonition,{type:"info",children:(0,t.jsxs)(e.p,{children:["For a more in-depth guide on using Data Analysis tools, refer to the ",(0,t.jsx)(e.a,{href:"/solace-agent-mesh/docs/documentation/components/builtin-tools/data-analysis-tools",children:"Data Analysis Tools"})," documentation."]})}),"\n",(0,t.jsx)(e.h3,{id:"web",children:"Web"}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Group Name"}),": ",(0,t.jsx)(e.code,{children:"web"})]}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Description"}),": Tools for interacting with web resources."]}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Individual Tools"}),":"]}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"web_request"})}),"\n"]}),"\n",(0,t.jsx)(e.h3,{id:"audio",children:"Audio"}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Group Name"}),": ",(0,t.jsx)(e.code,{children:"audio"})]}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Description"}),": Tools for generating and transcribing audio content."]}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Individual Tools"}),":"]}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"text_to_speech"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"multi_speaker_text_to_speech"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"transcribe_audio"})}),"\n"]}),"\n",(0,t.jsx)(e.h3,{id:"image",children:"Image"}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Group Name"}),": ",(0,t.jsx)(e.code,{children:"image"})]}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Description"}),": Tools for generating and analyzing images."]}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Individual Tools"}),":"]}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"create_image_from_description"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"describe_image"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"edit_image_with_gemini"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"describe_audio"})}),"\n"]}),"\n",(0,t.jsx)(e.h3,{id:"general",children:"General"}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Group Name"}),": ",(0,t.jsx)(e.code,{children:"general"})]}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Description"}),": General-purpose utility tools."]}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Individual Tools"}),":"]}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"convert_file_to_markdown"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"mermaid_diagram_generator"})}),"\n"]}),"\n",(0,t.jsx)(e.h2,{id:"complete-configuration-example",children:"Complete Configuration Example"}),"\n",(0,t.jsxs)(e.p,{children:["Below is a comprehensive example of a well-formed ",(0,t.jsx)(e.code,{children:"app_config"})," that uses the unified method to enable a mix of tool groups and individual tools."]}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.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 # Enable a custom Python tool\n - tool_type: python\n component_module: "my_company.tools.custom_calculators"\n function_name: "calculate_roi"\n\n # ... other service configurations (session_service, artifact_service, etc.)\n'})})]})}function h(n={}){const{wrapper:e}={...(0,l.R)(),...n.components};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(c,{...n})}):c(n)}},8453:(n,e,i)=>{i.d(e,{R:()=>s,x:()=>a});var o=i(6540);const t={},l=o.createContext(t);function s(n){const e=o.useContext(l);return o.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function a(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(t):n.components||t:s(n.components),o.createElement(l.Provider,{value:e},n.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[3257],{8556:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>a,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"documentation/deploying/deploying","title":"Deploying Agent Mesh","description":"Moving your Agent Mesh from development to production requires careful consideration of deployment strategies, monitoring capabilities, and troubleshooting approaches. Understanding your options and having robust observability tools ensures your agent mesh operates reliably at scale.","source":"@site/docs/documentation/deploying/deploying.md","sourceDirName":"documentation/deploying","slug":"/documentation/deploying/","permalink":"/solace-agent-mesh/docs/documentation/deploying/","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/deploying/deploying.md","tags":[],"version":"current","sidebarPosition":500,"frontMatter":{"title":"Deploying Agent Mesh","sidebar_position":500},"sidebar":"docSidebar","previous":{"title":"RAG Integration","permalink":"/solace-agent-mesh/docs/documentation/developing/tutorials/rag-integration"},"next":{"title":"Choosing Deployment Options","permalink":"/solace-agent-mesh/docs/documentation/deploying/deployment-options"}}');var i=o(4848),s=o(8453);const a={title:"Deploying Agent Mesh",sidebar_position:500},r="Deploying Agent Mesh",l={},d=[{value:"Selecting Your Deployment Strategy",id:"selecting-your-deployment-strategy",level:2},{value:"Observing Your Agent Mesh",id:"observing-your-agent-mesh",level:2},{value:"Troubleshooting and Debugging Issues",id:"troubleshooting-and-debugging-issues",level:2},{value:"Production Readiness Considerations",id:"production-readiness-considerations",level:2}];function c(e){const n={a:"a",h1:"h1",h2:"h2",header:"header",p:"p",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"deploying-agent-mesh",children:"Deploying Agent Mesh"})}),"\n",(0,i.jsx)(n.p,{children:"Moving your Agent Mesh from development to production requires careful consideration of deployment strategies, monitoring capabilities, and troubleshooting approaches. Understanding your options and having robust observability tools ensures your agent mesh operates reliably at scale."}),"\n",(0,i.jsx)(n.h2,{id:"selecting-your-deployment-strategy",children:"Selecting Your Deployment Strategy"}),"\n",(0,i.jsxs)(n.p,{children:["Production deployments require different considerations than development environments, particularly around scalability, reliability, and security. You can choose containerized deployments using Docker for single-node setups, Kubernetes orchestration for scalable architectures, or hybrid approaches that separate components for independent scaling. Each strategy offers distinct advantages depending on your operational requirements. For comprehensive guidance on evaluating and implementing these approaches, see ",(0,i.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/deploying/deployment-options",children:"Choosing Deployment Options"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"observing-your-agent-mesh",children:"Observing Your Agent Mesh"}),"\n",(0,i.jsxs)(n.p,{children:["Effective monitoring provides the visibility you need to understand system behavior and maintain optimal operation. The platform offers multiple observability layers that create a complete picture of your system's health. You can visualize request workflows through interactive diagrams, monitor real-time agent status, track message flows at the event broker level, and analyze detailed stimulus logs for forensic analysis. For detailed information on implementing these monitoring tools, see ",(0,i.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/deploying/observability",children:"Monitoring Your Agent Mesh"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"troubleshooting-and-debugging-issues",children:"Troubleshooting and Debugging Issues"}),"\n",(0,i.jsxs)(n.p,{children:["When issues arise in distributed systems, systematic debugging approaches help you quickly identify root causes. The debugging process leverages observability tools in focused ways to isolate problems and understand their causes. You can isolate specific components to reduce complexity, examine stimulus traces for detailed analysis, monitor real-time event broker activity, use interactive debugging tools for code investigation, and invoke agents directly for controlled testing. For step-by-step guidance on applying these strategies, see ",(0,i.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/deploying/debugging",children:"Diagnosing and Resolving Problems"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"production-readiness-considerations",children:"Production Readiness Considerations"}),"\n",(0,i.jsx)(n.p,{children:"Successful production deployments require attention to security, performance, and operational practices beyond basic functionality. Consider implementing robust secret management, establishing TLS encryption for all communication channels, configuring appropriate resource limits and scaling policies, setting up automated backup procedures, and creating runbooks for common scenarios. These practices ensure your agent mesh operates reliably and securely while providing the foundation for ongoing maintenance and optimization."})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>a,x:()=>r});var t=o(6540);const i={},s=t.createContext(i);function a(e){const n=t.useContext(s);return t.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(i):e.components||i:a(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]);