solace-agent-mesh 1.0.9__py3-none-any.whl → 1.3.0__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (220) hide show
  1. solace_agent_mesh/agent/adk/adk_llm.txt +182 -42
  2. solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +171 -0
  3. solace_agent_mesh/agent/adk/callbacks.py +165 -104
  4. solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +0 -18
  5. solace_agent_mesh/agent/adk/models/models_llm.txt +104 -55
  6. solace_agent_mesh/agent/adk/runner.py +25 -17
  7. solace_agent_mesh/agent/adk/services.py +3 -3
  8. solace_agent_mesh/agent/adk/setup.py +11 -0
  9. solace_agent_mesh/agent/adk/stream_parser.py +8 -1
  10. solace_agent_mesh/agent/adk/tool_wrapper.py +10 -3
  11. solace_agent_mesh/agent/agent_llm.txt +355 -18
  12. solace_agent_mesh/agent/protocol/event_handlers.py +460 -317
  13. solace_agent_mesh/agent/protocol/protocol_llm.txt +54 -7
  14. solace_agent_mesh/agent/sac/app.py +2 -2
  15. solace_agent_mesh/agent/sac/component.py +211 -517
  16. solace_agent_mesh/agent/sac/sac_llm.txt +133 -63
  17. solace_agent_mesh/agent/testing/testing_llm.txt +25 -58
  18. solace_agent_mesh/agent/tools/peer_agent_tool.py +15 -11
  19. solace_agent_mesh/agent/tools/tools_llm.txt +234 -69
  20. solace_agent_mesh/agent/utils/artifact_helpers.py +35 -1
  21. solace_agent_mesh/agent/utils/utils_llm.txt +90 -105
  22. solace_agent_mesh/assets/docs/404.html +3 -3
  23. solace_agent_mesh/assets/docs/assets/js/6e0db977.39a79ca9.js +1 -0
  24. solace_agent_mesh/assets/docs/assets/js/{75384d09.ccd480c4.js → 75384d09.bf78fbdb.js} +1 -1
  25. solace_agent_mesh/assets/docs/assets/js/90dd9cf6.88f385ea.js +1 -0
  26. solace_agent_mesh/assets/docs/assets/js/f284c35a.fb68323a.js +1 -0
  27. solace_agent_mesh/assets/docs/assets/js/main.08d30374.js +2 -0
  28. solace_agent_mesh/assets/docs/assets/js/runtime~main.458efb1d.js +1 -0
  29. solace_agent_mesh/assets/docs/docs/documentation/concepts/agents/index.html +4 -4
  30. solace_agent_mesh/assets/docs/docs/documentation/concepts/architecture/index.html +4 -4
  31. solace_agent_mesh/assets/docs/docs/documentation/concepts/cli/index.html +4 -4
  32. solace_agent_mesh/assets/docs/docs/documentation/concepts/gateways/index.html +4 -4
  33. solace_agent_mesh/assets/docs/docs/documentation/concepts/orchestrator/index.html +4 -4
  34. solace_agent_mesh/assets/docs/docs/documentation/concepts/plugins/index.html +4 -4
  35. solace_agent_mesh/assets/docs/docs/documentation/deployment/debugging/index.html +4 -4
  36. solace_agent_mesh/assets/docs/docs/documentation/deployment/deploy/index.html +4 -4
  37. solace_agent_mesh/assets/docs/docs/documentation/deployment/observability/index.html +4 -4
  38. solace_agent_mesh/assets/docs/docs/documentation/getting-started/component-overview/index.html +4 -4
  39. solace_agent_mesh/assets/docs/docs/documentation/getting-started/configurations/index.html +4 -4
  40. solace_agent_mesh/assets/docs/docs/documentation/getting-started/installation/index.html +4 -4
  41. solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +4 -4
  42. solace_agent_mesh/assets/docs/docs/documentation/getting-started/quick-start/index.html +4 -4
  43. solace_agent_mesh/assets/docs/docs/documentation/migration-guides/a2a-upgrade-to-0.3.0/a2a-gateway-upgrade-to-0.3.0/index.html +105 -0
  44. solace_agent_mesh/assets/docs/docs/documentation/migration-guides/a2a-upgrade-to-0.3.0/a2a-technical-migration-map/index.html +53 -0
  45. solace_agent_mesh/assets/docs/docs/documentation/tutorials/bedrock-agents/index.html +4 -4
  46. solace_agent_mesh/assets/docs/docs/documentation/tutorials/custom-agent/index.html +4 -4
  47. solace_agent_mesh/assets/docs/docs/documentation/tutorials/event-mesh-gateway/index.html +4 -4
  48. solace_agent_mesh/assets/docs/docs/documentation/tutorials/mcp-integration/index.html +4 -4
  49. solace_agent_mesh/assets/docs/docs/documentation/tutorials/mongodb-integration/index.html +4 -4
  50. solace_agent_mesh/assets/docs/docs/documentation/tutorials/rag-integration/index.html +4 -4
  51. solace_agent_mesh/assets/docs/docs/documentation/tutorials/rest-gateway/index.html +4 -4
  52. solace_agent_mesh/assets/docs/docs/documentation/tutorials/slack-integration/index.html +4 -4
  53. solace_agent_mesh/assets/docs/docs/documentation/tutorials/sql-database/index.html +4 -4
  54. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/artifact-management/index.html +4 -4
  55. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/audio-tools/index.html +4 -4
  56. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/data-analysis-tools/index.html +4 -4
  57. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/embeds/index.html +4 -4
  58. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/index.html +4 -4
  59. solace_agent_mesh/assets/docs/docs/documentation/user-guide/create-agents/index.html +4 -4
  60. solace_agent_mesh/assets/docs/docs/documentation/user-guide/create-gateways/index.html +4 -4
  61. solace_agent_mesh/assets/docs/docs/documentation/user-guide/creating-service-providers/index.html +4 -4
  62. solace_agent_mesh/assets/docs/docs/documentation/user-guide/solace-ai-connector/index.html +4 -4
  63. solace_agent_mesh/assets/docs/docs/documentation/user-guide/structure/index.html +4 -4
  64. solace_agent_mesh/assets/docs/lunr-index-1757433031159.json +1 -0
  65. solace_agent_mesh/assets/docs/lunr-index.json +1 -1
  66. solace_agent_mesh/assets/docs/search-doc-1757433031159.json +1 -0
  67. solace_agent_mesh/assets/docs/search-doc.json +1 -1
  68. solace_agent_mesh/assets/docs/sitemap.xml +1 -1
  69. solace_agent_mesh/cli/__init__.py +1 -1
  70. solace_agent_mesh/cli/commands/add_cmd/agent_cmd.py +125 -48
  71. solace_agent_mesh/cli/commands/eval_cmd.py +14 -0
  72. solace_agent_mesh/cli/commands/init_cmd/__init__.py +53 -31
  73. solace_agent_mesh/cli/commands/init_cmd/database_step.py +91 -0
  74. solace_agent_mesh/cli/commands/init_cmd/env_step.py +19 -8
  75. solace_agent_mesh/cli/commands/init_cmd/orchestrator_step.py +80 -25
  76. solace_agent_mesh/cli/commands/init_cmd/web_init_step.py +32 -10
  77. solace_agent_mesh/cli/commands/init_cmd/webui_gateway_step.py +74 -15
  78. solace_agent_mesh/cli/commands/plugin_cmd/create_cmd.py +0 -2
  79. solace_agent_mesh/cli/commands/run_cmd.py +5 -3
  80. solace_agent_mesh/cli/utils.py +68 -12
  81. solace_agent_mesh/client/webui/frontend/static/assets/authCallback-vY5eu2lI.js +1 -0
  82. solace_agent_mesh/client/webui/frontend/static/assets/client-BeBkzgWW.js +25 -0
  83. solace_agent_mesh/client/webui/frontend/static/assets/main-Bjys1KQs.js +339 -0
  84. solace_agent_mesh/client/webui/frontend/static/assets/main-C03yrETa.css +1 -0
  85. solace_agent_mesh/client/webui/frontend/static/assets/vendor-CE0AeXyK.js +395 -0
  86. solace_agent_mesh/client/webui/frontend/static/auth-callback.html +3 -2
  87. solace_agent_mesh/client/webui/frontend/static/index.html +4 -3
  88. solace_agent_mesh/common/a2a/__init__.py +213 -0
  89. solace_agent_mesh/common/a2a/a2a_llm.txt +182 -0
  90. solace_agent_mesh/common/a2a/artifact.py +328 -0
  91. solace_agent_mesh/common/a2a/events.py +183 -0
  92. solace_agent_mesh/common/a2a/message.py +307 -0
  93. solace_agent_mesh/common/a2a/protocol.py +513 -0
  94. solace_agent_mesh/common/a2a/task.py +127 -0
  95. solace_agent_mesh/common/a2a/translation.py +653 -0
  96. solace_agent_mesh/common/a2a/types.py +54 -0
  97. solace_agent_mesh/common/a2a_spec/a2a.json +2576 -0
  98. solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +407 -0
  99. solace_agent_mesh/common/a2a_spec/schemas/agent_progress_update.json +18 -0
  100. solace_agent_mesh/common/a2a_spec/schemas/artifact_creation_progress.json +31 -0
  101. solace_agent_mesh/common/a2a_spec/schemas/llm_invocation.json +18 -0
  102. solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +235 -0
  103. solace_agent_mesh/common/a2a_spec/schemas/tool_invocation_start.json +26 -0
  104. solace_agent_mesh/common/a2a_spec/schemas/tool_result.json +25 -0
  105. solace_agent_mesh/common/agent_registry.py +1 -1
  106. solace_agent_mesh/common/common_llm.txt +192 -70
  107. solace_agent_mesh/common/data_parts.py +99 -0
  108. solace_agent_mesh/common/middleware/middleware_llm.txt +17 -17
  109. solace_agent_mesh/common/sac/__init__.py +0 -0
  110. solace_agent_mesh/common/sac/sac_llm.txt +71 -0
  111. solace_agent_mesh/common/sac/sam_component_base.py +252 -0
  112. solace_agent_mesh/common/services/providers/providers_llm.txt +51 -84
  113. solace_agent_mesh/common/services/services_llm.txt +206 -26
  114. solace_agent_mesh/common/utils/artifact_utils.py +29 -0
  115. solace_agent_mesh/common/utils/embeds/embeds_llm.txt +176 -80
  116. solace_agent_mesh/common/utils/embeds/resolver.py +1 -0
  117. solace_agent_mesh/common/utils/utils_llm.txt +323 -42
  118. solace_agent_mesh/config_portal/backend/common.py +2 -2
  119. solace_agent_mesh/config_portal/backend/plugin_catalog/constants.py +1 -1
  120. solace_agent_mesh/config_portal/frontend/static/client/assets/_index-bFMKlzKf.js +98 -0
  121. solace_agent_mesh/config_portal/frontend/static/client/assets/{manifest-d845808d.js → manifest-89db7c30.js} +1 -1
  122. solace_agent_mesh/config_portal/frontend/static/client/index.html +1 -1
  123. solace_agent_mesh/core_a2a/core_a2a_llm.txt +10 -8
  124. solace_agent_mesh/core_a2a/service.py +20 -44
  125. solace_agent_mesh/evaluation/message_organizer.py +35 -56
  126. solace_agent_mesh/evaluation/run.py +26 -5
  127. solace_agent_mesh/evaluation/subscriber.py +35 -10
  128. solace_agent_mesh/evaluation/summary_builder.py +27 -34
  129. solace_agent_mesh/gateway/base/app.py +27 -1
  130. solace_agent_mesh/gateway/base/base_llm.txt +177 -72
  131. solace_agent_mesh/gateway/base/component.py +294 -523
  132. solace_agent_mesh/gateway/gateway_llm.txt +299 -58
  133. solace_agent_mesh/gateway/http_sse/ARCHITECTURE_GUIDE.md +676 -0
  134. solace_agent_mesh/gateway/http_sse/alembic/env.py +85 -0
  135. solace_agent_mesh/gateway/http_sse/alembic/script.py.mako +28 -0
  136. solace_agent_mesh/gateway/http_sse/alembic/versions/b1c2d3e4f5g6_add_database_indexes.py +83 -0
  137. solace_agent_mesh/gateway/http_sse/alembic/versions/d5b3f8f2e9a0_create_initial_database.py +58 -0
  138. solace_agent_mesh/gateway/http_sse/alembic.ini +147 -0
  139. solace_agent_mesh/gateway/http_sse/api/__init__.py +11 -0
  140. solace_agent_mesh/gateway/http_sse/api/controllers/__init__.py +9 -0
  141. solace_agent_mesh/gateway/http_sse/api/controllers/session_controller.py +355 -0
  142. solace_agent_mesh/gateway/http_sse/api/controllers/task_controller.py +279 -0
  143. solace_agent_mesh/gateway/http_sse/api/controllers/user_controller.py +35 -0
  144. solace_agent_mesh/gateway/http_sse/api/dto/__init__.py +10 -0
  145. solace_agent_mesh/gateway/http_sse/api/dto/requests/__init__.py +37 -0
  146. solace_agent_mesh/gateway/http_sse/api/dto/requests/session_requests.py +49 -0
  147. solace_agent_mesh/gateway/http_sse/api/dto/requests/task_requests.py +66 -0
  148. solace_agent_mesh/gateway/http_sse/api/dto/responses/__init__.py +43 -0
  149. solace_agent_mesh/gateway/http_sse/api/dto/responses/session_responses.py +68 -0
  150. solace_agent_mesh/gateway/http_sse/api/dto/responses/task_responses.py +74 -0
  151. solace_agent_mesh/gateway/http_sse/app.py +31 -1
  152. solace_agent_mesh/gateway/http_sse/application/__init__.py +3 -0
  153. solace_agent_mesh/gateway/http_sse/application/services/__init__.py +3 -0
  154. solace_agent_mesh/gateway/http_sse/application/services/session_service.py +135 -0
  155. solace_agent_mesh/gateway/http_sse/component.py +371 -236
  156. solace_agent_mesh/gateway/http_sse/components/components_llm.txt +29 -29
  157. solace_agent_mesh/gateway/http_sse/dependencies.py +142 -39
  158. solace_agent_mesh/gateway/http_sse/domain/entities/__init__.py +3 -0
  159. solace_agent_mesh/gateway/http_sse/domain/entities/session.py +90 -0
  160. solace_agent_mesh/gateway/http_sse/domain/repositories/__init__.py +3 -0
  161. solace_agent_mesh/gateway/http_sse/domain/repositories/session_repository.py +54 -0
  162. solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +272 -36
  163. solace_agent_mesh/gateway/http_sse/infrastructure/__init__.py +4 -0
  164. solace_agent_mesh/gateway/http_sse/infrastructure/dependency_injection/__init__.py +3 -0
  165. solace_agent_mesh/gateway/http_sse/infrastructure/dependency_injection/container.py +123 -0
  166. solace_agent_mesh/gateway/http_sse/infrastructure/persistence/__init__.py +4 -0
  167. solace_agent_mesh/gateway/http_sse/infrastructure/persistence/database_persistence_service.py +16 -0
  168. solace_agent_mesh/gateway/http_sse/infrastructure/persistence/database_service.py +119 -0
  169. solace_agent_mesh/gateway/http_sse/infrastructure/persistence/models.py +31 -0
  170. solace_agent_mesh/gateway/http_sse/infrastructure/persistence_service.py +12 -0
  171. solace_agent_mesh/gateway/http_sse/infrastructure/repositories/__init__.py +3 -0
  172. solace_agent_mesh/gateway/http_sse/infrastructure/repositories/session_repository.py +174 -0
  173. solace_agent_mesh/gateway/http_sse/main.py +293 -91
  174. solace_agent_mesh/gateway/http_sse/routers/agents.py +1 -1
  175. solace_agent_mesh/gateway/http_sse/routers/artifacts.py +137 -56
  176. solace_agent_mesh/gateway/http_sse/routers/config.py +3 -1
  177. solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +231 -5
  178. solace_agent_mesh/gateway/http_sse/routers/tasks.py +199 -171
  179. solace_agent_mesh/gateway/http_sse/routers/visualization.py +7 -7
  180. solace_agent_mesh/gateway/http_sse/services/agent_service.py +1 -1
  181. solace_agent_mesh/gateway/http_sse/services/services_llm.txt +89 -135
  182. solace_agent_mesh/gateway/http_sse/services/task_service.py +2 -5
  183. solace_agent_mesh/gateway/http_sse/session_manager.py +64 -30
  184. solace_agent_mesh/gateway/http_sse/shared/__init__.py +9 -0
  185. solace_agent_mesh/gateway/http_sse/shared/auth_utils.py +29 -0
  186. solace_agent_mesh/gateway/http_sse/shared/enums.py +45 -0
  187. solace_agent_mesh/gateway/http_sse/shared/types.py +45 -0
  188. solace_agent_mesh/solace_agent_mesh_llm.txt +362 -0
  189. solace_agent_mesh/templates/gateway_component_template.py +149 -98
  190. solace_agent_mesh/templates/shared_config.yaml +4 -5
  191. solace_agent_mesh/templates/webui.yaml +8 -10
  192. {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/METADATA +9 -6
  193. {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/RECORD +197 -141
  194. solace_agent_mesh/assets/docs/assets/js/f284c35a.731836ad.js +0 -1
  195. solace_agent_mesh/assets/docs/assets/js/main.3d0e7879.js +0 -2
  196. solace_agent_mesh/assets/docs/assets/js/runtime~main.05d19492.js +0 -1
  197. solace_agent_mesh/assets/docs/lunr-index-1757091012487.json +0 -1
  198. solace_agent_mesh/assets/docs/search-doc-1757091012487.json +0 -1
  199. solace_agent_mesh/client/webui/frontend/static/assets/authCallback-BmF2l6vg.js +0 -1
  200. solace_agent_mesh/client/webui/frontend/static/assets/client-D881Dttc.js +0 -49
  201. solace_agent_mesh/client/webui/frontend/static/assets/main-D0FnP_W4.css +0 -1
  202. solace_agent_mesh/client/webui/frontend/static/assets/main-Do32sFPX.js +0 -708
  203. solace_agent_mesh/common/a2a_protocol.py +0 -564
  204. solace_agent_mesh/common/client/__init__.py +0 -4
  205. solace_agent_mesh/common/client/card_resolver.py +0 -21
  206. solace_agent_mesh/common/client/client.py +0 -85
  207. solace_agent_mesh/common/client/client_llm.txt +0 -133
  208. solace_agent_mesh/common/server/__init__.py +0 -4
  209. solace_agent_mesh/common/server/server.py +0 -122
  210. solace_agent_mesh/common/server/server_llm.txt +0 -169
  211. solace_agent_mesh/common/server/task_manager.py +0 -291
  212. solace_agent_mesh/common/server/utils.py +0 -28
  213. solace_agent_mesh/common/types.py +0 -411
  214. solace_agent_mesh/config_portal/frontend/static/client/assets/_index-Bym6YkMd.js +0 -98
  215. solace_agent_mesh/gateway/http_sse/routers/sessions.py +0 -80
  216. solace_agent_mesh/gateway/http_sse/routers/users.py +0 -59
  217. /solace_agent_mesh/assets/docs/assets/js/{main.3d0e7879.js.LICENSE.txt → main.08d30374.js.LICENSE.txt} +0 -0
  218. {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/WHEEL +0 -0
  219. {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/entry_points.txt +0 -0
  220. {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,407 @@
1
+ # DEVELOPER GUIDE: a2a_spec
2
+
3
+ ## Quick Summary
4
+ The `a2a_spec` directory contains the complete Agent-to-Agent (A2A) communication specification for the Solace Agent Mesh. It includes the main JSON schema definition (`a2a.json`) that defines all data structures, request/response types, and error codes for agent communication, plus a `schemas/` subdirectory containing specialized validation schemas for various agent signals and progress updates. Together, these provide a comprehensive framework for validating and implementing compliant agent-to-agent communication.
5
+
6
+ ## Files and Subdirectories Overview
7
+ - **Direct files:**
8
+ - `a2a.json` - Complete JSON Schema specification for A2A protocol including all data types, requests, responses, and error definitions
9
+ - `a2a_spec_llm.txt` - Developer guide documentation for the A2A specification
10
+ - **Subdirectories:**
11
+ - `schemas/` - JSON Schema definitions for agent communication signals (progress updates, tool invocations, LLM calls, artifact creation)
12
+
13
+ ## Developer API Reference
14
+
15
+ ### Direct Files
16
+
17
+ #### a2a.json
18
+ **Purpose:** Complete JSON Schema specification defining the Agent-to-Agent communication protocol
19
+ **Import:** This is a JSON Schema file, typically loaded for validation purposes
20
+
21
+ **Key Schema Definitions:**
22
+ - **AgentCard** - Self-describing manifest for agents with capabilities, skills, and endpoints
23
+ - **Message** - Individual messages in agent conversations with parts (text, files, data)
24
+ - **Task** - Stateful operations/conversations between clients and agents
25
+ - **A2ARequest/A2AResponse** - All supported JSON-RPC request and response types
26
+ - **Security Schemes** - OAuth2, API Key, mTLS, and other authentication methods
27
+ - **Error Types** - Standard JSON-RPC and A2A-specific error definitions
28
+
29
+ **Core Data Structures:**
30
+ ```typescript
31
+ // Agent Card - describes agent capabilities
32
+ AgentCard {
33
+ name: string
34
+ description: string
35
+ url: string
36
+ skills: AgentSkill[]
37
+ capabilities: AgentCapabilities
38
+ security: SecurityRequirement[]
39
+ // ... additional fields
40
+ }
41
+
42
+ // Message - conversation content
43
+ Message {
44
+ messageId: string
45
+ role: "user" | "agent"
46
+ parts: Part[] // TextPart | FilePart | DataPart
47
+ taskId?: string
48
+ contextId?: string
49
+ }
50
+
51
+ // Task - stateful operation
52
+ Task {
53
+ id: string
54
+ contextId: string
55
+ status: TaskStatus
56
+ history?: Message[]
57
+ artifacts?: Artifact[]
58
+ }
59
+ ```
60
+
61
+ #### a2a_spec_llm.txt
62
+ **Purpose:** Developer documentation and usage guide for the A2A specification
63
+ **Import:** Documentation file for reference
64
+
65
+ ### Subdirectory APIs
66
+
67
+ #### schemas/
68
+ **Purpose:** Provides JSON Schema definitions for agent communication signals and progress updates
69
+ **Key Exports:** Schema definitions for progress tracking, tool invocations, LLM calls, and artifact creation
70
+ **Import Examples:**
71
+ ```python
72
+ import json
73
+ from jsonschema import validate
74
+
75
+ # Load and use schemas for validation
76
+ with open('solace_agent_mesh/common/a2a_spec/schemas/agent_progress_update.json') as f:
77
+ progress_schema = json.load(f)
78
+ ```
79
+
80
+ **Available Schemas:**
81
+ - `agent_progress_update.json` - General progress status messages
82
+ - `artifact_creation_progress.json` - File/artifact creation tracking with chunked data
83
+ - `llm_invocation.json` - LLM model invocation signals
84
+ - `tool_invocation_start.json` - Tool execution start notifications
85
+ - `tool_result.json` - Tool execution completion results
86
+
87
+ ## Complete Usage Guide
88
+
89
+ ### 1. Loading and Using the A2A Schema
90
+
91
+ ```python
92
+ import json
93
+ from jsonschema import validate, Draft7Validator
94
+
95
+ # Load the main A2A schema
96
+ with open('solace_agent_mesh/common/a2a_spec/a2a.json') as f:
97
+ a2a_schema = json.load(f)
98
+
99
+ # Create validator for specific types
100
+ def validate_agent_card(card_data):
101
+ """Validate an AgentCard against the schema"""
102
+ card_schema = a2a_schema['definitions']['AgentCard']
103
+ validate(instance=card_data, schema=card_schema)
104
+
105
+ def validate_message(message_data):
106
+ """Validate a Message against the schema"""
107
+ message_schema = a2a_schema['definitions']['Message']
108
+ validate(instance=message_data, schema=message_schema)
109
+
110
+ def validate_request(request_data):
111
+ """Validate an A2A request"""
112
+ request_schema = a2a_schema['definitions']['A2ARequest']
113
+ validate(instance=request_data, schema=request_schema)
114
+ ```
115
+
116
+ ### 2. Creating Valid A2A Data Structures
117
+
118
+ ```python
119
+ # Create a valid Message
120
+ message = {
121
+ "kind": "message",
122
+ "messageId": "msg-123",
123
+ "role": "user",
124
+ "parts": [
125
+ {
126
+ "kind": "text",
127
+ "text": "Hello, can you help me with a task?"
128
+ }
129
+ ]
130
+ }
131
+
132
+ # Create a SendMessage request
133
+ send_request = {
134
+ "jsonrpc": "2.0",
135
+ "id": "req-456",
136
+ "method": "message/send",
137
+ "params": {
138
+ "message": message
139
+ }
140
+ }
141
+
142
+ # Validate the request
143
+ validate_request(send_request)
144
+ ```
145
+
146
+ ### 3. Using Agent Communication Schemas
147
+
148
+ ```python
149
+ import json
150
+ from jsonschema import validate
151
+
152
+ # Load and validate progress update
153
+ with open('solace_agent_mesh/common/a2a_spec/schemas/agent_progress_update.json') as f:
154
+ progress_schema = json.load(f)
155
+
156
+ progress_update = {
157
+ "type": "agent_progress_update",
158
+ "status_text": "Processing your request..."
159
+ }
160
+ validate(instance=progress_update, schema=progress_schema)
161
+
162
+ # Load and validate tool invocation
163
+ with open('solace_agent_mesh/common/a2a_spec/schemas/tool_invocation_start.json') as f:
164
+ tool_schema = json.load(f)
165
+
166
+ tool_invocation = {
167
+ "type": "tool_invocation_start",
168
+ "tool_name": "file_reader",
169
+ "tool_args": {"filepath": "/data/file.txt"},
170
+ "function_call_id": "call_123"
171
+ }
172
+ validate(instance=tool_invocation, schema=tool_schema)
173
+
174
+ # Load and validate tool result
175
+ with open('solace_agent_mesh/common/a2a_spec/schemas/tool_result.json') as f:
176
+ result_schema = json.load(f)
177
+
178
+ tool_result = {
179
+ "type": "tool_result",
180
+ "tool_name": "file_reader",
181
+ "result_data": {"content": "File contents...", "size": 1024},
182
+ "function_call_id": "call_123"
183
+ }
184
+ validate(instance=tool_result, schema=result_schema)
185
+ ```
186
+
187
+ ### 4. Working with Agent Cards
188
+
189
+ ```python
190
+ # Create a complete AgentCard
191
+ agent_card = {
192
+ "name": "Document Processor",
193
+ "description": "Agent that processes and analyzes documents",
194
+ "url": "https://api.example.com/agent",
195
+ "version": "1.0.0",
196
+ "protocolVersion": "0.3.0",
197
+ "capabilities": {
198
+ "streaming": True,
199
+ "pushNotifications": False,
200
+ "stateTransitionHistory": True
201
+ },
202
+ "defaultInputModes": ["text/plain", "application/pdf"],
203
+ "defaultOutputModes": ["text/plain", "application/json"],
204
+ "skills": [
205
+ {
206
+ "id": "document-analysis",
207
+ "name": "Document Analysis",
208
+ "description": "Analyze and extract information from documents",
209
+ "tags": ["document", "analysis", "extraction"]
210
+ }
211
+ ]
212
+ }
213
+
214
+ # Validate the agent card
215
+ validate_agent_card(agent_card)
216
+ ```
217
+
218
+ ### 5. Artifact Creation Progress Tracking
219
+
220
+ ```python
221
+ # Load artifact creation schema
222
+ with open('solace_agent_mesh/common/a2a_spec/schemas/artifact_creation_progress.json') as f:
223
+ artifact_schema = json.load(f)
224
+
225
+ # Track artifact creation with chunked data
226
+ artifact_progress = {
227
+ "type": "artifact_creation_progress",
228
+ "filename": "report.pdf",
229
+ "bytes_saved": 1024,
230
+ "artifact_chunk": "JVBERi0xLjQKJcOkw7zDtsO..." # Base64 encoded chunk
231
+ }
232
+ validate(instance=artifact_progress, schema=artifact_schema)
233
+ ```
234
+
235
+ ### 6. LLM Invocation Tracking
236
+
237
+ ```python
238
+ # Load LLM invocation schema
239
+ with open('solace_agent_mesh/common/a2a_spec/schemas/llm_invocation.json') as f:
240
+ llm_schema = json.load(f)
241
+
242
+ # Track LLM calls
243
+ llm_invocation = {
244
+ "type": "llm_invocation",
245
+ "request": {
246
+ "model": "gpt-4",
247
+ "messages": [{"role": "user", "content": "Analyze this data"}],
248
+ "temperature": 0.7
249
+ }
250
+ }
251
+ validate(instance=llm_invocation, schema=llm_schema)
252
+ ```
253
+
254
+ ### 7. Complete Request/Response Flow with Progress Tracking
255
+
256
+ ```python
257
+ # 1. Create and send a message
258
+ message = {
259
+ "kind": "message",
260
+ "messageId": "msg-001",
261
+ "role": "user",
262
+ "parts": [{"kind": "text", "text": "Analyze this document"}]
263
+ }
264
+
265
+ request = {
266
+ "jsonrpc": "2.0",
267
+ "id": "req-001",
268
+ "method": "message/send",
269
+ "params": {
270
+ "message": message,
271
+ "configuration": {
272
+ "blocking": False,
273
+ "acceptedOutputModes": ["text/plain", "application/json"]
274
+ }
275
+ }
276
+ }
277
+
278
+ # 2. Send progress updates during processing
279
+ def send_progress_update(status_text):
280
+ progress = {
281
+ "type": "agent_progress_update",
282
+ "status_text": status_text
283
+ }
284
+ # Validate and send progress update
285
+ validate(instance=progress, schema=progress_schema)
286
+ return progress
287
+
288
+ # 3. Track tool invocations
289
+ def track_tool_invocation(tool_name, args, call_id):
290
+ invocation = {
291
+ "type": "tool_invocation_start",
292
+ "tool_name": tool_name,
293
+ "tool_args": args,
294
+ "function_call_id": call_id
295
+ }
296
+ validate(instance=invocation, schema=tool_schema)
297
+ return invocation
298
+
299
+ # 4. Track tool results
300
+ def track_tool_result(tool_name, result_data, call_id):
301
+ result = {
302
+ "type": "tool_result",
303
+ "tool_name": tool_name,
304
+ "result_data": result_data,
305
+ "function_call_id": call_id
306
+ }
307
+ validate(instance=result, schema=result_schema)
308
+ return result
309
+ ```
310
+
311
+ ### 8. Comprehensive Schema Validation Utilities
312
+
313
+ ```python
314
+ class A2AValidator:
315
+ """Utility class for A2A schema validation"""
316
+
317
+ def __init__(self, schema_dir='solace_agent_mesh/common/a2a_spec'):
318
+ self.schema_dir = schema_dir
319
+ self.main_schema = self._load_main_schema()
320
+ self.signal_schemas = self._load_signal_schemas()
321
+
322
+ def _load_main_schema(self):
323
+ with open(f'{self.schema_dir}/a2a.json') as f:
324
+ return json.load(f)
325
+
326
+ def _load_signal_schemas(self):
327
+ schemas = {}
328
+ schema_files = [
329
+ 'agent_progress_update.json',
330
+ 'artifact_creation_progress.json',
331
+ 'llm_invocation.json',
332
+ 'tool_invocation_start.json',
333
+ 'tool_result.json'
334
+ ]
335
+ for filename in schema_files:
336
+ with open(f'{self.schema_dir}/schemas/{filename}') as f:
337
+ schema_name = filename.replace('.json', '')
338
+ schemas[schema_name] = json.load(f)
339
+ return schemas
340
+
341
+ def validate_definition(self, data, definition_name):
342
+ """Validate data against a specific A2A definition"""
343
+ schema = self.main_schema['definitions'][definition_name]
344
+ validate(instance=data, schema=schema)
345
+
346
+ def validate_signal(self, data, signal_type):
347
+ """Validate agent communication signal"""
348
+ schema = self.signal_schemas[signal_type]
349
+ validate(instance=data, schema=schema)
350
+
351
+ def validate_a2a_message(self, message_data):
352
+ """Validate a complete A2A message"""
353
+ self.validate_definition(message_data, 'Message')
354
+
355
+ def validate_agent_card(self, card_data):
356
+ """Validate an agent card"""
357
+ self.validate_definition(card_data, 'AgentCard')
358
+
359
+ def validate_task(self, task_data):
360
+ """Validate a task object"""
361
+ self.validate_definition(task_data, 'Task')
362
+
363
+ # Usage example
364
+ validator = A2AValidator()
365
+
366
+ # Validate main A2A objects
367
+ validator.validate_agent_card(agent_card)
368
+ validator.validate_a2a_message(message)
369
+
370
+ # Validate communication signals
371
+ validator.validate_signal(progress_update, 'agent_progress_update')
372
+ validator.validate_signal(tool_invocation, 'tool_invocation_start')
373
+ validator.validate_signal(tool_result, 'tool_result')
374
+ validator.validate_signal(artifact_progress, 'artifact_creation_progress')
375
+ validator.validate_signal(llm_invocation, 'llm_invocation')
376
+ ```
377
+
378
+ ### 9. Error Handling with A2A Error Types
379
+
380
+ ```python
381
+ # Create A2A-specific errors using the schema definitions
382
+ task_not_found_error = {
383
+ "code": -32001,
384
+ "message": "Task not found",
385
+ "data": {"taskId": "task-123"}
386
+ }
387
+
388
+ content_type_error = {
389
+ "code": -32005,
390
+ "message": "Incompatible content types",
391
+ "data": {"requested": "image/png", "supported": ["text/plain", "application/json"]}
392
+ }
393
+
394
+ # Create error response
395
+ error_response = {
396
+ "jsonrpc": "2.0",
397
+ "id": "req-456",
398
+ "error": task_not_found_error
399
+ }
400
+
401
+ # Validate error response
402
+ validator.validate_definition(error_response, 'JSONRPCErrorResponse')
403
+ ```
404
+
405
+ This comprehensive guide shows how to use both the main A2A specification and the specialized signal schemas together to build compliant agent-to-agent communication systems in the Solace Agent Mesh, including progress tracking, tool invocation monitoring, LLM call tracking, and artifact creation progress.
406
+
407
+ # content_hash: f9b143dcd949464f8cf51960be146ae5a87bdd25fd2af5cd93c400925212bb24
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "AgentProgressUpdateData",
4
+ "description": "Schema for the data part of an agent progress update signal.",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "agent_progress_update",
10
+ "description": "The constant type for this data part."
11
+ },
12
+ "status_text": {
13
+ "type": "string",
14
+ "description": "A human-readable progress message (e.g., 'Analyzing the report...')."
15
+ }
16
+ },
17
+ "required": ["type", "status_text"]
18
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "ArtifactCreationProgressData",
4
+ "description": "Schema for the data part of an artifact creation progress signal.",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "artifact_creation_progress",
10
+ "description": "The constant type for this data part."
11
+ },
12
+ "filename": {
13
+ "type": "string",
14
+ "description": "The name of the artifact being created."
15
+ },
16
+ "bytes_saved": {
17
+ "type": "integer",
18
+ "description": "The number of bytes saved so far."
19
+ },
20
+ "artifact_chunk": {
21
+ "type": "string",
22
+ "description": "The chunk of artifact data that was saved in this progress update."
23
+ }
24
+ },
25
+ "required": [
26
+ "type",
27
+ "filename",
28
+ "bytes_saved",
29
+ "artifact_chunk"
30
+ ]
31
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "LlmInvocationData",
4
+ "description": "Schema for the data part of an LLM invocation signal.",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "llm_invocation",
10
+ "description": "The constant type for this data part."
11
+ },
12
+ "request": {
13
+ "type": "object",
14
+ "description": "A sanitized representation of the LlmRequest object sent to the model."
15
+ }
16
+ },
17
+ "required": ["type", "request"]
18
+ }