solace-agent-mesh 1.3.1__py3-none-any.whl → 1.3.3__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 (176) hide show
  1. solace_agent_mesh/agent/adk/artifacts/filesystem_artifact_service.py +16 -8
  2. solace_agent_mesh/agent/protocol/event_handlers.py +91 -0
  3. solace_agent_mesh/agent/sac/app.py +2 -0
  4. solace_agent_mesh/assets/docs/404.html +3 -3
  5. solace_agent_mesh/assets/docs/assets/js/0e682baa.da822665.js +1 -0
  6. solace_agent_mesh/assets/docs/assets/js/1023fc19.8a8a9309.js +1 -0
  7. solace_agent_mesh/assets/docs/assets/js/1523c6b4.2645ef68.js +1 -0
  8. solace_agent_mesh/assets/docs/assets/js/1c6e87d2.43771adc.js +1 -0
  9. solace_agent_mesh/assets/docs/assets/js/2a9cab12.2afaee76.js +1 -0
  10. solace_agent_mesh/assets/docs/assets/js/332e10b5.f7629851.js +1 -0
  11. solace_agent_mesh/assets/docs/assets/js/3d406171.5560fdf9.js +1 -0
  12. solace_agent_mesh/assets/docs/assets/js/42b3f8d8.3f34bf76.js +1 -0
  13. solace_agent_mesh/assets/docs/assets/js/442a8107.b5c2532a.js +1 -0
  14. solace_agent_mesh/assets/docs/assets/js/483cef9a.8d318c2f.js +1 -0
  15. solace_agent_mesh/assets/docs/assets/js/55f47984.bcd00a86.js +1 -0
  16. solace_agent_mesh/assets/docs/assets/js/5b4258a4.dff11eca.js +1 -0
  17. solace_agent_mesh/assets/docs/assets/js/664b740a.ba305a89.js +1 -0
  18. solace_agent_mesh/assets/docs/assets/js/75384d09.abdf9cf9.js +1 -0
  19. solace_agent_mesh/assets/docs/assets/js/768e31b0.9abcdc48.js +1 -0
  20. solace_agent_mesh/assets/docs/assets/js/945fb41e.abf2be91.js +1 -0
  21. solace_agent_mesh/assets/docs/assets/js/9a09e75d.5a319fd4.js +1 -0
  22. solace_agent_mesh/assets/docs/assets/js/9eff14a2.d62aad71.js +1 -0
  23. solace_agent_mesh/assets/docs/assets/js/a3a92b25.1d029b81.js +1 -0
  24. solace_agent_mesh/assets/docs/assets/js/{aba87c2f.071e2d94.js → aba87c2f.4ddf32f2.js} +1 -1
  25. solace_agent_mesh/assets/docs/assets/js/ae0e903d.abca774a.js +1 -0
  26. solace_agent_mesh/assets/docs/assets/js/ae4415af.24cdc514.js +1 -0
  27. solace_agent_mesh/assets/docs/assets/js/bac0be12.27ee2c26.js +1 -0
  28. solace_agent_mesh/assets/docs/assets/js/c2c06897.87cb1f47.js +1 -0
  29. solace_agent_mesh/assets/docs/assets/js/c835a94d.ce21f0bf.js +1 -0
  30. solace_agent_mesh/assets/docs/assets/js/cc969b05.feef7dcc.js +1 -0
  31. solace_agent_mesh/assets/docs/assets/js/cd3d4052.a19e7d78.js +1 -0
  32. solace_agent_mesh/assets/docs/assets/js/{cee5d587.f5b73ca1.js → cee5d587.f1e1ca86.js} +1 -1
  33. solace_agent_mesh/assets/docs/assets/js/f284c35a.cad4dbf2.js +1 -0
  34. solace_agent_mesh/assets/docs/assets/js/f897a61a.bc634a3e.js +1 -0
  35. solace_agent_mesh/assets/docs/assets/js/{main.1c79039d.js → main.e82b32e6.js} +2 -2
  36. solace_agent_mesh/assets/docs/assets/js/runtime~main.aad1f874.js +1 -0
  37. solace_agent_mesh/assets/docs/docs/documentation/Enterprise/installation/index.html +4 -4
  38. solace_agent_mesh/assets/docs/docs/documentation/Enterprise/single-sign-on/index.html +7 -7
  39. solace_agent_mesh/assets/docs/docs/documentation/Migrations/A2A Upgrade To 0.3.0/a2a-gateway-upgrade-to-0.3.0/index.html +6 -6
  40. solace_agent_mesh/assets/docs/docs/documentation/Migrations/A2A Upgrade To 0.3.0/a2a-technical-migration-map/index.html +6 -6
  41. solace_agent_mesh/assets/docs/docs/documentation/concepts/agents/index.html +6 -6
  42. solace_agent_mesh/assets/docs/docs/documentation/concepts/architecture/index.html +3 -3
  43. solace_agent_mesh/assets/docs/docs/documentation/concepts/cli/index.html +18 -18
  44. solace_agent_mesh/assets/docs/docs/documentation/concepts/gateways/index.html +3 -3
  45. solace_agent_mesh/assets/docs/docs/documentation/concepts/orchestrator/index.html +3 -3
  46. solace_agent_mesh/assets/docs/docs/documentation/concepts/plugins/index.html +10 -10
  47. solace_agent_mesh/assets/docs/docs/documentation/deployment/debugging/index.html +4 -4
  48. solace_agent_mesh/assets/docs/docs/documentation/deployment/deploy/index.html +3 -3
  49. solace_agent_mesh/assets/docs/docs/documentation/deployment/observability/index.html +3 -3
  50. solace_agent_mesh/assets/docs/docs/documentation/getting-started/component-overview/index.html +7 -7
  51. solace_agent_mesh/assets/docs/docs/documentation/getting-started/configurations/index.html +3 -3
  52. solace_agent_mesh/assets/docs/docs/documentation/getting-started/installation/index.html +9 -9
  53. solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +6 -6
  54. solace_agent_mesh/assets/docs/docs/documentation/getting-started/quick-start/index.html +7 -7
  55. solace_agent_mesh/assets/docs/docs/documentation/tutorials/bedrock-agents/index.html +23 -23
  56. solace_agent_mesh/assets/docs/docs/documentation/tutorials/custom-agent/index.html +5 -5
  57. solace_agent_mesh/assets/docs/docs/documentation/tutorials/event-mesh-gateway/index.html +5 -5
  58. solace_agent_mesh/assets/docs/docs/documentation/tutorials/mcp-integration/index.html +4 -4
  59. solace_agent_mesh/assets/docs/docs/documentation/tutorials/mongodb-integration/index.html +9 -9
  60. solace_agent_mesh/assets/docs/docs/documentation/tutorials/rag-integration/index.html +10 -10
  61. solace_agent_mesh/assets/docs/docs/documentation/tutorials/rest-gateway/index.html +8 -8
  62. solace_agent_mesh/assets/docs/docs/documentation/tutorials/slack-integration/index.html +6 -6
  63. solace_agent_mesh/assets/docs/docs/documentation/tutorials/sql-database/index.html +9 -9
  64. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/artifact-management/index.html +3 -3
  65. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/audio-tools/index.html +5 -5
  66. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/data-analysis-tools/index.html +5 -5
  67. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/embeds/index.html +3 -3
  68. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/index.html +5 -5
  69. solace_agent_mesh/assets/docs/docs/documentation/user-guide/create-agents/index.html +18 -18
  70. solace_agent_mesh/assets/docs/docs/documentation/user-guide/create-gateways/index.html +7 -7
  71. solace_agent_mesh/assets/docs/docs/documentation/user-guide/creating-python-tools/index.html +8 -8
  72. solace_agent_mesh/assets/docs/docs/documentation/user-guide/creating-service-providers/index.html +10 -10
  73. solace_agent_mesh/assets/docs/docs/documentation/user-guide/solace-ai-connector/index.html +3 -3
  74. solace_agent_mesh/assets/docs/docs/documentation/user-guide/structure/index.html +4 -4
  75. solace_agent_mesh/assets/docs/lunr-index-1757873594308.json +1 -0
  76. solace_agent_mesh/assets/docs/lunr-index.json +1 -1
  77. solace_agent_mesh/assets/docs/search-doc-1757873594308.json +1 -0
  78. solace_agent_mesh/assets/docs/search-doc.json +1 -1
  79. solace_agent_mesh/cli/__init__.py +1 -1
  80. solace_agent_mesh/client/webui/frontend/static/assets/{main-C1k9E0aC.js → main-DjoMeldu.js} +8 -8
  81. solace_agent_mesh/client/webui/frontend/static/index.html +1 -1
  82. solace_agent_mesh/common/a2a/__init__.py +4 -0
  83. solace_agent_mesh/common/a2a/protocol.py +20 -0
  84. solace_agent_mesh/common/sac/sam_component_base.py +29 -9
  85. solace_agent_mesh/common/sam_events/__init__.py +9 -0
  86. solace_agent_mesh/common/sam_events/event_service.py +207 -0
  87. solace_agent_mesh/gateway/http_sse/alembic/env.py +1 -1
  88. solace_agent_mesh/gateway/http_sse/component.py +45 -35
  89. solace_agent_mesh/gateway/http_sse/dependencies.py +123 -60
  90. solace_agent_mesh/gateway/http_sse/main.py +20 -33
  91. solace_agent_mesh/gateway/http_sse/repository/__init__.py +37 -0
  92. solace_agent_mesh/gateway/http_sse/repository/entities/__init__.py +9 -0
  93. solace_agent_mesh/gateway/http_sse/repository/entities/message.py +41 -0
  94. solace_agent_mesh/gateway/http_sse/repository/entities/session.py +45 -0
  95. solace_agent_mesh/gateway/http_sse/repository/entities/session_history.py +16 -0
  96. solace_agent_mesh/gateway/http_sse/repository/interfaces.py +64 -0
  97. solace_agent_mesh/gateway/http_sse/repository/message_repository.py +78 -0
  98. solace_agent_mesh/gateway/http_sse/repository/models/__init__.py +9 -0
  99. solace_agent_mesh/gateway/http_sse/repository/models/base.py +7 -0
  100. solace_agent_mesh/gateway/http_sse/repository/models/message_model.py +27 -0
  101. solace_agent_mesh/gateway/http_sse/repository/models/session_model.py +27 -0
  102. solace_agent_mesh/gateway/http_sse/repository/session_repository.py +139 -0
  103. solace_agent_mesh/gateway/http_sse/routers/config.py +1 -0
  104. solace_agent_mesh/gateway/http_sse/routers/dto/requests/__init__.py +20 -0
  105. solace_agent_mesh/gateway/http_sse/{api → routers}/dto/requests/session_requests.py +1 -8
  106. solace_agent_mesh/gateway/http_sse/routers/dto/responses/__init__.py +16 -0
  107. solace_agent_mesh/gateway/http_sse/{api → routers}/dto/responses/session_responses.py +3 -30
  108. solace_agent_mesh/gateway/http_sse/{api/controllers/session_controller.py → routers/sessions.py} +20 -77
  109. solace_agent_mesh/gateway/http_sse/routers/tasks.py +42 -49
  110. solace_agent_mesh/gateway/http_sse/{api/controllers/user_controller.py → routers/users.py} +1 -1
  111. solace_agent_mesh/gateway/http_sse/services/session_service.py +245 -0
  112. solace_agent_mesh/gateway/http_sse/session_manager.py +0 -3
  113. solace_agent_mesh/gateway/http_sse/shared/enums.py +0 -5
  114. {solace_agent_mesh-1.3.1.dist-info → solace_agent_mesh-1.3.3.dist-info}/METADATA +1 -1
  115. {solace_agent_mesh-1.3.1.dist-info → solace_agent_mesh-1.3.3.dist-info}/RECORD +120 -128
  116. solace_agent_mesh/assets/docs/assets/js/0e682baa.b3bbde9a.js +0 -1
  117. solace_agent_mesh/assets/docs/assets/js/1023fc19.364235d5.js +0 -1
  118. solace_agent_mesh/assets/docs/assets/js/1523c6b4.1b0ec6f9.js +0 -1
  119. solace_agent_mesh/assets/docs/assets/js/1c6e87d2.a8c5ce5a.js +0 -1
  120. solace_agent_mesh/assets/docs/assets/js/2a9cab12.8909df92.js +0 -1
  121. solace_agent_mesh/assets/docs/assets/js/332e10b5.7a103f42.js +0 -1
  122. solace_agent_mesh/assets/docs/assets/js/3d406171.0b9eeed1.js +0 -1
  123. solace_agent_mesh/assets/docs/assets/js/42b3f8d8.d97b8e94.js +0 -1
  124. solace_agent_mesh/assets/docs/assets/js/442a8107.b3159bb2.js +0 -1
  125. solace_agent_mesh/assets/docs/assets/js/483cef9a.4e972867.js +0 -1
  126. solace_agent_mesh/assets/docs/assets/js/55f47984.cf3781c4.js +0 -1
  127. solace_agent_mesh/assets/docs/assets/js/5b4258a4.0d080cd9.js +0 -1
  128. solace_agent_mesh/assets/docs/assets/js/664b740a.1b744a32.js +0 -1
  129. solace_agent_mesh/assets/docs/assets/js/75384d09.c193a8f0.js +0 -1
  130. solace_agent_mesh/assets/docs/assets/js/768e31b0.8b51cd70.js +0 -1
  131. solace_agent_mesh/assets/docs/assets/js/945fb41e.c63791d1.js +0 -1
  132. solace_agent_mesh/assets/docs/assets/js/9a09e75d.d6607c56.js +0 -1
  133. solace_agent_mesh/assets/docs/assets/js/9eff14a2.472b0310.js +0 -1
  134. solace_agent_mesh/assets/docs/assets/js/a3a92b25.4b7fa6a2.js +0 -1
  135. solace_agent_mesh/assets/docs/assets/js/ae0e903d.4d8dda10.js +0 -1
  136. solace_agent_mesh/assets/docs/assets/js/ae4415af.7a2f0bbf.js +0 -1
  137. solace_agent_mesh/assets/docs/assets/js/bac0be12.f50d9bac.js +0 -1
  138. solace_agent_mesh/assets/docs/assets/js/c2c06897.587b4af5.js +0 -1
  139. solace_agent_mesh/assets/docs/assets/js/c835a94d.146e3186.js +0 -1
  140. solace_agent_mesh/assets/docs/assets/js/cc969b05.bd3e0d6c.js +0 -1
  141. solace_agent_mesh/assets/docs/assets/js/cd3d4052.b6535013.js +0 -1
  142. solace_agent_mesh/assets/docs/assets/js/f284c35a.7334119c.js +0 -1
  143. solace_agent_mesh/assets/docs/assets/js/f897a61a.0aa29dbb.js +0 -1
  144. solace_agent_mesh/assets/docs/assets/js/runtime~main.858117b7.js +0 -1
  145. solace_agent_mesh/assets/docs/lunr-index-1757531604543.json +0 -1
  146. solace_agent_mesh/assets/docs/search-doc-1757531604543.json +0 -1
  147. solace_agent_mesh/gateway/http_sse/ARCHITECTURE_GUIDE.md +0 -676
  148. solace_agent_mesh/gateway/http_sse/api/__init__.py +0 -11
  149. solace_agent_mesh/gateway/http_sse/api/controllers/__init__.py +0 -9
  150. solace_agent_mesh/gateway/http_sse/api/controllers/task_controller.py +0 -279
  151. solace_agent_mesh/gateway/http_sse/api/dto/requests/__init__.py +0 -37
  152. solace_agent_mesh/gateway/http_sse/api/dto/requests/task_requests.py +0 -66
  153. solace_agent_mesh/gateway/http_sse/api/dto/responses/__init__.py +0 -43
  154. solace_agent_mesh/gateway/http_sse/api/dto/responses/task_responses.py +0 -74
  155. solace_agent_mesh/gateway/http_sse/application/__init__.py +0 -3
  156. solace_agent_mesh/gateway/http_sse/application/services/__init__.py +0 -3
  157. solace_agent_mesh/gateway/http_sse/application/services/session_service.py +0 -135
  158. solace_agent_mesh/gateway/http_sse/domain/entities/__init__.py +0 -3
  159. solace_agent_mesh/gateway/http_sse/domain/entities/session.py +0 -90
  160. solace_agent_mesh/gateway/http_sse/domain/repositories/__init__.py +0 -3
  161. solace_agent_mesh/gateway/http_sse/domain/repositories/session_repository.py +0 -54
  162. solace_agent_mesh/gateway/http_sse/infrastructure/__init__.py +0 -4
  163. solace_agent_mesh/gateway/http_sse/infrastructure/dependency_injection/__init__.py +0 -3
  164. solace_agent_mesh/gateway/http_sse/infrastructure/dependency_injection/container.py +0 -123
  165. solace_agent_mesh/gateway/http_sse/infrastructure/persistence/__init__.py +0 -4
  166. solace_agent_mesh/gateway/http_sse/infrastructure/persistence/database_persistence_service.py +0 -16
  167. solace_agent_mesh/gateway/http_sse/infrastructure/persistence/database_service.py +0 -119
  168. solace_agent_mesh/gateway/http_sse/infrastructure/persistence/models.py +0 -31
  169. solace_agent_mesh/gateway/http_sse/infrastructure/persistence_service.py +0 -12
  170. solace_agent_mesh/gateway/http_sse/infrastructure/repositories/__init__.py +0 -3
  171. solace_agent_mesh/gateway/http_sse/infrastructure/repositories/session_repository.py +0 -174
  172. /solace_agent_mesh/assets/docs/assets/js/{main.1c79039d.js.LICENSE.txt → main.e82b32e6.js.LICENSE.txt} +0 -0
  173. /solace_agent_mesh/gateway/http_sse/{api → routers}/dto/__init__.py +0 -0
  174. {solace_agent_mesh-1.3.1.dist-info → solace_agent_mesh-1.3.3.dist-info}/WHEEL +0 -0
  175. {solace_agent_mesh-1.3.1.dist-info → solace_agent_mesh-1.3.3.dist-info}/entry_points.txt +0 -0
  176. {solace_agent_mesh-1.3.1.dist-info → solace_agent_mesh-1.3.3.dist-info}/licenses/LICENSE +0 -0
@@ -140,21 +140,29 @@ class FilesystemArtifactService(BaseArtifactService):
140
140
  if not artifact.inline_data or artifact.inline_data.data is None:
141
141
  raise ValueError("Artifact Part has no inline_data to save.")
142
142
 
143
+ metadata = {"mime_type": artifact.inline_data.mime_type}
144
+
143
145
  def _write_data_file():
146
+ """Write artifact data and fsync to disk."""
144
147
  with open(version_path, "wb") as f:
145
148
  f.write(artifact.inline_data.data)
146
-
147
- await asyncio.to_thread(_write_data_file)
148
- logger.debug("%sWrote data to %s", log_prefix, version_path)
149
-
150
- metadata = {"mime_type": artifact.inline_data.mime_type}
149
+ f.flush()
150
+ os.fsync(f.fileno())
151
+ logger.debug("%sWrote data to %s", log_prefix, version_path)
151
152
 
152
153
  def _write_metadata_file():
154
+ """Write artifact metadata and fsync to disk."""
153
155
  with open(metadata_path, "w", encoding="utf-8") as f:
154
156
  json.dump(metadata, f)
155
-
156
- await asyncio.to_thread(_write_metadata_file)
157
- logger.debug("%sWrote metadata to %s", log_prefix, metadata_path)
157
+ f.flush()
158
+ os.fsync(f.fileno())
159
+ logger.debug("%sWrote metadata to %s", log_prefix, metadata_path)
160
+
161
+ # Run file writes concurrently and wait for both to complete
162
+ await asyncio.gather(
163
+ asyncio.to_thread(_write_data_file),
164
+ asyncio.to_thread(_write_metadata_file),
165
+ )
158
166
 
159
167
  logger.info(
160
168
  "%sSaved artifact '%s' version %d successfully.",
@@ -32,7 +32,9 @@ from ...common.a2a import (
32
32
  get_client_response_topic,
33
33
  get_agent_response_subscription_topic,
34
34
  get_agent_status_subscription_topic,
35
+ get_sam_events_subscription_topic,
35
36
  get_text_from_message,
37
+ topic_matches_subscription,
36
38
  )
37
39
  from ...agent.utils.artifact_helpers import (
38
40
  generate_artifact_metadata_summary,
@@ -118,6 +120,7 @@ async def process_event(component, event: Event):
118
120
  agent_status_sub_prefix = (
119
121
  get_agent_status_subscription_topic(namespace, agent_name)[:-2] + "/"
120
122
  )
123
+ sam_events_topic = get_sam_events_subscription_topic(namespace, "session")
121
124
  if topic == agent_request_topic:
122
125
  await handle_a2a_request(component, message)
123
126
  elif topic == discovery_topic:
@@ -126,6 +129,8 @@ async def process_event(component, event: Event):
126
129
  handle_agent_card_message(component, message)
127
130
  else:
128
131
  message.call_acknowledgements()
132
+ elif topic_matches_subscription(topic, sam_events_topic):
133
+ handle_sam_event(component, message, topic)
129
134
  elif topic.startswith(agent_response_sub_prefix) or topic.startswith(
130
135
  agent_status_sub_prefix
131
136
  ):
@@ -233,6 +238,8 @@ async def handle_a2a_request(component, message: SolaceMessage):
233
238
  payload_dict = message.get_payload()
234
239
  if not isinstance(payload_dict, dict):
235
240
  raise ValueError("Payload is not a dictionary.")
241
+
242
+
236
243
  a2a_request: A2ARequest = A2ARequest.model_validate(payload_dict)
237
244
  jsonrpc_request_id = a2a.get_request_id(a2a_request)
238
245
 
@@ -1539,3 +1546,87 @@ def publish_agent_card(component):
1539
1546
  "%s Failed to publish Agent Card: %s", component.log_identifier, e
1540
1547
  )
1541
1548
  component.handle_error(e, None)
1549
+
1550
+
1551
+ def handle_sam_event(component, message, topic):
1552
+ """Handle incoming SAM system events."""
1553
+ try:
1554
+ payload = message.get_payload()
1555
+
1556
+ if not isinstance(payload, dict):
1557
+ log.warning("Invalid SAM event payload - not a dict")
1558
+ message.call_acknowledgements()
1559
+ return
1560
+
1561
+ event_type = payload.get("event_type")
1562
+ if not event_type:
1563
+ log.warning("SAM event missing event_type field")
1564
+ message.call_acknowledgements()
1565
+ return
1566
+
1567
+ log.info("%s Received SAM event: %s", component.log_identifier, event_type)
1568
+
1569
+ if event_type == "session.deleted":
1570
+ data = payload.get("data", {})
1571
+ session_id = data.get("session_id")
1572
+ user_id = data.get("user_id")
1573
+ agent_id = data.get("agent_id")
1574
+
1575
+ if not all([session_id, user_id, agent_id]):
1576
+ log.warning("Missing required fields in session.deleted event")
1577
+ message.call_acknowledgements()
1578
+ return
1579
+
1580
+ current_agent = component.get_config("agent_name")
1581
+
1582
+ if agent_id == current_agent:
1583
+ log.info("%s Processing session.deleted event for session %s",
1584
+ component.log_identifier, session_id)
1585
+ asyncio.create_task(cleanup_agent_session(component, session_id, user_id))
1586
+ else:
1587
+ log.debug("Session deletion event for different agent: %s != %s", agent_id, current_agent)
1588
+ else:
1589
+ log.debug("Unhandled SAM event type: %s", event_type)
1590
+
1591
+ message.call_acknowledgements()
1592
+
1593
+ except Exception as e:
1594
+ log.error("Error handling SAM event %s: %s", topic, e)
1595
+ message.call_acknowledgements()
1596
+
1597
+
1598
+
1599
+ async def cleanup_agent_session(component, session_id: str, user_id: str):
1600
+ """Clean up agent-side session data."""
1601
+ try:
1602
+ log.info("Starting cleanup for session %s, user %s", session_id, user_id)
1603
+
1604
+ if hasattr(component, 'session_service') and component.session_service:
1605
+ agent_name = component.get_config("agent_name")
1606
+ log.info("Deleting session %s from agent %s session service", session_id, agent_name)
1607
+ await component.session_service.delete_session(
1608
+ app_name=agent_name,
1609
+ user_id=user_id,
1610
+ session_id=session_id
1611
+ )
1612
+ log.info("Successfully deleted session %s from session service", session_id)
1613
+ else:
1614
+ log.info("No session service available for cleanup")
1615
+
1616
+ with component.active_tasks_lock:
1617
+ tasks_to_cancel = []
1618
+ for task_id, context in component.active_tasks.items():
1619
+ if (hasattr(context, 'a2a_context') and
1620
+ context.a2a_context.get('session_id') == session_id):
1621
+ tasks_to_cancel.append(task_id)
1622
+
1623
+ for task_id in tasks_to_cancel:
1624
+ context = component.active_tasks.get(task_id)
1625
+ if context:
1626
+ context.cancel()
1627
+ log.info("Cancelled task %s for deleted session %s", task_id, session_id)
1628
+
1629
+ log.info("Session cleanup completed for session %s", session_id)
1630
+
1631
+ except Exception as e:
1632
+ log.error("Error cleaning up session %s: %s", session_id, e)
@@ -20,6 +20,7 @@ from ...common.a2a import (
20
20
  get_discovery_topic,
21
21
  get_agent_response_subscription_topic,
22
22
  get_agent_status_subscription_topic,
23
+ get_sam_events_subscription_topic,
23
24
  )
24
25
  from ...common.constants import DEFAULT_COMMUNICATION_TIMEOUT
25
26
  from ...agent.sac.component import SamAgentComponent
@@ -679,6 +680,7 @@ class SamAgentApp(App):
679
680
  get_discovery_topic(namespace),
680
681
  get_agent_response_subscription_topic(namespace, agent_name),
681
682
  get_agent_status_subscription_topic(namespace, agent_name),
683
+ get_sam_events_subscription_topic(namespace, "session"),
682
684
  ]
683
685
  generated_subs = [{"topic": topic} for topic in required_topics]
684
686
  log.info(
@@ -4,13 +4,13 @@
4
4
  <meta charset="UTF-8">
5
5
  <meta name="generator" content="Docusaurus v3.8.1">
6
6
  <title data-rh="true">Page Not Found | Solace Agent Mesh</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://solacelabs.github.io/solace-agent-mesh/img/logo.png"><meta data-rh="true" name="twitter:image" content="https://solacelabs.github.io/solace-agent-mesh/img/logo.png"><meta data-rh="true" property="og:url" content="https://solacelabs.github.io/solace-agent-mesh/404.html"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="Page Not Found | Solace Agent Mesh"><link data-rh="true" rel="icon" href="/solace-agent-mesh/img/logo.png"><link data-rh="true" rel="canonical" href="https://solacelabs.github.io/solace-agent-mesh/404.html"><link data-rh="true" rel="alternate" href="https://solacelabs.github.io/solace-agent-mesh/404.html" hreflang="en"><link data-rh="true" rel="alternate" href="https://solacelabs.github.io/solace-agent-mesh/404.html" hreflang="x-default"><link rel="stylesheet" href="/solace-agent-mesh/assets/css/styles.906a1503.css">
7
- <script src="/solace-agent-mesh/assets/js/runtime~main.858117b7.js" defer="defer"></script>
8
- <script src="/solace-agent-mesh/assets/js/main.1c79039d.js" defer="defer"></script>
7
+ <script src="/solace-agent-mesh/assets/js/runtime~main.aad1f874.js" defer="defer"></script>
8
+ <script src="/solace-agent-mesh/assets/js/main.e82b32e6.js" defer="defer"></script>
9
9
  </head>
10
10
  <body class="navigation-with-keyboard">
11
11
  <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"><defs>
12
12
  <symbol id="theme-svg-external-link" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></symbol>
13
13
  </defs></svg>
14
- <script>!function(){var t=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();document.documentElement.setAttribute("data-theme",t||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")),document.documentElement.setAttribute("data-theme-choice",t||"system")}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><link rel="preload" as="image" href="/solace-agent-mesh/img/logo.png"><link rel="preload" as="image" href="/solace-agent-mesh/img/solace-logo.png"><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="theme-layout-navbar navbar navbar--fixed-top"><div class="navbar__inner"><div class="theme-layout-navbar-left navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/solace-agent-mesh/docs/documentation/getting-started/introduction"><div class="navbar__logo"><img src="/solace-agent-mesh/img/logo.png" alt="Solace Agent Mesh Logo" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/solace-agent-mesh/img/logo.png" alt="Solace Agent Mesh Logo" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div><b class="navbar__title text--truncate">Solace Agent Mesh</b></a><a class="navbar__item navbar__link" href="/solace-agent-mesh/docs/documentation/getting-started/introduction">Documentation</a></div><div class="theme-layout-navbar-right navbar__items navbar__items--right"><a href="https://github.com/SolaceLabs/solace-agent-mesh/" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="system mode" aria-label="Switch between dark and light mode (currently system mode)"><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP systemToggleIcon_QzmC"><path fill="currentColor" d="m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"></path></svg></button></div><div class="navbarSearchContainer_Bca1"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input id="search_input_react" type="search" placeholder="Loading..." aria-label="Search" class="navbar__search-input search-bar" disabled=""></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="theme-layout-main main-wrapper mainWrapper_z2l0"><main class="container margin-vert--xl"><div class="row"><div class="col col--6 col--offset-3"><h1 class="hero__title">Page Not Found</h1><p>We could not find what you were looking for.</p><p>Please contact the owner of the site that linked you to the original URL and let them know their link is broken.</p></div></div></main></div><footer class="theme-layout-footer footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="theme-layout-footer-column col footer__col"><div class="footer__title">Solace Agent Mesh</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/solace-agent-mesh/docs/documentation/getting-started/introduction">Documentation</a></li><li class="footer__item"><a href="https://github.com/SolaceLabs/solace-agent-mesh/" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://github.com/SolaceLabs/solace-agent-mesh-core-plugins/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Official Plugins<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li></ul></div><div class="theme-layout-footer-column col footer__col"><div class="footer__title">Company</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://solace.com/products/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Products<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://solace.com/contact/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Contact<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://solace.com/support/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Support<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://solace.com/legal/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Privacy and Legal<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li></ul></div><div class="theme-layout-footer-column col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://www.linkedin.com/company/solacedotcom/" target="_blank" rel="noopener noreferrer" class="footer__link-item">LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://github.com/SolaceLabs" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://www.youtube.com/SolaceSystems" target="_blank" rel="noopener noreferrer" class="footer__link-item">YouTube<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://twitter.com/solacedotcom" target="_blank" rel="noopener noreferrer" class="footer__link-item">X<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="margin-bottom--sm"><img src="/solace-agent-mesh/img/solace-logo.png" alt="Solace Logo" class="footer__logo themedComponent_mlkZ themedComponent--light_NVdE" width="10%" height="10%"><img src="/solace-agent-mesh/img/solace-logo.png" alt="Solace Logo" class="footer__logo themedComponent_mlkZ themedComponent--dark_xIcU" width="10%" height="10%"></div><div class="footer__copyright">Solace Agent Mesh. Copyright © 2025 Solace. Version: 1.3.1</div></div></div></footer></div>
14
+ <script>!function(){var t=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();document.documentElement.setAttribute("data-theme",t||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")),document.documentElement.setAttribute("data-theme-choice",t||"system")}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><link rel="preload" as="image" href="/solace-agent-mesh/img/logo.png"><link rel="preload" as="image" href="/solace-agent-mesh/img/solace-logo.png"><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="theme-layout-navbar navbar navbar--fixed-top"><div class="navbar__inner"><div class="theme-layout-navbar-left navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/solace-agent-mesh/docs/documentation/getting-started/introduction"><div class="navbar__logo"><img src="/solace-agent-mesh/img/logo.png" alt="Solace Agent Mesh Logo" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/solace-agent-mesh/img/logo.png" alt="Solace Agent Mesh Logo" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div><b class="navbar__title text--truncate">Solace Agent Mesh</b></a><a class="navbar__item navbar__link" href="/solace-agent-mesh/docs/documentation/getting-started/introduction">Documentation</a></div><div class="theme-layout-navbar-right navbar__items navbar__items--right"><a href="https://github.com/SolaceLabs/solace-agent-mesh/" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="system mode" aria-label="Switch between dark and light mode (currently system mode)"><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP systemToggleIcon_QzmC"><path fill="currentColor" d="m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"></path></svg></button></div><div class="navbarSearchContainer_Bca1"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input id="search_input_react" type="search" placeholder="Loading..." aria-label="Search" class="navbar__search-input search-bar" disabled=""></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="theme-layout-main main-wrapper mainWrapper_z2l0"><main class="container margin-vert--xl"><div class="row"><div class="col col--6 col--offset-3"><h1 class="hero__title">Page Not Found</h1><p>We could not find what you were looking for.</p><p>Please contact the owner of the site that linked you to the original URL and let them know their link is broken.</p></div></div></main></div><footer class="theme-layout-footer footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="theme-layout-footer-column col footer__col"><div class="footer__title">Solace Agent Mesh</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/solace-agent-mesh/docs/documentation/getting-started/introduction">Documentation</a></li><li class="footer__item"><a href="https://github.com/SolaceLabs/solace-agent-mesh/" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://github.com/SolaceLabs/solace-agent-mesh-core-plugins/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Official Plugins<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li></ul></div><div class="theme-layout-footer-column col footer__col"><div class="footer__title">Company</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://solace.com/products/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Products<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://solace.com/contact/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Contact<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://solace.com/support/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Support<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://solace.com/legal/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Privacy and Legal<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li></ul></div><div class="theme-layout-footer-column col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://www.linkedin.com/company/solacedotcom/" target="_blank" rel="noopener noreferrer" class="footer__link-item">LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://github.com/SolaceLabs" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://www.youtube.com/SolaceSystems" target="_blank" rel="noopener noreferrer" class="footer__link-item">YouTube<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://twitter.com/solacedotcom" target="_blank" rel="noopener noreferrer" class="footer__link-item">X<svg width="13.5" height="13.5" aria-hidden="true" class="iconExternalLink_nPIU"><use href="#theme-svg-external-link"></use></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="margin-bottom--sm"><img src="/solace-agent-mesh/img/solace-logo.png" alt="Solace Logo" class="footer__logo themedComponent_mlkZ themedComponent--light_NVdE" width="10%" height="10%"><img src="/solace-agent-mesh/img/solace-logo.png" alt="Solace Logo" class="footer__logo themedComponent_mlkZ themedComponent--dark_xIcU" width="10%" height="10%"></div><div class="footer__copyright">Solace Agent Mesh. Copyright © 2025 Solace. Version: 1.3.3</div></div></div></footer></div>
15
15
  </body>
16
16
  </html>
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[1430],{7977:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>c});const o=JSON.parse('{"id":"documentation/tutorials/mcp-integration","title":"MCP Integration","description":"This tutorial walks you through the process of integrating a Model Context Protocol (MCP) Server into Solace Agent Mesh.","source":"@site/docs/documentation/tutorials/mcp-integration.md","sourceDirName":"documentation/tutorials","slug":"/documentation/tutorials/mcp-integration","permalink":"/solace-agent-mesh/docs/documentation/tutorials/mcp-integration","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/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/tutorials/custom-agent"},"next":{"title":"REST Gateway","permalink":"/solace-agent-mesh/docs/documentation/tutorials/rest-gateway"}}');var s=t(4848),i=t(8453);const r={title:"MCP Integration",sidebar_position:10},a="MCP Integration",l={},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. Docker Connection (Containerized MCP Servers)",id:"3-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-Specific Configuration",id:"tool-specific-configuration",level:3},{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",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 Solace 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 Solace Agent Mesh. For more information, see ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/concepts/agents",children:"Agents"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["Solace 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/getting-started/installation",children:"install Solace Agent Mesh and Solace Agent Mesh CLI"}),", and then ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/getting-started/quick-start",children:"create a new Solace 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.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: "npx"\n args:\n - "-y"\n - "@modelcontextprotocol/server-filesystem"\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-docker-connection-containerized-mcp-servers",children:"3. 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.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: "npx"\n args:\n - "-y"\n - "@modelcontextprotocol/server-filesystem"\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-specific-configuration",children:"Tool-Specific Configuration"}),"\n",(0,s.jsx)(n.p,{children:"You can limit which tools from an MCP server are available by specifying a specific tool name:"}),"\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: "npx"\n args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp/samv2"]\n'})}),"\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:8080"\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 h(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:()=>r,x:()=>a});var o=t(6540);const s={},i=o.createContext(s);function r(e){const n=o.useContext(i);return o.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),o.createElement(i.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[1462],{3519:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"documentation/user-guide/builtin-tools/data-analysis-tools","title":"Data Analysis Tools","description":"Solace Agent Mesh includes a suite of optional built-in tools that enable agents to perform data analysis tasks directly on artifacts. These tools provide functionality for SQL querying, JQ transformations, and Plotly chart generation.","source":"@site/docs/documentation/user-guide/builtin-tools/data-analysis-tools.md","sourceDirName":"documentation/user-guide/builtin-tools","slug":"/documentation/user-guide/builtin-tools/data-analysis-tools","permalink":"/solace-agent-mesh/docs/documentation/user-guide/builtin-tools/data-analysis-tools","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/user-guide/builtin-tools/data-analysis-tools.md","tags":[],"version":"current","sidebarPosition":20,"frontMatter":{"title":"Data Analysis Tools","sidebar_position":20},"sidebar":"docSidebar","previous":{"title":"Artifact Management Tools","permalink":"/solace-agent-mesh/docs/documentation/user-guide/builtin-tools/artifact-management"},"next":{"title":"Audio Tools","permalink":"/solace-agent-mesh/docs/documentation/user-guide/builtin-tools/audio-tools"}}');var s=t(4848),r=t(8453);const a={title:"Data Analysis Tools",sidebar_position:20},o="Data Analysis Tools",l={},d=[{value:"Setup and Configuration",id:"setup-and-configuration",level:2},{value:"Available Tools",id:"available-tools",level:2},{value:"<code>query_data_with_sql</code>",id:"query_data_with_sql",level:3},{value:"<code>create_sqlite_db</code>",id:"create_sqlite_db",level:3},{value:"<code>transform_data_with_jq</code>",id:"transform_data_with_jq",level:3},{value:"<code>create_chart_from_plotly_config</code>",id:"create_chart_from_plotly_config",level:3},{value:"Example Workflow: Querying a Large CSV",id:"example-workflow-querying-a-large-csv",level:2},{value:"Technical Considerations",id:"technical-considerations",level:2},{value:"Result Handling",id:"result-handling",level:3},{value:"Security",id:"security",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"data-analysis-tools",children:"Data Analysis Tools"})}),"\n",(0,s.jsx)(n.p,{children:"Solace Agent Mesh includes a suite of optional built-in tools that enable agents to perform data analysis tasks directly on artifacts. These tools provide functionality for SQL querying, JQ transformations, and Plotly chart generation."}),"\n",(0,s.jsx)(n.h2,{id:"setup-and-configuration",children:"Setup and Configuration"}),"\n",(0,s.jsxs)(n.p,{children:["Enable the data analysis tool group in the agent's ",(0,s.jsx)(n.code,{children:"app_config.yml"})," file."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'# In your agent\'s app_config:\ntools:\n - tool_type: builtin-group\n group_name: "data_analysis"\n\n# Optional: Configure tool behavior\ndata_tools_config:\n sqlite_memory_threshold_mb: 100\n max_result_preview_rows: 50\n max_result_preview_bytes: 4096\n'})}),"\n",(0,s.jsx)(n.h2,{id:"available-tools",children:"Available Tools"}),"\n",(0,s.jsx)(n.h3,{id:"query_data_with_sql",children:(0,s.jsx)(n.code,{children:"query_data_with_sql"})}),"\n",(0,s.jsx)(n.admonition,{title:"Enterprise Only",type:"info",children:(0,s.jsx)(n.p,{children:"This feature is available in the Enterprise Edition only."})}),"\n",(0,s.jsx)(n.p,{children:"Executes a SQL query against data stored in a CSV or SQLite artifact."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Parameters"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"input_filename"})," (str): The filename of the input artifact (for example, ",(0,s.jsx)(n.code,{children:"'data.csv'"}),", ",(0,s.jsx)(n.code,{children:"'mydatabase.sqlite'"}),"). Supports versioning (for example, ",(0,s.jsx)(n.code,{children:"'data.csv:2'"}),")."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"sql_query"})," (str): The SQL query string to execute."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"output_format"})," (str, optional): The desired format for the output artifact (",(0,s.jsx)(n.code,{children:"'csv'"})," or ",(0,s.jsx)(n.code,{children:"'json'"}),"). Defaults to ",(0,s.jsx)(n.code,{children:"'csv'"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Behavior"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"For CSV Input"}),": The tool loads the CSV data into a temporary in-memory SQLite database table named ",(0,s.jsx)(n.code,{children:"data"})," and executes the query against it."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"For SQLite Input"}),": The tool connects directly to the specified SQLite database artifact in ",(0,s.jsx)(n.strong,{children:"read-only mode"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),": A dictionary containing the execution status, a preview of the query result, and the ",(0,s.jsx)(n.code,{children:"output_filename"})," where the full result set is stored."]}),"\n"]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h3,{id:"create_sqlite_db",children:(0,s.jsx)(n.code,{children:"create_sqlite_db"})}),"\n",(0,s.jsx)(n.admonition,{title:"Enterprise Only",type:"info",children:(0,s.jsx)(n.p,{children:"This feature is available in the Enterprise Edition only."})}),"\n",(0,s.jsx)(n.p,{children:"Converts a CSV or JSON artifact into a persistent SQLite database artifact. This is the recommended approach for executing multiple queries on the same dataset, as it avoids repeated parsing of the source file."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Parameters"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"input_filename"})," (str): The filename of the input CSV or JSON artifact."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"output_db_filename"})," (str): The desired filename for the output SQLite database artifact (for example, ",(0,s.jsx)(n.code,{children:"'queryable_dataset.sqlite'"}),")."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"table_name"})," (str, optional): The name of the table to be created within the SQLite database. Defaults to ",(0,s.jsx)(n.code,{children:"'data'"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),": A dictionary confirming the successful creation of the database artifact and providing its ",(0,s.jsx)(n.code,{children:"output_filename"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h3,{id:"transform_data_with_jq",children:(0,s.jsx)(n.code,{children:"transform_data_with_jq"})}),"\n",(0,s.jsx)(n.admonition,{title:"Enterprise Only",type:"info",children:(0,s.jsx)(n.p,{children:"This feature is available in the Enterprise Edition only."})}),"\n",(0,s.jsx)(n.p,{children:"Applies a JQ expression to transform data from a JSON, YAML, or CSV artifact."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Parameters"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"input_filename"})," (str): The filename of the input artifact."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"jq_expression"})," (str): The JQ filter or transformation expression string (for example, ",(0,s.jsx)(n.code,{children:"'.users[] | {name, id}'"}),")."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),": A dictionary containing the execution status, a preview of the transformed data, and the ",(0,s.jsx)(n.code,{children:"output_filename"})," where the full JSON result is stored."]}),"\n"]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h3,{id:"create_chart_from_plotly_config",children:(0,s.jsx)(n.code,{children:"create_chart_from_plotly_config"})}),"\n",(0,s.jsx)(n.p,{children:"Generates a static chart image (for example, PNG, JPG, SVG) from a Plotly configuration provided as a string."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Parameters"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"config_content"})," (str): A JSON or YAML formatted string representing the Plotly ",(0,s.jsx)(n.code,{children:"figure"})," dictionary."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"config_format"})," (str): Specifies whether ",(0,s.jsx)(n.code,{children:"config_content"})," is ",(0,s.jsx)(n.code,{children:"'json'"})," or ",(0,s.jsx)(n.code,{children:"'yaml'"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"output_filename"})," (str): The desired filename for the output image artifact (for example, ",(0,s.jsx)(n.code,{children:"'sales_chart.png'"}),")."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"output_format"})," (str, optional): The desired image format (",(0,s.jsx)(n.code,{children:"'png'"}),", ",(0,s.jsx)(n.code,{children:"'jpeg'"}),", ",(0,s.jsx)(n.code,{children:"'svg'"}),", etc.). Defaults to ",(0,s.jsx)(n.code,{children:"'png'"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),": A dictionary confirming the chart's creation and providing its ",(0,s.jsx)(n.code,{children:"output_filename"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"example-workflow-querying-a-large-csv",children:"Example Workflow: Querying a Large CSV"}),"\n",(0,s.jsx)(n.p,{children:"The following workflow demonstrates an efficient method for analyzing a large CSV file:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"User Request"}),': "I need to run several queries on ',(0,s.jsx)(n.code,{children:"large_data.csv"}),'."']}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Agent Strategy"}),": The agent determines that converting the CSV to a SQLite database is more performant for subsequent queries."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Agent Call 1"}),": The agent calls ",(0,s.jsx)(n.code,{children:"create_sqlite_db"})," to convert ",(0,s.jsx)(n.code,{children:"large_data.csv"})," into a new artifact, ",(0,s.jsx)(n.code,{children:"queryable_data.sqlite"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Agent Response"}),': "The data has been prepared for querying. What is your first question?"']}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"User Request"}),": \"Find all records where the category is 'Sales'.\""]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Agent Call 2"}),": The agent calls ",(0,s.jsx)(n.code,{children:"query_data_with_sql"}),", targeting the ",(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"queryable_data.sqlite"})})," artifact."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Agent Response"}),": The agent provides the results of the query."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"User Request"}),": \"Now, find the average amount for the 'Marketing' category.\""]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Agent Call 3"}),": The agent calls ",(0,s.jsx)(n.code,{children:"query_data_with_sql"})," again on the ",(0,s.jsxs)(n.strong,{children:["same ",(0,s.jsx)(n.code,{children:"queryable_data.sqlite"})," artifact"]}),", avoiding the overhead of reprocessing the original CSV file."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"technical-considerations",children:"Technical Considerations"}),"\n",(0,s.jsx)(n.h3,{id:"result-handling",children:"Result Handling"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Previews"}),": For ",(0,s.jsx)(n.code,{children:"query_data_with_sql"})," and ",(0,s.jsx)(n.code,{children:"transform_data_with_jq"}),", the tools return a truncated preview of the result directly to the LLM for immediate context."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Full Results"}),": The complete, untruncated result sets are always saved as new artifacts. The LLM is provided with the filename and version of these artifacts."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Accessing Full Results"}),": To utilize the full results, the agent can employ file management tools (",(0,s.jsx)(n.code,{children:"load_artifact"}),") or ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/user-guide/builtin-tools/embeds",children:"Dynamic Embeds"})," (",(0,s.jsx)(n.code,{children:"\xabartifact_content:...\xbb"}),")."]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"security",children:"Security"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"SQL Execution"}),": Queries against existing SQLite artifacts are performed in ",(0,s.jsx)(n.strong,{children:"read-only mode"})," to prevent data modification. Queries against temporary databases generated from CSVs are isolated."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"JQ Execution"}),": JQ expressions are executed within a sandboxed Python library, not via shell execution."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Resource Usage"}),": Complex queries or transformations can be resource-intensive. Monitor performance and resource consumption accordingly."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var i=t(6540);const s={},r=i.createContext(s);function a(e){const n=i.useContext(r);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(r.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[4777],{3112:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>l,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"documentation/user-guide/builtin-tools/audio-tools","title":"Audio Tools","description":"This guide provides technical documentation for the text-to-speech (TTS) tools available in Solace Agent Mesh.","source":"@site/docs/documentation/user-guide/builtin-tools/audio-tools.md","sourceDirName":"documentation/user-guide/builtin-tools","slug":"/documentation/user-guide/builtin-tools/audio-tools","permalink":"/solace-agent-mesh/docs/documentation/user-guide/builtin-tools/audio-tools","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/user-guide/builtin-tools/audio-tools.md","tags":[],"version":"current","sidebarPosition":30,"frontMatter":{"title":"Audio Tools","sidebar_position":30},"sidebar":"docSidebar","previous":{"title":"Data Analysis Tools","permalink":"/solace-agent-mesh/docs/documentation/user-guide/builtin-tools/data-analysis-tools"},"next":{"title":"Dynamic Embeds","permalink":"/solace-agent-mesh/docs/documentation/user-guide/builtin-tools/embeds"}}');var s=i(4848),o=i(8453);const l={title:"Audio Tools",sidebar_position:30},r="Using Text-to-Speech (TTS) Tools",c={},d=[{value:"Overview",id:"overview",level:2},{value:"Setup and Configuration",id:"setup-and-configuration",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Basic Configuration",id:"basic-configuration",level:3},{value:"Advanced Configuration",id:"advanced-configuration",level:2},{value:"<code>text_to_speech</code> Configuration",id:"text_to_speech-configuration",level:3},{value:"<code>multi_speaker_text_to_speech</code> Configuration",id:"multi_speaker_text_to_speech-configuration",level:3},{value:"Features",id:"features",level:2},{value:"Intelligent Tone Selection",id:"intelligent-tone-selection",level:3},{value:"Multi-Language Support",id:"multi-language-support",level:3},{value:"Usage Examples",id:"usage-examples",level:2},{value:"Single-Voice Text-to-Speech (<code>text_to_speech</code>)",id:"single-voice-text-to-speech-text_to_speech",level:3},{value:"Multi-Speaker Text-to-Speech (<code>multi_speaker_text_to_speech</code>)",id:"multi-speaker-text-to-speech-multi_speaker_text_to_speech",level:3},{value:"Tool Reference",id:"tool-reference",level:2},{value:"<code>text_to_speech</code>",id:"text_to_speech",level:3},{value:"<code>multi_speaker_text_to_speech</code>",id:"multi_speaker_text_to_speech",level:3},{value:"Output and Metadata",id:"output-and-metadata",level:2},{value:"Troubleshooting",id:"troubleshooting",level:2}];function a(e){const n={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,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"using-text-to-speech-tts-tools",children:"Using Text-to-Speech (TTS) Tools"})}),"\n",(0,s.jsx)(n.p,{children:"This guide provides technical documentation for the text-to-speech (TTS) tools available in Solace Agent Mesh."}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"audio"})," tool group provides two primary TTS tools for generating high-quality audio artifacts:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"text_to_speech"})}),": Converts a string of text to speech using a single voice, featuring intelligent tone selection."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"multi_speaker_text_to_speech"})}),": Converts a conversational script, delineated by speaker, into a multi-speaker audio file."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"setup-and-configuration",children:"Setup and Configuration"}),"\n",(0,s.jsx)(n.h3,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"API Key"}),": A valid Google Gemini API key with access to the TTS model is required."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Dependencies"}),": The ",(0,s.jsx)(n.code,{children:"pydub"})," library is necessary for audio processing and format conversion. It can be installed via ",(0,s.jsx)(n.code,{children:"pip install pydub"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"basic-configuration",children:"Basic Configuration"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Environment Variable"}),": The Gemini API key must be set as an environment variable.","\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'export GEMINI_API_KEY="your_gemini_api_key_here"\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Enablement"}),": The ",(0,s.jsx)(n.code,{children:"audio"})," tool group must be enabled in the agent's ",(0,s.jsx)(n.code,{children:"app_config.yml"}),".","\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'tools:\n - tool_type: builtin-group\n group_name: "audio"\n'})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"advanced-configuration",children:"Advanced Configuration"}),"\n",(0,s.jsxs)(n.p,{children:["You can exercise more granular control over the TTS tools by providing a ",(0,s.jsx)(n.code,{children:"tool_config"})," block for each tool in your ",(0,s.jsx)(n.code,{children:"app_config.yml"}),"."]}),"\n",(0,s.jsxs)(n.h3,{id:"text_to_speech-configuration",children:[(0,s.jsx)(n.code,{children:"text_to_speech"})," Configuration"]}),"\n",(0,s.jsx)(n.p,{children:"This example shows how to set a default voice and define the mapping between tones and specific voice models."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'- tool_type: builtin\n tool_name: "text_to_speech"\n tool_config:\n gemini_api_key: ${GEMINI_API_KEY}\n model: "gemini-2.5-flash-preview-tts"\n voice_name: "Kore" # Default voice if no tone is matched\n language: "en-US" # Default language\n output_format: "mp3"\n # Voice selection by tone mapping\n voice_tone_mapping:\n bright: ["Zephyr", "Autonoe"]\n upbeat: ["Puck", "Laomedeia"]\n informative: ["Charon", "Rasalgethi"]\n firm: ["Kore", "Orus", "Alnilam"]\n friendly: ["Achird"]\n casual: ["Zubenelgenubi"]\n warm: ["Sulafar"]\n'})}),"\n",(0,s.jsxs)(n.h3,{id:"multi_speaker_text_to_speech-configuration",children:[(0,s.jsx)(n.code,{children:"multi_speaker_text_to_speech"})," Configuration"]}),"\n",(0,s.jsx)(n.p,{children:"This example defines default voice configurations for up to five speakers."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'- tool_type: builtin\n tool_name: "multi_speaker_text_to_speech"\n tool_config:\n gemini_api_key: ${GEMINI_API_KEY}\n model: "gemini-2.5-flash-preview-tts"\n language: "en-US"\n output_format: "mp3"\n # Default speaker voice configurations\n default_speakers:\n - { name: "Speaker1", voice: "Kore", tone: "firm" }\n - { name: "Speaker2", voice: "Puck", tone: "upbeat" }\n - { name: "Speaker3", voice: "Charon", tone: "informative" }\n - { name: "Speaker4", voice: "Achird", tone: "friendly" }\n - { name: "Speaker5", voice: "Sulafar", tone: "warm" }\n # The voice_tone_mapping can also be included here\n'})}),"\n",(0,s.jsx)(n.h2,{id:"features",children:"Features"}),"\n",(0,s.jsx)(n.h3,{id:"intelligent-tone-selection",children:"Intelligent Tone Selection"}),"\n",(0,s.jsx)(n.p,{children:"The system supports tone-based voice selection, allowing for dynamic voice choice based on desired emotional or stylistic output, rather than explicit voice names."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Available Tones"}),":\n",(0,s.jsx)(n.code,{children:"bright"}),", ",(0,s.jsx)(n.code,{children:"upbeat"}),", ",(0,s.jsx)(n.code,{children:"informative"}),", ",(0,s.jsx)(n.code,{children:"firm"}),", ",(0,s.jsx)(n.code,{children:"excitable"}),", ",(0,s.jsx)(n.code,{children:"youthful"}),", ",(0,s.jsx)(n.code,{children:"breezy"}),", ",(0,s.jsx)(n.code,{children:"easy-going"}),", ",(0,s.jsx)(n.code,{children:"breathy"}),", ",(0,s.jsx)(n.code,{children:"clear"}),", ",(0,s.jsx)(n.code,{children:"smooth"}),", ",(0,s.jsx)(n.code,{children:"gravelly"}),", ",(0,s.jsx)(n.code,{children:"soft"}),", ",(0,s.jsx)(n.code,{children:"even"}),", ",(0,s.jsx)(n.code,{children:"mature"}),", ",(0,s.jsx)(n.code,{children:"forward"}),", ",(0,s.jsx)(n.code,{children:"friendly"}),", ",(0,s.jsx)(n.code,{children:"casual"}),", ",(0,s.jsx)(n.code,{children:"gentle"}),", ",(0,s.jsx)(n.code,{children:"lively"}),", ",(0,s.jsx)(n.code,{children:"knowledgeable"}),", ",(0,s.jsx)(n.code,{children:"warm"})]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Tone Aliases"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"professional"})," \u2192 ",(0,s.jsx)(n.code,{children:"firm"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cheerful"})," \u2192 ",(0,s.jsx)(n.code,{children:"upbeat"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"calm"})," \u2192 ",(0,s.jsx)(n.code,{children:"soft"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"conversational"})," \u2192 ",(0,s.jsx)(n.code,{children:"casual"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"multi-language-support",children:"Multi-Language Support"}),"\n",(0,s.jsxs)(n.p,{children:["The tools support over 25 languages, specified via BCP-47 language codes (for example, ",(0,s.jsx)(n.code,{children:"en-US"}),", ",(0,s.jsx)(n.code,{children:"fr-FR"}),", ",(0,s.jsx)(n.code,{children:"es-US"}),", ",(0,s.jsx)(n.code,{children:"ja-JP"}),")."]}),"\n",(0,s.jsx)(n.h2,{id:"usage-examples",children:"Usage Examples"}),"\n",(0,s.jsxs)(n.h3,{id:"single-voice-text-to-speech-text_to_speech",children:["Single-Voice Text-to-Speech (",(0,s.jsx)(n.code,{children:"text_to_speech"}),")"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Basic Usage"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:'Convert the following text to speech: "Welcome to the technical briefing on artificial intelligence."\n'})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"With Tone Selection"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:'Convert this text to speech with a professional tone: "Thank you for joining today\'s technical review."\n'})}),"\n",(0,s.jsxs)(n.h3,{id:"multi-speaker-text-to-speech-multi_speaker_text_to_speech",children:["Multi-Speaker Text-to-Speech (",(0,s.jsx)(n.code,{children:"multi_speaker_text_to_speech"}),")"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Basic Conversation"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Convert this conversation to speech:\nSpeaker1: Welcome to the podcast.\nSpeaker2: Thank you for having me.\n"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"With Custom Speaker Tones"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Convert this conversation using specific tones for each speaker:\n- Speaker1 should sound professional\n- Speaker2 should sound friendly\n\nConversation:\nSpeaker1: Good morning, this is the daily security briefing.\nSpeaker2: Hi everyone, let's review the agenda for today's session.\n"})}),"\n",(0,s.jsx)(n.h2,{id:"tool-reference",children:"Tool Reference"}),"\n",(0,s.jsx)(n.h3,{id:"text_to_speech",children:(0,s.jsx)(n.code,{children:"text_to_speech"})}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Parameter"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"text"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"The text to be synthesized."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"output_filename"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"(Optional) A custom MP3 filename."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"voice_name"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"(Optional) A specific voice name to use."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"tone"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"(Optional) The desired voice tone."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"language"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"(Optional) The BCP-47 language code."})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"multi_speaker_text_to_speech",children:(0,s.jsx)(n.code,{children:"multi_speaker_text_to_speech"})}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Parameter"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"conversation_text"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsxs)(n.td,{children:["A string of text with speaker labels (for example, ",(0,s.jsx)(n.code,{children:"S1: ..."}),")."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"output_filename"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"(Optional) A custom MP3 filename."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"speaker_configs"})}),(0,s.jsx)(n.td,{children:"array"}),(0,s.jsx)(n.td,{children:"(Optional) An array to configure tones for specific speakers."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"language"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"(Optional) The BCP-47 language code."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"output-and-metadata",children:"Output and Metadata"}),"\n",(0,s.jsx)(n.p,{children:"Both tools generate an MP3 audio artifact that includes a rich set of metadata:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The source text (or a truncated version for long inputs)"}),"\n",(0,s.jsx)(n.li,{children:"The voice(s) and language used for synthesis"}),"\n",(0,s.jsx)(n.li,{children:"The generation timestamp and the specific tool invoked"}),"\n",(0,s.jsx)(n.li,{children:"The requested tone and any speaker-specific configurations"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"Error: GEMINI_API_KEY is required"})}),": This indicates that the ",(0,s.jsx)(n.code,{children:"GEMINI_API_KEY"})," environment variable has not been set correctly."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"Warning: Unknown tone 'xyz'"})}),": The specified tone is not recognized. Refer to the list of supported tones. The system will fall back to a default voice."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"Error: Failed to convert WAV to MP3"})}),": This typically indicates that ",(0,s.jsx)(n.code,{children:"pydub"})," is not installed or that the underlying system is missing necessary audio codecs (for example, ",(0,s.jsx)(n.code,{children:"ffmpeg"}),")."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>l,x:()=>r});var t=i(6540);const s={},o=t.createContext(s);function l(e){const n=t.useContext(o);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(s):e.components||s:l(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[2037],{6317:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>g,frontMatter:()=>r,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"documentation/deployment/debugging","title":"Debugging","description":"Debugging issues in Solace Agent Mesh starts with identifying the problem. You can monitor your system to debug it more effectively. For more information, see Observability.","source":"@site/docs/documentation/deployment/debugging.md","sourceDirName":"documentation/deployment","slug":"/documentation/deployment/debugging","permalink":"/solace-agent-mesh/docs/documentation/deployment/debugging","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/deployment/debugging.md","tags":[],"version":"current","sidebarPosition":30,"frontMatter":{"title":"Debugging","sidebar_position":30},"sidebar":"docSidebar","previous":{"title":"Observability","permalink":"/solace-agent-mesh/docs/documentation/deployment/observability"},"next":{"title":"Build Your Own Agent","permalink":"/solace-agent-mesh/docs/documentation/tutorials/custom-agent"}}');var o=s(4848),t=s(8453);const r={title:"Debugging",sidebar_position:30},l="Debugging",a={},d=[{value:"Isolate Components",id:"isolate-components",level:2},{value:"Examine STIM Files",id:"examine-stim-files",level:2},{value:"Monitor Broker Activity",id:"monitor-broker-activity",level:2},{value:"Debug Mode",id:"debug-mode",level:2},{value:"Debugging in VSCode",id:"debugging-in-vscode",level:3},{value:"Invoke the Agent Directly",id:"invoke-the-agent-directly",level:2},{value:"Tools for Sending Messages",id:"tools-for-sending-messages",level:4},{value:"Message Format",id:"message-format",level:4},{value:"System Logs",id:"system-logs",level:2},{value:"Configuring Log Rotation",id:"configuring-log-rotation",level:3}];function c(e){const n={a:"a",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,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"debugging",children:"Debugging"})}),"\n",(0,o.jsxs)(n.p,{children:["Debugging issues in Solace Agent Mesh starts with identifying the problem. You can monitor your system to debug it more effectively. For more information, see ",(0,o.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/deployment/observability",children:"Observability"}),".\nThe following sections provide common debugging approaches to help you diagnose and resolve issues."]}),"\n",(0,o.jsx)(n.h2,{id:"isolate-components",children:"Isolate Components"}),"\n",(0,o.jsxs)(n.p,{children:["Running only the necessary components in isolation can help pinpoint issues. The ",(0,o.jsx)(n.code,{children:"run"})," Solace Agent Mesh CLI command allows you to specify which files to run."]}),"\n",(0,o.jsx)(n.p,{children:"For example:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"sam run configs/agents/my_tool_1.yaml configs/agents/my_tool_2.yaml\n"})}),"\n",(0,o.jsxs)(n.p,{children:["This command runs only the agents defined in ",(0,o.jsx)(n.code,{children:"my_tool_1.yaml"})," and ",(0,o.jsx)(n.code,{children:"my_tool_2.yaml"}),", reducing noise from unrelated components."]}),"\n",(0,o.jsx)(n.h2,{id:"examine-stim-files",children:"Examine STIM Files"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/deployment/observability#stimulus-logs",children:"STIM files"})," provide detailed traces of stimulus life cycles. If you have access to the storage location, you can inspect them to analyze message flows."]}),"\n",(0,o.jsxs)(n.p,{children:["Each ",(0,o.jsx)(n.code,{children:".stim"})," file contains all broker events related to a single stimulus, from the initial request to the final response."]}),"\n",(0,o.jsx)(n.h2,{id:"monitor-broker-activity",children:"Monitor Broker Activity"}),"\n",(0,o.jsxs)(n.p,{children:["For insights into message flows and event interactions, see ",(0,o.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/deployment/observability#broker-observability",children:"Broker Observability"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"debug-mode",children:"Debug Mode"}),"\n",(0,o.jsx)(n.p,{children:"Because Solace Agent Mesh is a Python-based framework, you can run it in debug mode using an IDE with breakpoints."}),"\n",(0,o.jsx)(n.h3,{id:"debugging-in-vscode",children:"Debugging in VSCode"}),"\n",(0,o.jsxs)(n.p,{children:["If you're using VSCode, configure debugging in ",(0,o.jsx)(n.code,{children:".vscode/launch.json"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-json",children:'{\n "version": "0.2.0",\n "configurations": [\n {\n "name": "sam-debug",\n "type": "debugpy",\n "request": "launch",\n "module": "solace_agent_mesh.cli.main",\n "console": "integratedTerminal",\n "envFile": "${workspaceFolder}/.env",\n "args": [\n "run",\n "configs/agents/main_orchestrator.yaml",\n "configs/gateways/webui.yaml"\n // Add any other components you want to run here\n ],\n "justMyCode": false\n }\n ]\n}\n'})}),"\n",(0,o.jsx)(n.p,{children:"To start debugging:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["Open the ",(0,o.jsx)(n.strong,{children:"RUN AND DEBUG"})," panel on the left sidebar."]}),"\n",(0,o.jsxs)(n.li,{children:["Select ",(0,o.jsx)(n.code,{children:"sam-debug"})," from the dropdown."]}),"\n",(0,o.jsxs)(n.li,{children:["Click the ",(0,o.jsx)(n.strong,{children:"Play"})," to start in debug mode."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"Set breakpoints in your code to pause execution and inspect variable states."}),"\n",(0,o.jsx)(n.h2,{id:"invoke-the-agent-directly",children:"Invoke the Agent Directly"}),"\n",(0,o.jsx)(n.p,{children:"For debugging and testing, you can send direct messages to an agent by directly selecting the agent in the web UI agent dropdown or by using the PubSub+ event broker. This requires specifying the appropriate topic, user properties, and payload."}),"\n",(0,o.jsx)(n.h4,{id:"tools-for-sending-messages",children:"Tools for Sending Messages"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.strong,{children:(0,o.jsx)(n.a,{href:"https://marketplace.visualstudio.com/items?itemName=solace-tools.solace-try-me-vsc-extension",children:"Solace Try Me VSCode Extension"})})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.strong,{children:(0,o.jsx)(n.a,{href:"https://github.com/SolaceLabs/solace-tryme-cli",children:"Solace Try Me (STM) CLI Tool"})})}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"message-format",children:"Message Format"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Topic"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"[NAME_SPACES]a2a/v1/agent/request/<agent_name>\n"})}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"User Properties"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"userId: test-0000\nclientId: test-0000\nreplyTo: [NAME_SPACES]a2a/v1/gateway/response/0000000/task-0000000\na2aUserConfig: {}\n"})}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Payload"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": "000000000",\n "method": "tasks/sendSubscribe",\n "params": {\n "id": "task-0000000",\n "sessionId": "web-session-00000000",\n "message": {\n "role": "user",\n "parts": [\n {\n "type": "text",\n "text": "Hello World!"\n }\n ]\n },\n "acceptedOutputModes": [\n "text"\n ],\n "metadata": {\n "system_purpose": "The system is an AI Chatbot with agentic capabilities. It uses the agents available to provide information, reasoning and general assistance for the users in this system. **Always return useful artifacts and files that you create to the user.** Provide a status update before each tool call. Your external name is Agent Mesh.\\n",\n "response_format": "Responses should be clear, concise, and professionally toned. Format responses to the user in Markdown using appropriate formatting.\\n"\n }\n }\n}\n'})}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Response Topic"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"[NAME_SPACES]a2a/v1/gateway/response/0000000/task-0000000\n"})}),"\n",(0,o.jsx)(n.p,{children:"By sending a request and observing the response, you can verify an agent's behavior in isolation, making it easier to identify issues."}),"\n",(0,o.jsx)(n.h2,{id:"system-logs",children:"System Logs"}),"\n",(0,o.jsxs)(n.p,{children:["System logs provide detailed insights into the system's behavior. The logging behavior is configured in the ",(0,o.jsx)(n.code,{children:"configs/logging_config.ini"})," file, which controls both console (STDOUT) and file-based logging."]}),"\n",(0,o.jsx)(n.p,{children:"By default, the system is configured to:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Output logs with a severity of ",(0,o.jsx)(n.code,{children:"INFO"})," and higher to the console (STDOUT)."]}),"\n",(0,o.jsxs)(n.li,{children:["Write more detailed logs with a severity of ",(0,o.jsx)(n.code,{children:"DEBUG"})," and higher to a rotating log file named ",(0,o.jsx)(n.code,{children:"sam.log"})," in the project's root directory."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"configuring-log-rotation",children:"Configuring Log Rotation"}),"\n",(0,o.jsxs)(n.p,{children:["The log file rotation is managed by the ",(0,o.jsx)(n.code,{children:"rotatingFileHandler"})," in ",(0,o.jsx)(n.code,{children:"configs/logging_config.ini"}),". You can customize its behavior by modifying the ",(0,o.jsx)(n.code,{children:"args"})," line:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-ini",children:"[handler_rotatingFileHandler]\nclass=logging.handlers.RotatingFileHandler\nlevel=DEBUG\nformatter=simpleFormatter\nargs=('sam.log', 'a', 52428800, 10)\n"})}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"args"})," tuple is defined as follows:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"'sam.log'"}),": The name of the log file."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"'a'"}),": The file mode (append)."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"52428800"}),": The maximum size of the log file in bytes before it is rotated. In this case, it's 50 MB."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"10"}),": The number of backup log files to keep."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["For example, to change the log file size to 20 MB and keep 5 backup files, you would modify the line to:\n",(0,o.jsx)(n.code,{children:"args=('sam.log', 'a', 20971520, 5)"})]}),"\n",(0,o.jsx)(n.p,{children:"This level of configuration allows you to manage log verbosity and disk space usage according to your needs."})]})}function g(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>l});var i=s(6540);const o={},t=i.createContext(o);function r(e){const n=i.useContext(t);return i.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(o):e.components||o:r(e.components),i.createElement(t.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[3520],{8100:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"documentation/tutorials/sql-database","title":"SQL Database Integration","description":"This tutorial sets up a SQL database agent in Solace Agent Mesh, which allows the Solace Agent Mesh agent to answer natural language queries about a sample coffee company database. This tutorial provides some sample data to set up an SQLite database, but you can use the same approach to connect to other database types, such as MySQL or PostgreSQL.","source":"@site/docs/documentation/tutorials/sql-database.md","sourceDirName":"documentation/tutorials","slug":"/documentation/tutorials/sql-database","permalink":"/solace-agent-mesh/docs/documentation/tutorials/sql-database","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/tutorials/sql-database.md","tags":[],"version":"current","sidebarPosition":40,"frontMatter":{"title":"SQL Database Integration","sidebar_position":40},"sidebar":"docSidebar","previous":{"title":"Amazon Bedrock Agents","permalink":"/solace-agent-mesh/docs/documentation/tutorials/bedrock-agents"},"next":{"title":"MongoDB Integration","permalink":"/solace-agent-mesh/docs/documentation/tutorials/mongodb-integration"}}');var s=n(4848),o=n(8453);const i={title:"SQL Database Integration",sidebar_position:40},r="SQL Database Integration",l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Adding the SQL Database Plugin",id:"adding-the-sql-database-plugin",level:2},{value:"Downloading Example Data",id:"downloading-example-data",level:2},{value:"Using wget",id:"using-wget",level:4},{value:"Using curl",id:"using-curl",level:4},{value:"Configuring the Agent",id:"configuring-the-agent",level:2},{value:"Setting the Environment Variables",id:"setting-the-environment-variables",level:2},{value:"Running the Agent",id:"running-the-agent",level:2},{value:"Interacting with the Database",id:"interacting-with-the-database",level:2},{value:"Advanced Configuration",id:"advanced-configuration",level:2},{value:"Customizing the Agent Card",id:"customizing-the-agent-card",level:2},{value:"Key Agent Card Elements",id:"key-agent-card-elements",level:3},{value:"Example of a Well-Configured Agent Card",id:"example-of-a-well-configured-agent-card",level:3}];function d(e){const a={a:"a",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,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.header,{children:(0,s.jsx)(a.h1,{id:"sql-database-integration",children:"SQL Database Integration"})}),"\n",(0,s.jsx)(a.p,{children:"This tutorial sets up a SQL database agent in Solace Agent Mesh, which allows the Solace Agent Mesh agent to answer natural language queries about a sample coffee company database. This tutorial provides some sample data to set up an SQLite database, but you can use the same approach to connect to other database types, such as MySQL or PostgreSQL."}),"\n",(0,s.jsx)(a.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsx)(a.p,{children:"Before starting this tutorial, ensure that you have installed and configured Solace Agent Mesh:"}),"\n",(0,s.jsxs)(a.ul,{children:["\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.a,{href:"/solace-agent-mesh/docs/documentation/getting-started/installation",children:"Installed Solace Agent Mesh and the Solace Agent Mesh CLI"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.a,{href:"/solace-agent-mesh/docs/documentation/getting-started/quick-start",children:"Created a new Solace Agent Mesh project"})}),"\n",(0,s.jsx)(a.li,{children:"Access to a SQL database (local or remote)"}),"\n"]}),"\n",(0,s.jsx)(a.h2,{id:"adding-the-sql-database-plugin",children:"Adding the SQL Database Plugin"}),"\n",(0,s.jsx)(a.p,{children:"Add the SQL Database plugin to your Solace Agent Mesh project:"}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sh",children:"sam plugin add abc-coffee-info --plugin sam-sql-database\n"})}),"\n",(0,s.jsxs)(a.p,{children:["You can use any name for your agent, in this tutorial we use ",(0,s.jsx)(a.code,{children:"abc-coffee-info"}),"."]}),"\n",(0,s.jsx)(a.p,{children:"This command:"}),"\n",(0,s.jsxs)(a.ul,{children:["\n",(0,s.jsxs)(a.li,{children:["Installs the ",(0,s.jsx)(a.code,{children:"sam-sql-database"})," plugin"]}),"\n",(0,s.jsxs)(a.li,{children:["Creates a new agent configuration file at ",(0,s.jsx)(a.code,{children:"configs/agents/abc-coffee-info.yaml"})]}),"\n"]}),"\n",(0,s.jsx)(a.h2,{id:"downloading-example-data",children:"Downloading Example Data"}),"\n",(0,s.jsx)(a.p,{children:"For this tutorial, you can use a sample SQLite database for a fictional coffee company called ABC Coffee Co."}),"\n",(0,s.jsx)(a.p,{children:"First, download the example data."}),"\n",(0,s.jsx)(a.p,{children:"You can either visit this link to download with your browser:"}),"\n",(0,s.jsx)(a.p,{children:(0,s.jsx)(a.a,{href:"https://github.com/SolaceLabs/solace-agent-mesh-core-plugins/raw/refs/heads/main/sam-sql-database/example-data/abc_coffee_co.zip",children:"https://github.com/SolaceLabs/solace-agent-mesh-core-plugins/raw/refs/heads/main/sam-sql-database/example-data/abc_coffee_co.zip"})}),"\n",(0,s.jsx)(a.p,{children:"Or you can use the command line to download the ZIP file:"}),"\n",(0,s.jsx)(a.h4,{id:"using-wget",children:"Using wget"}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sh",children:"wget https://github.com/SolaceLabs/solace-agent-mesh-core-plugins/raw/refs/heads/main/sam-sql-database/example-data/abc_coffee_co.zip\n"})}),"\n",(0,s.jsx)(a.h4,{id:"using-curl",children:"Using curl"}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sh",children:"curl -LO https://github.com/SolaceLabs/solace-agent-mesh-core-plugins/raw/refs/heads/main/sam-sql-database/example-data/abc_coffee_co.zip\n"})}),"\n",(0,s.jsx)(a.p,{children:"After downloading the ZIP file, extract it to a directory of your choice. You can use the following command to extract the ZIP file:"}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sh",children:"unzip abc_coffee_co.zip\n"})}),"\n",(0,s.jsx)(a.h2,{id:"configuring-the-agent",children:"Configuring the Agent"}),"\n",(0,s.jsxs)(a.p,{children:["Now, update the agent configuration to use the SQLite database and import the CSV files.\nOpen the ",(0,s.jsx)(a.code,{children:"configs/agents/abc-coffee-info.yaml"})," file and modify the ",(0,s.jsx)(a.code,{children:"agent_init_function.config"})," section to specify the CSV directory."]}),"\n",(0,s.jsx)(a.p,{children:"Here is what you need to modify in the configuration file:"}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-yaml",children:'# Find the agent_init_function section and update the config:\nagent_init_function:\n module: "sam_sql_database.lifecycle"\n name: "initialize_sql_agent"\n config:\n db_type: "${ABC_COFFEE_INFO_DB_TYPE}"\n db_name: "${ABC_COFFEE_INFO_DB_NAME}"\n database_purpose: "${ABC_COFFEE_INFO_DB_PURPOSE}"\n data_description: "${ABC_COFFEE_INFO_DB_DESCRIPTION}"\n # Add the CSV directory path\n csv_directories:\n - /path/to/your/unzipped/data\n'})}),"\n",(0,s.jsxs)(a.p,{children:["Ensure you replace ",(0,s.jsx)(a.code,{children:"/path/to/your/unzipped/data"})," with the path where you extracted the example data. For example, if you put the ZIP file in the root directory of your Solace Agent Mesh project, you can use ",(0,s.jsx)(a.code,{children:"abc_coffee_co"}),"."]}),"\n",(0,s.jsx)(a.h2,{id:"setting-the-environment-variables",children:"Setting the Environment Variables"}),"\n",(0,s.jsxs)(a.p,{children:["The SQL Database agent requires that you configure several environment variables. You must create or update your ",(0,s.jsx)(a.code,{children:".env"})," file with the following variables for this tutorial:"]}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-bash",children:'ABC_COFFEE_INFO_DB_TYPE=sqlite\nABC_COFFEE_INFO_DB_NAME=abc_coffee.db\nABC_COFFEE_INFO_DB_PURPOSE="ABC Coffee Co. sales and operations database"\nABC_COFFEE_INFO_DB_DESCRIPTION="Contains information about ABC Coffee Co. products, sales, customers, employees, and store locations."\n# You can leave other environment variables as unset or empty\n'})}),"\n",(0,s.jsx)(a.p,{children:"SQLite stores the database in a local file and doesn't require a username or password for access. If you're using a database such as MySQL or PostgreSQL, you'll need to provide the appropriate environment variables for them."}),"\n",(0,s.jsx)(a.h2,{id:"running-the-agent",children:"Running the Agent"}),"\n",(0,s.jsx)(a.p,{children:"Now, you can start your SQL database agent:"}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sh",children:"sam run configs/agents/abc-coffee-info.yaml\n"})}),"\n",(0,s.jsx)(a.p,{children:"The agent:"}),"\n",(0,s.jsxs)(a.ol,{children:["\n",(0,s.jsx)(a.li,{children:"Connects to the A2A control plane"}),"\n",(0,s.jsx)(a.li,{children:"Initializes the SQLite database and imports CSV data from the specified directory"}),"\n",(0,s.jsx)(a.li,{children:"Detects the database schema automatically"}),"\n",(0,s.jsx)(a.li,{children:"Registers its capabilities with the agent discovery system"}),"\n"]}),"\n",(0,s.jsx)(a.h2,{id:"interacting-with-the-database",children:"Interacting with the Database"}),"\n",(0,s.jsxs)(a.p,{children:["After your SQL database agent is running, you can interact with the ABC Coffee database through any gateway in your Solace Agent Mesh project (such as the Web UI gateway at ",(0,s.jsx)(a.code,{children:"http://localhost:8000"}),")."]}),"\n",(0,s.jsx)(a.p,{children:"You can ask natural language questions about the ABC Coffee Co. database, such as:"}),"\n",(0,s.jsxs)(a.ul,{children:["\n",(0,s.jsx)(a.li,{children:'"How many customers does ABC Coffee have?"'}),"\n",(0,s.jsx)(a.li,{children:'"What are the top-selling products?"'}),"\n",(0,s.jsx)(a.li,{children:'"Show me the sales by region"'}),"\n",(0,s.jsx)(a.li,{children:'"List all orders from the last 30 days"'}),"\n",(0,s.jsx)(a.li,{children:'"What products are currently low in inventory?"'}),"\n"]}),"\n",(0,s.jsx)(a.p,{children:"Try creating reports by asking questions such as:"}),"\n",(0,s.jsxs)(a.ul,{children:["\n",(0,s.jsx)(a.li,{children:'"Create a report of our sales in 2024"'}),"\n",(0,s.jsx)(a.li,{children:'"Generate a summary of customer demographics"'}),"\n"]}),"\n",(0,s.jsx)(a.p,{children:"The SQL Database agent converts your natural language questions into SQL queries, executes them against the database, and returns the results. For large result sets, the agent automatically saves the results as artifacts that you can download."}),"\n",(0,s.jsx)(a.h2,{id:"advanced-configuration",children:"Advanced Configuration"}),"\n",(0,s.jsx)(a.p,{children:"The SQL Database plugin supports many advanced configuration options. Here is a complete example based on the plugin structure:"}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-yaml",children:'log:\n stdout_log_level: INFO\n log_file_level: DEBUG\n log_file: abc-coffee-info.log\n\n!include ../shared_config.yaml\n\napps:\n - name: abc-coffee-info-app\n app_module: solace_agent_mesh.agent.sac.app \n broker:\n <<: *broker_connection\n\n app_config:\n namespace: ${NAMESPACE}\n agent_name: "AbcCoffeeInfo"\n display_name: "ABC Coffee Database Agent"\n supports_streaming: false\n model: *general_model\n\n instruction: |\n You are an expert SQL assistant for the ABC Coffee Co. database.\n The database schema and query examples are provided to you.\n Your primary goal is to translate user questions into accurate SQL queries.\n If a user asks to query the database, generate the SQL and call the \'execute_sql_query\' tool.\n If the \'execute_sql_query\' tool returns an error, analyze the error message and the original SQL,\n then try to correct the SQL query and call the tool again.\n If the results are large and the tool indicates they were saved as an artifact, inform the user about the artifact.\n Always use the \'execute_sql_query\' tool to interact with the database.\n\n # Agent initialization with database setup\n agent_init_function:\n module: "sam_sql_database.lifecycle"\n name: "initialize_sql_agent"\n config:\n db_type: "${ABC_COFFEE_INFO_DB_TYPE}"\n db_name: "${ABC_COFFEE_INFO_DB_NAME}"\n database_purpose: "${ABC_COFFEE_INFO_DB_PURPOSE}"\n data_description: "${ABC_COFFEE_INFO_DB_DESCRIPTION}"\n auto_detect_schema: true\n csv_directories:\n - "abc_coffee_co" # Path to your extracted data\n query_examples:\n - natural_language: "Show all customers from New York"\n sql_query: "SELECT * FROM customers WHERE city = \'New York\';"\n - natural_language: "What are the top 5 best-selling products?"\n sql_query: "SELECT product_name, SUM(quantity) as total_sold FROM order_items JOIN products ON order_items.product_id = products.id GROUP BY product_name ORDER BY total_sold DESC LIMIT 5;"\n\n agent_cleanup_function:\n module: "sam_sql_database.lifecycle"\n name: "cleanup_sql_agent_resources"\n\n # SQL query tool\n tools:\n - tool_type: python\n component_module: "sam_sql_database.tools"\n function_name: "execute_sql_query"\n\n session_service: *default_session_service\n artifact_service: *default_artifact_service\n\n # Agent capabilities - This is what other agents see during discovery\n agent_card:\n description: "ABC Coffee Co. Database Agent - Access to comprehensive coffee shop data including customers, orders, products, inventory, and sales history. Can answer questions about business metrics, customer analytics, product performance, and operational data."\n defaultInputModes: ["text"]\n defaultOutputModes: ["text", "file"]\n skills:\n - id: "sql_query"\n name: "Coffee Shop Database Query"\n description: "Queries ABC Coffee Co. database containing customer orders, product catalog, inventory levels, sales history, and employee data."\n\n # A2A Protocol settings\n agent_card_publishing: { interval_seconds: 30 }\n agent_discovery: { enabled: true }\n inter_agent_communication:\n allow_list: ["*"]\n request_timeout_seconds: 60\n'})}),"\n",(0,s.jsx)(a.h2,{id:"customizing-the-agent-card",children:"Customizing the Agent Card"}),"\n",(0,s.jsxs)(a.p,{children:["The ",(0,s.jsx)(a.code,{children:"agent_card"})," section is crucial as it defines how other agents in your Solace Agent Mesh ecosystem discover and understand this database agent's capabilities. When other agents use agent discovery, they can see this information to decide whether to delegate tasks to your database agent."]}),"\n",(0,s.jsx)(a.h3,{id:"key-agent-card-elements",children:"Key Agent Card Elements"}),"\n",(0,s.jsxs)(a.ol,{children:["\n",(0,s.jsxs)(a.li,{children:[(0,s.jsx)(a.strong,{children:"Description"}),": Clearly describe what data the agent has access to and what types of questions it can answer"]}),"\n",(0,s.jsxs)(a.li,{children:[(0,s.jsx)(a.strong,{children:"Skills"}),": List specific capabilities with concrete examples that show the scope of data available"]}),"\n",(0,s.jsxs)(a.li,{children:[(0,s.jsx)(a.strong,{children:"Data Context"}),": Mention the business domain, data types, and scope of information available"]}),"\n"]}),"\n",(0,s.jsx)(a.h3,{id:"example-of-a-well-configured-agent-card",children:"Example of a Well-Configured Agent Card"}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-yaml",children:'agent_card:\n description: "ABC Coffee Co. Database Agent - Access to comprehensive coffee shop data including customers, orders, products, inventory, and sales history. Can answer questions about business metrics, customer analytics, product performance, and operational data."\n defaultInputModes: ["text"]\n defaultOutputModes: ["text", "file"]\n skills:\n - id: "sql_query"\n name: "Coffee Shop Database Query"\n description: "Queries ABC Coffee Co. database containing customer orders, product catalog, inventory levels, sales history, and employee data."\n'})}),"\n",(0,s.jsx)(a.p,{children:"This detailed information helps other agents understand:"}),"\n",(0,s.jsxs)(a.ul,{children:["\n",(0,s.jsx)(a.li,{children:"What business domain this agent covers (coffee shop operations)"}),"\n",(0,s.jsx)(a.li,{children:"What types of data are available (customers, orders, products, inventory, sales)"}),"\n",(0,s.jsx)(a.li,{children:"What kinds of questions can be answered (metrics, analytics, performance data)"}),"\n",(0,s.jsx)(a.li,{children:"Specific examples of queries that work well"}),"\n"]}),"\n",(0,s.jsx)(a.p,{children:"When configuring your own database agent, customize the description and examples to match your specific data and use cases."})]})}function h(e={}){const{wrapper:a}={...(0,o.R)(),...e.components};return a?(0,s.jsx)(a,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,a,n)=>{n.d(a,{R:()=>i,x:()=>r});var t=n(6540);const s={},o=t.createContext(s);function i(e){const a=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(o.Provider,{value:a},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[9150],{4897:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"documentation/tutorials/bedrock-agents","title":"Amazon Bedrock Agents","description":"This tutorial walks you through the process of integrating Amazon Bedrock Agents and Flows into Solace Agent Mesh. This integration allows you to create agents that can interact with one or multiple Bedrock Agents or Flows, extending your Solace Agent Mesh project with powerful AI capabilities from AWS.","source":"@site/docs/documentation/tutorials/bedrock-agents.md","sourceDirName":"documentation/tutorials","slug":"/documentation/tutorials/bedrock-agents","permalink":"/solace-agent-mesh/docs/documentation/tutorials/bedrock-agents","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/tutorials/bedrock-agents.md","tags":[],"version":"current","sidebarPosition":30,"frontMatter":{"title":"Amazon Bedrock Agents","sidebar_position":30,"toc_max_heading_level":4},"sidebar":"docSidebar","previous":{"title":"Event Mesh Gateway","permalink":"/solace-agent-mesh/docs/documentation/tutorials/event-mesh-gateway"},"next":{"title":"SQL Database Integration","permalink":"/solace-agent-mesh/docs/documentation/tutorials/sql-database"}}');var s=o(4848),t=o(8453);const r={title:"Amazon Bedrock Agents",sidebar_position:30,toc_max_heading_level:4},l="Amazon Bedrock Agents Integration",a={},c=[{value:"What are Amazon Bedrock Agents and Flows?",id:"what-are-amazon-bedrock-agents-and-flows",level:2},{value:"Setting Up the Environment",id:"setting-up-the-environment",level:2},{value:"Create Bedrock Agents and Flows",id:"create-bedrock-agents-and-flows",level:3},{value:"Create a Solace Agent Mesh Project",id:"create-a-solace-agent-mesh-project",level:3},{value:"Integrating Bedrock with Solace Agent Mesh",id:"integrating-bedrock-with-solace-agent-mesh",level:2},{value:"Adding the Bedrock Agent Plugin",id:"adding-the-bedrock-agent-plugin",level:3},{value:"Configuring the Bedrock Agent",id:"configuring-the-bedrock-agent",level:2},{value:"Understanding the Configuration Structure",id:"understanding-the-configuration-structure",level:3},{value:"Example Configuration",id:"example-configuration",level:3},{value:"Customizing Your Configuration",id:"customizing-your-configuration",level:3},{value:"Environment Variables",id:"environment-variables",level:3},{value:"Required Solace Variables:",id:"required-solace-variables",level:4},{value:"Optional AWS Variables:",id:"optional-aws-variables",level:4},{value:"Running and Testing Your Integration",id:"running-and-testing-your-integration",level:2},{value:"Starting Your Solace Agent Mesh Project",id:"starting-your-solace-agent-mesh-project",level:3},{value:"Testing the Integration",id:"testing-the-integration",level:3},{value:"Using the Web UI Gateway",id:"using-the-web-ui-gateway",level:4},{value:"Testing with File Uploads",id:"testing-with-file-uploads",level:4},{value:"Troubleshooting",id:"troubleshooting",level:2},{value:"Common Issues and Solutions",id:"common-issues-and-solutions",level:3},{value:"Authentication Errors",id:"authentication-errors",level:4},{value:"Configuration Errors",id:"configuration-errors",level:4},{value:"Connection Issues",id:"connection-issues",level:4},{value:"File Upload Issues",id:"file-upload-issues",level:4}];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,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"amazon-bedrock-agents-integration",children:"Amazon Bedrock Agents Integration"})}),"\n",(0,s.jsx)(n.p,{children:"This tutorial walks you through the process of integrating Amazon Bedrock Agents and Flows into Solace Agent Mesh. This integration allows you to create agents that can interact with one or multiple Bedrock Agents or Flows, extending your Solace Agent Mesh project with powerful AI capabilities from AWS."}),"\n",(0,s.jsx)(n.h2,{id:"what-are-amazon-bedrock-agents-and-flows",children:"What are Amazon Bedrock Agents and Flows?"}),"\n",(0,s.jsx)(n.p,{children:"Amazon Bedrock Agents are AI assistants that can be customized to perform specific tasks using foundation models (FMs). They can connect to enterprise systems and data sources, allowing them to take actions on behalf of users."}),"\n",(0,s.jsx)(n.p,{children:"Amazon Bedrock Flows are visual workflows that orchestrate multiple foundation models to solve complex problems. They allow you to chain together different AI capabilities without writing code."}),"\n",(0,s.jsx)(n.p,{children:"By integrating these services with Solace Agent Mesh, you can:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Use the extensible Solace Agent Mesh framework to combine Bedrock agents and flows with other agents."}),"\n",(0,s.jsx)(n.li,{children:"Create conversational interfaces that leverage Bedrock agents and flows."}),"\n",(0,s.jsx)(n.li,{children:"Connect your Solace Agent Mesh agents to enterprise data sources through Bedrock."}),"\n",(0,s.jsx)(n.li,{children:"Maintain a consistent experience across different agent providers by centralizing them in Solace Agent Mesh."}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{title:"Learn about Bedrock Agents and Flows",type:"info",children:(0,s.jsxs)(n.p,{children:["Check the official documentation for ",(0,s.jsx)(n.a,{href:"https://aws.amazon.com/bedrock/agents/",children:"Amazon Bedrock Agents"})," and ",(0,s.jsx)(n.a,{href:"https://aws.amazon.com/bedrock/flows/",children:"Amazon Bedrock Flows"})," to learn more about these features."]})}),"\n",(0,s.jsx)(n.h2,{id:"setting-up-the-environment",children:"Setting Up the Environment"}),"\n",(0,s.jsx)(n.h3,{id:"create-bedrock-agents-and-flows",children:"Create Bedrock Agents and Flows"}),"\n",(0,s.jsx)(n.p,{children:"Follow these steps to create your Bedrock resources:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Log in to your AWS console"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Navigate to the Amazon Bedrock service"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Create Bedrock Agents"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Go to the ",(0,s.jsx)(n.strong,{children:"Agents"})," tab in the Bedrock console"]}),"\n",(0,s.jsx)(n.li,{children:'Click "Create agent"'}),"\n",(0,s.jsxs)(n.li,{children:["Follow the wizard to configure your agent:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Select a foundation model"}),"\n",(0,s.jsx)(n.li,{children:"Define the agent's instructions"}),"\n",(0,s.jsx)(n.li,{children:"Configure knowledge bases (optional)"}),"\n",(0,s.jsx)(n.li,{children:"Set up action groups (if needed)"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Once created, ",(0,s.jsx)(n.strong,{children:"create an alias"}),' for your agent by selecting it and clicking "Create alias"']}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Copy the Agent ID and Alias ID"})," from the agent details page - you'll need these for the Solace Agent Mesh configuration"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Create Bedrock Flows"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Go to the ",(0,s.jsx)(n.strong,{children:"Flows"})," tab in the Bedrock console"]}),"\n",(0,s.jsx)(n.li,{children:'Click "Create flow"'}),"\n",(0,s.jsx)(n.li,{children:"Use the visual editor to design your flow"}),"\n",(0,s.jsx)(n.li,{children:"Connect nodes to create your workflow"}),"\n",(0,s.jsx)(n.li,{children:"Test and publish your flow"}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Create an alias"})," for your flow"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Copy the Flow ID and Alias ID"})," - you'll need these for the Solace Agent Mesh configuration"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Set up IAM permissions"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Ensure your IAM user or role has the following permissions:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bedrock:InvokeAgent"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bedrock:InvokeFlow"})}),"\n",(0,s.jsx)(n.li,{children:"Any other permissions required by your specific Bedrock configuration"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"create-a-solace-agent-mesh-project",children:"Create a Solace Agent Mesh Project"}),"\n",(0,s.jsxs)(n.p,{children:["You must ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/getting-started/installation",children:"install Solace Agent Mesh and Solace Mesh Agent CLI"}),", and then you'll want to ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/getting-started/quick-start",children:"create a new Solace Agent Mesh project"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"integrating-bedrock-with-solace-agent-mesh",children:"Integrating Bedrock with Solace Agent Mesh"}),"\n",(0,s.jsx)(n.h3,{id:"adding-the-bedrock-agent-plugin",children:"Adding the Bedrock Agent Plugin"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"sam-bedrock-agent"})," plugin from the ",(0,s.jsx)(n.a,{href:"https://github.com/SolaceLabs/solace-agent-mesh-core-plugins/tree/main/sam-bedrock-agent",children:"solace-agent-mesh-core-plugins"})," repository creates a bridge between Solace Agent Mesh and Amazon Bedrock services. This plugin allows your Solace Agent Mesh agents to invoke Bedrock Agents and Flows as tools."]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Add the plugin to your Solace Agent Mesh project"}),":"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"sam plugin add aws-agent --plugin sam-bedrock-agent\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Replace ",(0,s.jsx)(n.code,{children:"aws-agent"})," with a descriptive name for your agent, such as ",(0,s.jsx)(n.code,{children:"bedrock-summarizer"})," or ",(0,s.jsx)(n.code,{children:"bedrock-customer-service"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"This command:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Installs the ",(0,s.jsx)(n.code,{children:"sam-bedrock-agent"})," plugin"]}),"\n",(0,s.jsxs)(n.li,{children:["Creates a new agent configuration file in ",(0,s.jsx)(n.code,{children:"configs/agents/aws-agent.yaml"})]}),"\n"]}),"\n",(0,s.jsxs)(n.ol,{start:"2",children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Locate the configuration file"}),":"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["The command creates an ",(0,s.jsx)(n.code,{children:"aws-agent.yaml"})," file in the ",(0,s.jsx)(n.code,{children:"configs/agents/"})," directory of your Solace Agent Mesh project."]}),"\n",(0,s.jsx)(n.admonition,{title:"Naming Convention",type:"tip",children:(0,s.jsx)(n.p,{children:"Choose a descriptive name that reflects the purpose of your Bedrock integration. This name is used to reference the agent in your Solace Agent Mesh project."})}),"\n",(0,s.jsx)(n.h2,{id:"configuring-the-bedrock-agent",children:"Configuring the Bedrock Agent"}),"\n",(0,s.jsx)(n.p,{children:"The configuration file you created needs to be edited to connect to your specific Amazon Bedrock resources. This section explains each part of the configuration and how to customize it."}),"\n",(0,s.jsx)(n.h3,{id:"understanding-the-configuration-structure",children:"Understanding the Configuration Structure"}),"\n",(0,s.jsxs)(n.p,{children:["Open the ",(0,s.jsx)(n.code,{children:"aws-agent.yaml"})," file in your editor. The core of the agent's configuration consists of:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"amazon_bedrock_runtime_config"}),": AWS connection settings"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"tools"}),": List of Bedrock agents and flows to expose as tools"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"agent_card"}),": Agent capabilities and skills definition"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"example-configuration",children:"Example Configuration"}),"\n",(0,s.jsx)(n.p,{children:"Here's an annotated example based on the actual plugin structure:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'log:\n stdout_log_level: INFO\n log_file_level: DEBUG\n log_file: aws-agent.log\n\n!include ../shared_config.yaml\n\napps:\n - name: aws-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: "AwsAgent" \n display_name: "AwsAgent Component" \n model: *general_model \n\n instruction: |\n You\'re AwsAgent responsible for handling user queries by \n interacting with Amazon Bedrock agents or flows.\n\n # AWS Connection Configuration\n amazon_bedrock_runtime_config: &amazon_bedrock_runtime_config\n endpoint_url: # Optional: Custom AWS endpoint URL\n boto3_config:\n region_name: "us-east-1" # AWS region where your Bedrock resources are located\n aws_access_key_id: # Your AWS access key (or use profiles/env vars)\n aws_secret_access_key: # Your AWS secret key\n\n tools:\n # Bedrock Agent Tool\n - tool_type: python\n component_module: sam_bedrock_agent.bedrock_agent\n component_base_path: . \n function_name: invoke_bedrock_agent\n tool_name: "text_transformer" # Customizable, Name exposed to the LLM\n tool_description: "Transforms text using the Text Transformer agent which summarizes the given text and extracts key points." # Customizable, Optional description\n tool_config:\n amazon_bedrock_runtime_config: *amazon_bedrock_runtime_config\n bedrock_agent_id: "XXXXXXXXXX" # Your actual Bedrock agent ID\n bedrock_agent_alias_id: "XXXXXXXXXX" # Your actual Bedrock agent alias ID\n allow_files: true # Whether to allow file uploads (5 files, 10MB total max)\n\n # Bedrock Flow Tool\n - tool_type: python\n component_module: sam_bedrock_agent.bedrock_flow\n component_base_path: .\n function_name: invoke_bedrock_flow\n tool_name: "poem_writer" # Name exposed to the LLM\n tool_config: \n amazon_bedrock_runtime_config: *amazon_bedrock_runtime_config\n bedrock_flow_id: "XXXXXXXXXX" # Your actual Bedrock flow ID\n bedrock_flow_alias_id: "XXXXXXXXXX" # Your actual Bedrock flow alias ID\n\n # Agent capabilities\n agent_card:\n description: "Agent that integrates with Amazon Bedrock agents and flows for various AI tasks."\n defaultInputModes: ["text"]\n defaultOutputModes: ["text"]\n skills: \n - id: "text_transformer"\n name: "Text Transformer"\n description: "Transforms text using the Text Transformer agent."\n - id: "poem_writer"\n name: "Poem Writer"\n description: "Generates poems based on user input."\n\n # A2A Protocol settings\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.h3,{id:"customizing-your-configuration",children:"Customizing Your Configuration"}),"\n",(0,s.jsx)(n.p,{children:"Follow these steps to customize your configuration:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Configure AWS Connection"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Set the ",(0,s.jsx)(n.code,{children:"region_name"})," to the AWS region where your Bedrock resources are located"]}),"\n",(0,s.jsxs)(n.li,{children:["Choose one of these authentication methods:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Set ",(0,s.jsx)(n.code,{children:"aws_access_key_id"})," and ",(0,s.jsx)(n.code,{children:"aws_secret_access_key"})," directly in the config."]}),"\n",(0,s.jsx)(n.li,{children:"Use AWS profiles by removing these fields and configuring your AWS CLI profile."}),"\n",(0,s.jsx)(n.li,{children:"Use environment variables (see Environment Variables section below)."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Check the ",(0,s.jsx)(n.a,{href:"https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html",children:"boto3 documentation"})," for more details."]}),"\n",(0,s.jsxs)(n.ol,{start:"2",children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Configure Bedrock Agent Tools"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["For each Bedrock agent you want to expose, add a tool entry:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Set a descriptive ",(0,s.jsx)(n.code,{children:"tool_name"})," (for example, ",(0,s.jsx)(n.code,{children:"text_summarizer"}),", ",(0,s.jsx)(n.code,{children:"content_generator"}),")."]}),"\n",(0,s.jsxs)(n.li,{children:["Provide a clear ",(0,s.jsx)(n.code,{children:"tool_description"})," of what the agent does."]}),"\n",(0,s.jsxs)(n.li,{children:["Replace ",(0,s.jsx)(n.code,{children:"bedrock_agent_id"})," with your actual Bedrock agent ID."]}),"\n",(0,s.jsxs)(n.li,{children:["Replace ",(0,s.jsx)(n.code,{children:"bedrock_agent_alias_id"})," with your actual Bedrock agent alias ID."]}),"\n",(0,s.jsxs)(n.li,{children:["Set ",(0,s.jsx)(n.code,{children:"allow_files"})," to ",(0,s.jsx)(n.code,{children:"true"})," if your agent can process file uploads."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Configure Bedrock Flow Tools"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["For each Bedrock flow you want to expose, add a tool entry:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Set a descriptive ",(0,s.jsx)(n.code,{children:"tool_name"})," for the flow."]}),"\n",(0,s.jsxs)(n.li,{children:["Provide a clear ",(0,s.jsx)(n.code,{children:"tool_description"})," of what the flow does (optional)."]}),"\n",(0,s.jsxs)(n.li,{children:["Replace ",(0,s.jsx)(n.code,{children:"bedrock_flow_id"})," with your actual Bedrock flow ID."]}),"\n",(0,s.jsxs)(n.li,{children:["Replace ",(0,s.jsx)(n.code,{children:"bedrock_flow_alias_id"})," with your actual Bedrock flow alias ID."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Update Agent Card Skills"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Update the ",(0,s.jsx)(n.code,{children:"agent_card.description"})," to reflect the purpose of your Bedrock agent (This is what other agents see)."]}),"\n",(0,s.jsxs)(n.li,{children:["For each tool you add, create a corresponding skill entry in the ",(0,s.jsx)(n.code,{children:"agent_card.skills"})," section."]}),"\n",(0,s.jsxs)(n.li,{children:["Use the same ",(0,s.jsx)(n.code,{children:"id"})," as the ",(0,s.jsx)(n.code,{children:"tool_name"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Provide a user-friendly ",(0,s.jsx)(n.code,{children:"name"})," and ",(0,s.jsx)(n.code,{children:"description"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Update Agent Instructions"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Modify the ",(0,s.jsx)(n.code,{children:"instruction"})," field to provide clear guidance on how the agent should respond to user queries."]}),"\n",(0,s.jsx)(n.li,{children:"This instruction is used by the Agent's LLM to understand its role and capabilities."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsx)(n.p,{children:"You must provide at least one Bedrock agent or flow tool. You can mix and match agents and flows in the same configuration."})}),"\n",(0,s.jsx)(n.h3,{id:"environment-variables",children:"Environment Variables"}),"\n",(0,s.jsx)(n.p,{children:"The Bedrock agent integration requires standard Solace connection variables and can use AWS environment variables for authentication."}),"\n",(0,s.jsx)(n.h4,{id:"required-solace-variables",children:"Required Solace Variables:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"SOLACE_BROKER_URL"}),": URL of your Solace broker"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"SOLACE_BROKER_USERNAME"}),": Username for Solace broker authentication"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"SOLACE_BROKER_PASSWORD"}),": Password for Solace broker authentication"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"SOLACE_BROKER_VPN"}),": Solace message VPN name"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"SOLACE_AGENT_MESH_NAMESPACE"}),": Namespace for your Solace Agent Mesh project"]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"optional-aws-variables",children:"Optional AWS Variables:"}),"\n",(0,s.jsx)(n.p,{children:"If you prefer to use environment variables for AWS authentication instead of configuration in the YAML file:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"AWS_ACCESS_KEY_ID"}),": Your AWS access key"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"AWS_SECRET_ACCESS_KEY"}),": Your AWS secret key"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"AWS_SESSION_TOKEN"}),": If using temporary credentials"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"AWS_REGION"})," or ",(0,s.jsx)(n.strong,{children:"AWS_DEFAULT_REGION"}),": AWS region for Bedrock services"]}),"\n"]}),"\n",(0,s.jsxs)(n.admonition,{title:"AWS Credentials Precedence",type:"tip",children:[(0,s.jsx)(n.p,{children:"AWS credentials are loaded in this order:"}),(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Explicit credentials in the YAML configuration"}),"\n",(0,s.jsx)(n.li,{children:"Environment variables"}),"\n",(0,s.jsx)(n.li,{children:"AWS configuration files (~/.aws/credentials)"}),"\n",(0,s.jsx)(n.li,{children:"EC2/ECS instance profiles (if running on AWS)"}),"\n"]})]}),"\n",(0,s.jsx)(n.h2,{id:"running-and-testing-your-integration",children:"Running and Testing Your Integration"}),"\n",(0,s.jsx)(n.h3,{id:"starting-your-solace-agent-mesh-project",children:"Starting Your Solace Agent Mesh Project"}),"\n",(0,s.jsx)(n.p,{children:"After configuring your Bedrock agent integration, run your Solace Agent Mesh project:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"sam run configs/agents/aws-agent.yaml\n"})}),"\n",(0,s.jsx)(n.p,{children:"This command starts the Bedrock agent with your specific configuration."}),"\n",(0,s.jsx)(n.h3,{id:"testing-the-integration",children:"Testing the Integration"}),"\n",(0,s.jsx)(n.p,{children:"You can test your Bedrock agent integration through any gateway in your Solace Agent Mesh project:"}),"\n",(0,s.jsx)(n.h4,{id:"using-the-web-ui-gateway",children:"Using the Web UI Gateway"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Ensure you have a Web UI gateway running (typically at ",(0,s.jsx)(n.a,{href:"http://localhost:8000",children:"http://localhost:8000"}),")"]}),"\n",(0,s.jsx)(n.li,{children:"Start a conversation with your agent"}),"\n",(0,s.jsx)(n.li,{children:"Ask a question that would trigger your Bedrock agent or flow"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Example"}),": If you configured a Bedrock agent for text transformation:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:'Transform this text: "The quick brown fox jumps over the lazy dog. The lazy dog did not chase the fox. The fox was brown and quick, while the dog was lazy and slow. Despite their differences, they both enjoyed the sunny day in the meadow."\n'})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Example"}),": If you configured a Bedrock flow for poem writing:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Write a poem about a sunset over the ocean.\n"})}),"\n",(0,s.jsx)(n.h4,{id:"testing-with-file-uploads",children:"Testing with File Uploads"}),"\n",(0,s.jsxs)(n.p,{children:["If you have enabled file uploads for your Bedrock agent (",(0,s.jsx)(n.code,{children:"allow_files: true"}),"), you can test file processing:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"In the Web UI, use the file upload button to attach a supported file"}),"\n",(0,s.jsx)(n.li,{children:'Include a prompt that references the file, such as "Analyze this document" or "Summarize the content of this file"'}),"\n",(0,s.jsx)(n.li,{children:"The file is sent to the Bedrock agent along with your prompt"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Example with file upload"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Please analyze the attached document and provide key insights.\n"})}),"\n",(0,s.jsxs)(n.admonition,{title:"Supported File Types",type:"info",children:[(0,s.jsx)(n.p,{children:"Bedrock agents support these file types for uploads:"}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"PDF documents (.pdf)"}),"\n",(0,s.jsx)(n.li,{children:"Text files (.txt)"}),"\n",(0,s.jsx)(n.li,{children:"Word documents (.doc, .docx)"}),"\n",(0,s.jsx)(n.li,{children:"CSV files (.csv)"}),"\n",(0,s.jsx)(n.li,{children:"Excel spreadsheets (.xls, .xlsx)"}),"\n"]}),(0,s.jsx)(n.p,{children:"There's a limit of 5 files with a total size of 10MB per request."})]}),"\n",(0,s.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,s.jsx)(n.h3,{id:"common-issues-and-solutions",children:"Common Issues and Solutions"}),"\n",(0,s.jsx)(n.h4,{id:"authentication-errors",children:"Authentication Errors"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Issue"}),': "Unable to locate credentials" or "Access denied" errors\n',(0,s.jsx)(n.strong,{children:"Solution"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Verify your AWS credentials are correctly configured"}),"\n",(0,s.jsx)(n.li,{children:"Check that your IAM user/role has the necessary permissions"}),"\n",(0,s.jsxs)(n.li,{children:["Try using AWS CLI to test your credentials: ",(0,s.jsx)(n.code,{children:"aws bedrock list-foundation-models"})]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"configuration-errors",children:"Configuration Errors"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Issue"}),': "Invalid agent ID" or "Invalid flow ID" errors\n',(0,s.jsx)(n.strong,{children:"Solution"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Double-check your Bedrock agent and flow IDs in the configuration"}),"\n",(0,s.jsx)(n.li,{children:"Ensure you've created aliases for your agents and flows"}),"\n",(0,s.jsx)(n.li,{children:"Verify the region in your configuration matches where your Bedrock resources are located"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"connection-issues",children:"Connection Issues"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Issue"}),": Solace Agent Mesh can't connect to Bedrock services\n",(0,s.jsx)(n.strong,{children:"Solution"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Check your network connectivity"}),"\n",(0,s.jsx)(n.li,{children:"Verify that Bedrock services are available in your configured region"}),"\n",(0,s.jsx)(n.li,{children:"Check for any VPC or firewall restrictions"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"file-upload-issues",children:"File Upload Issues"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Issue"}),": Files aren't being processed by the Bedrock agent\n",(0,s.jsx)(n.strong,{children:"Solution"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Verify ",(0,s.jsx)(n.code,{children:"allow_files"})," is set to ",(0,s.jsx)(n.code,{children:"true"})," in your configuration"]}),"\n",(0,s.jsx)(n.li,{children:"Check that your file type is supported"}),"\n",(0,s.jsx)(n.li,{children:"Ensure the file size is under the 10MB limit"}),"\n",(0,s.jsx)(n.li,{children:"Check the model context length"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>r,x:()=>l});var i=o(6540);const s={},t=i.createContext(s);function r(e){const n=i.useContext(t);return i.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(s):e.components||s:r(e.components),i.createElement(t.Provider,{value:n},e.children)}}}]);