You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/a2a_protocol.md
+61Lines changed: 61 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -523,6 +523,67 @@ curl -X POST http://localhost:8090/a2a \
523
523
524
524
> **Important:** The `contextId` must be placed inside the `message` object, not at the `params` level. This is required by the A2A protocol specification for the server to correctly identify and continue the conversation.
525
525
526
+
### Message Metadata
527
+
528
+
A2A messages support an optional `metadata` field that can be used to pass additional parameters to control request routing and behavior. The following metadata fields are supported:
529
+
530
+
| Field | Type | Description |
531
+
|-------|------|-------------|
532
+
| `model` | `string` | Specify the LLM model to use for this request (e.g., `"gpt-4"`, `"llama3.1"`) |
533
+
| `provider` | `string` | Specify the LLM provider to use (e.g., `"openai"`, `"watsonx"`) |
534
+
| `vector_store_ids` | `list[string]` | Specify which vector stores to query for RAG. If not provided, all available vector stores are queried |
535
+
536
+
#### Example: Using Metadata
537
+
538
+
```bash
539
+
curl -X POST http://localhost:8090/a2a \
540
+
-H "Authorization: Bearer $TOKEN" \
541
+
-H "Content-Type: application/json" \
542
+
-d '{
543
+
"jsonrpc": "2.0",
544
+
"id": "1",
545
+
"method": "message/send",
546
+
"params": {
547
+
"message": {
548
+
"messageId": "msg-001",
549
+
"role": "user",
550
+
"parts": [
551
+
{"type": "text", "text": "What is a deployment in OpenShift?"}
> **Note:** If `model` and `provider` are not specified in metadata, the default model and provider configured in the service will be used. If `vector_store_ids` is not specified, all available vector stores will be queried for RAG.
0 commit comments