Run Message Workflow
curl --request POST \
--url https://api.example.com/a2a/workflows/{id}/v1/message:send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"params": {
"message": {
"messageId": "<string>",
"parts": [
{
"text": "<string>",
"kind": "text",
"metadata": {}
}
],
"contextId": "<string>",
"extensions": [
"<string>"
],
"kind": "message",
"metadata": {},
"referenceTaskIds": [
"<string>"
],
"taskId": "<string>",
"agentId": "<string>"
},
"configuration": {
"acceptedOutputModes": [
"<string>"
],
"blocking": true,
"historyLength": 123,
"pushNotificationConfig": {
"url": "<string>",
"authentication": {
"schemes": [
"<string>"
],
"credentials": "<string>"
},
"id": "<string>",
"token": "<string>"
}
},
"metadata": {}
},
"jsonrpc": "2.0",
"method": "message/send"
}
'import requests
url = "https://api.example.com/a2a/workflows/{id}/v1/message:send"
payload = {
"id": "<string>",
"params": {
"message": {
"messageId": "<string>",
"parts": [
{
"text": "<string>",
"kind": "text",
"metadata": {}
}
],
"contextId": "<string>",
"extensions": ["<string>"],
"kind": "message",
"metadata": {},
"referenceTaskIds": ["<string>"],
"taskId": "<string>",
"agentId": "<string>"
},
"configuration": {
"acceptedOutputModes": ["<string>"],
"blocking": True,
"historyLength": 123,
"pushNotificationConfig": {
"url": "<string>",
"authentication": {
"schemes": ["<string>"],
"credentials": "<string>"
},
"id": "<string>",
"token": "<string>"
}
},
"metadata": {}
},
"jsonrpc": "2.0",
"method": "message/send"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
params: {
message: {
messageId: '<string>',
parts: [{text: '<string>', kind: 'text', metadata: {}}],
contextId: '<string>',
extensions: ['<string>'],
kind: 'message',
metadata: {},
referenceTaskIds: ['<string>'],
taskId: '<string>',
agentId: '<string>'
},
configuration: {
acceptedOutputModes: ['<string>'],
blocking: true,
historyLength: 123,
pushNotificationConfig: {
url: '<string>',
authentication: {schemes: ['<string>'], credentials: '<string>'},
id: '<string>',
token: '<string>'
}
},
metadata: {}
},
jsonrpc: '2.0',
method: 'message/send'
})
};
fetch('https://api.example.com/a2a/workflows/{id}/v1/message:send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/a2a/workflows/{id}/v1/message:send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'params' => [
'message' => [
'messageId' => '<string>',
'parts' => [
[
'text' => '<string>',
'kind' => 'text',
'metadata' => [
]
]
],
'contextId' => '<string>',
'extensions' => [
'<string>'
],
'kind' => 'message',
'metadata' => [
],
'referenceTaskIds' => [
'<string>'
],
'taskId' => '<string>',
'agentId' => '<string>'
],
'configuration' => [
'acceptedOutputModes' => [
'<string>'
],
'blocking' => true,
'historyLength' => 123,
'pushNotificationConfig' => [
'url' => '<string>',
'authentication' => [
'schemes' => [
'<string>'
],
'credentials' => '<string>'
],
'id' => '<string>',
'token' => '<string>'
]
],
'metadata' => [
]
],
'jsonrpc' => '2.0',
'method' => 'message/send'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/a2a/workflows/{id}/v1/message:send"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"params\": {\n \"message\": {\n \"messageId\": \"<string>\",\n \"parts\": [\n {\n \"text\": \"<string>\",\n \"kind\": \"text\",\n \"metadata\": {}\n }\n ],\n \"contextId\": \"<string>\",\n \"extensions\": [\n \"<string>\"\n ],\n \"kind\": \"message\",\n \"metadata\": {},\n \"referenceTaskIds\": [\n \"<string>\"\n ],\n \"taskId\": \"<string>\",\n \"agentId\": \"<string>\"\n },\n \"configuration\": {\n \"acceptedOutputModes\": [\n \"<string>\"\n ],\n \"blocking\": true,\n \"historyLength\": 123,\n \"pushNotificationConfig\": {\n \"url\": \"<string>\",\n \"authentication\": {\n \"schemes\": [\n \"<string>\"\n ],\n \"credentials\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"token\": \"<string>\"\n }\n },\n \"metadata\": {}\n },\n \"jsonrpc\": \"2.0\",\n \"method\": \"message/send\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/a2a/workflows/{id}/v1/message:send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"params\": {\n \"message\": {\n \"messageId\": \"<string>\",\n \"parts\": [\n {\n \"text\": \"<string>\",\n \"kind\": \"text\",\n \"metadata\": {}\n }\n ],\n \"contextId\": \"<string>\",\n \"extensions\": [\n \"<string>\"\n ],\n \"kind\": \"message\",\n \"metadata\": {},\n \"referenceTaskIds\": [\n \"<string>\"\n ],\n \"taskId\": \"<string>\",\n \"agentId\": \"<string>\"\n },\n \"configuration\": {\n \"acceptedOutputModes\": [\n \"<string>\"\n ],\n \"blocking\": true,\n \"historyLength\": 123,\n \"pushNotificationConfig\": {\n \"url\": \"<string>\",\n \"authentication\": {\n \"schemes\": [\n \"<string>\"\n ],\n \"credentials\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"token\": \"<string>\"\n }\n },\n \"metadata\": {}\n },\n \"jsonrpc\": \"2.0\",\n \"method\": \"message/send\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/a2a/workflows/{id}/v1/message:send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"params\": {\n \"message\": {\n \"messageId\": \"<string>\",\n \"parts\": [\n {\n \"text\": \"<string>\",\n \"kind\": \"text\",\n \"metadata\": {}\n }\n ],\n \"contextId\": \"<string>\",\n \"extensions\": [\n \"<string>\"\n ],\n \"kind\": \"message\",\n \"metadata\": {},\n \"referenceTaskIds\": [\n \"<string>\"\n ],\n \"taskId\": \"<string>\",\n \"agentId\": \"<string>\"\n },\n \"configuration\": {\n \"acceptedOutputModes\": [\n \"<string>\"\n ],\n \"blocking\": true,\n \"historyLength\": 123,\n \"pushNotificationConfig\": {\n \"url\": \"<string>\",\n \"authentication\": {\n \"schemes\": [\n \"<string>\"\n ],\n \"credentials\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"token\": \"<string>\"\n }\n },\n \"metadata\": {}\n },\n \"jsonrpc\": \"2.0\",\n \"method\": \"message/send\"\n}"
response = http.request(request)
puts response.read_body{
"id": "request-123",
"jsonrpc": "2.0",
"result": {
"contextId": "context-789",
"id": "task-456",
"kind": "task",
"status": {
"state": "completed"
}
}
}{
"detail": "Unauthenticated access",
"error_code": "UNAUTHENTICATED"
}{
"detail": "Insufficient permissions"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}A2A
Run Message Workflow
Send a message to an Agno Workflow. Anonymous requests can set X-User-ID or params.message.metadata.userId for attribution. Authenticated requests use the identity from the credential.
POST
/
a2a
/
workflows
/
{id}
/
v1
/
message:send
Run Message Workflow
curl --request POST \
--url https://api.example.com/a2a/workflows/{id}/v1/message:send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"params": {
"message": {
"messageId": "<string>",
"parts": [
{
"text": "<string>",
"kind": "text",
"metadata": {}
}
],
"contextId": "<string>",
"extensions": [
"<string>"
],
"kind": "message",
"metadata": {},
"referenceTaskIds": [
"<string>"
],
"taskId": "<string>",
"agentId": "<string>"
},
"configuration": {
"acceptedOutputModes": [
"<string>"
],
"blocking": true,
"historyLength": 123,
"pushNotificationConfig": {
"url": "<string>",
"authentication": {
"schemes": [
"<string>"
],
"credentials": "<string>"
},
"id": "<string>",
"token": "<string>"
}
},
"metadata": {}
},
"jsonrpc": "2.0",
"method": "message/send"
}
'import requests
url = "https://api.example.com/a2a/workflows/{id}/v1/message:send"
payload = {
"id": "<string>",
"params": {
"message": {
"messageId": "<string>",
"parts": [
{
"text": "<string>",
"kind": "text",
"metadata": {}
}
],
"contextId": "<string>",
"extensions": ["<string>"],
"kind": "message",
"metadata": {},
"referenceTaskIds": ["<string>"],
"taskId": "<string>",
"agentId": "<string>"
},
"configuration": {
"acceptedOutputModes": ["<string>"],
"blocking": True,
"historyLength": 123,
"pushNotificationConfig": {
"url": "<string>",
"authentication": {
"schemes": ["<string>"],
"credentials": "<string>"
},
"id": "<string>",
"token": "<string>"
}
},
"metadata": {}
},
"jsonrpc": "2.0",
"method": "message/send"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
params: {
message: {
messageId: '<string>',
parts: [{text: '<string>', kind: 'text', metadata: {}}],
contextId: '<string>',
extensions: ['<string>'],
kind: 'message',
metadata: {},
referenceTaskIds: ['<string>'],
taskId: '<string>',
agentId: '<string>'
},
configuration: {
acceptedOutputModes: ['<string>'],
blocking: true,
historyLength: 123,
pushNotificationConfig: {
url: '<string>',
authentication: {schemes: ['<string>'], credentials: '<string>'},
id: '<string>',
token: '<string>'
}
},
metadata: {}
},
jsonrpc: '2.0',
method: 'message/send'
})
};
fetch('https://api.example.com/a2a/workflows/{id}/v1/message:send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/a2a/workflows/{id}/v1/message:send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'params' => [
'message' => [
'messageId' => '<string>',
'parts' => [
[
'text' => '<string>',
'kind' => 'text',
'metadata' => [
]
]
],
'contextId' => '<string>',
'extensions' => [
'<string>'
],
'kind' => 'message',
'metadata' => [
],
'referenceTaskIds' => [
'<string>'
],
'taskId' => '<string>',
'agentId' => '<string>'
],
'configuration' => [
'acceptedOutputModes' => [
'<string>'
],
'blocking' => true,
'historyLength' => 123,
'pushNotificationConfig' => [
'url' => '<string>',
'authentication' => [
'schemes' => [
'<string>'
],
'credentials' => '<string>'
],
'id' => '<string>',
'token' => '<string>'
]
],
'metadata' => [
]
],
'jsonrpc' => '2.0',
'method' => 'message/send'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/a2a/workflows/{id}/v1/message:send"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"params\": {\n \"message\": {\n \"messageId\": \"<string>\",\n \"parts\": [\n {\n \"text\": \"<string>\",\n \"kind\": \"text\",\n \"metadata\": {}\n }\n ],\n \"contextId\": \"<string>\",\n \"extensions\": [\n \"<string>\"\n ],\n \"kind\": \"message\",\n \"metadata\": {},\n \"referenceTaskIds\": [\n \"<string>\"\n ],\n \"taskId\": \"<string>\",\n \"agentId\": \"<string>\"\n },\n \"configuration\": {\n \"acceptedOutputModes\": [\n \"<string>\"\n ],\n \"blocking\": true,\n \"historyLength\": 123,\n \"pushNotificationConfig\": {\n \"url\": \"<string>\",\n \"authentication\": {\n \"schemes\": [\n \"<string>\"\n ],\n \"credentials\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"token\": \"<string>\"\n }\n },\n \"metadata\": {}\n },\n \"jsonrpc\": \"2.0\",\n \"method\": \"message/send\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/a2a/workflows/{id}/v1/message:send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"params\": {\n \"message\": {\n \"messageId\": \"<string>\",\n \"parts\": [\n {\n \"text\": \"<string>\",\n \"kind\": \"text\",\n \"metadata\": {}\n }\n ],\n \"contextId\": \"<string>\",\n \"extensions\": [\n \"<string>\"\n ],\n \"kind\": \"message\",\n \"metadata\": {},\n \"referenceTaskIds\": [\n \"<string>\"\n ],\n \"taskId\": \"<string>\",\n \"agentId\": \"<string>\"\n },\n \"configuration\": {\n \"acceptedOutputModes\": [\n \"<string>\"\n ],\n \"blocking\": true,\n \"historyLength\": 123,\n \"pushNotificationConfig\": {\n \"url\": \"<string>\",\n \"authentication\": {\n \"schemes\": [\n \"<string>\"\n ],\n \"credentials\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"token\": \"<string>\"\n }\n },\n \"metadata\": {}\n },\n \"jsonrpc\": \"2.0\",\n \"method\": \"message/send\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/a2a/workflows/{id}/v1/message:send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"params\": {\n \"message\": {\n \"messageId\": \"<string>\",\n \"parts\": [\n {\n \"text\": \"<string>\",\n \"kind\": \"text\",\n \"metadata\": {}\n }\n ],\n \"contextId\": \"<string>\",\n \"extensions\": [\n \"<string>\"\n ],\n \"kind\": \"message\",\n \"metadata\": {},\n \"referenceTaskIds\": [\n \"<string>\"\n ],\n \"taskId\": \"<string>\",\n \"agentId\": \"<string>\"\n },\n \"configuration\": {\n \"acceptedOutputModes\": [\n \"<string>\"\n ],\n \"blocking\": true,\n \"historyLength\": 123,\n \"pushNotificationConfig\": {\n \"url\": \"<string>\",\n \"authentication\": {\n \"schemes\": [\n \"<string>\"\n ],\n \"credentials\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"token\": \"<string>\"\n }\n },\n \"metadata\": {}\n },\n \"jsonrpc\": \"2.0\",\n \"method\": \"message/send\"\n}"
response = http.request(request)
puts response.read_body{
"id": "request-123",
"jsonrpc": "2.0",
"result": {
"contextId": "context-789",
"id": "task-456",
"kind": "task",
"status": {
"state": "completed"
}
}
}{
"detail": "Unauthenticated access",
"error_code": "UNAUTHENTICATED"
}{
"detail": "Insufficient permissions"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional user ID for anonymous attribution. Authenticated requests use the identity from the credential.
Path Parameters
Body
application/json
Represents a JSON-RPC request for the message/send method.
Defines the parameters for a request to send a message to an agent. This can be used to create a new task, continue an existing one, or restart a task.
Show child attributes
Show child attributes
Allowed value:
"2.0"Allowed value:
"message/send"Response
Message sent successfully
Was this page helpful?
⌘I