Add an A2A agent
curl --request POST \
--url https://gateway.your-domain.com/v1/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_name": "forceai-echo-agentcore",
"agent_card_params": {
"protocolVersion": "0.3",
"name": "AgentCore Echo",
"description": "Bedrock AgentCore runtime over A2A",
"url": "https://bedrock-agentcore.us-east-1.amazonaws.com/",
"capabilities": {
"streaming": false
},
"defaultInputModes": [
"text"
],
"defaultOutputModes": [
"text"
],
"skills": [
{
"id": "echo",
"name": "Echo",
"description": "echoes text",
"tags": [
"demo"
]
}
]
},
"forceai_params": {
"model": "bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent",
"custom_llm_provider": "bedrock"
}
}
'import requests
url = "https://gateway.your-domain.com/v1/agents"
payload = {
"agent_name": "forceai-echo-agentcore",
"agent_card_params": {
"protocolVersion": "0.3",
"name": "AgentCore Echo",
"description": "Bedrock AgentCore runtime over A2A",
"url": "https://bedrock-agentcore.us-east-1.amazonaws.com/",
"capabilities": { "streaming": False },
"defaultInputModes": ["text"],
"defaultOutputModes": ["text"],
"skills": [
{
"id": "echo",
"name": "Echo",
"description": "echoes text",
"tags": ["demo"]
}
]
},
"forceai_params": {
"model": "bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent",
"custom_llm_provider": "bedrock"
}
}
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({
agent_name: 'forceai-echo-agentcore',
agent_card_params: {
protocolVersion: '0.3',
name: 'AgentCore Echo',
description: 'Bedrock AgentCore runtime over A2A',
url: 'https://bedrock-agentcore.us-east-1.amazonaws.com/',
capabilities: {streaming: false},
defaultInputModes: ['text'],
defaultOutputModes: ['text'],
skills: [{id: 'echo', name: 'Echo', description: 'echoes text', tags: ['demo']}]
},
forceai_params: {
model: 'bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent',
custom_llm_provider: 'bedrock'
}
})
};
fetch('https://gateway.your-domain.com/v1/agents', 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://gateway.your-domain.com/v1/agents",
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([
'agent_name' => 'forceai-echo-agentcore',
'agent_card_params' => [
'protocolVersion' => '0.3',
'name' => 'AgentCore Echo',
'description' => 'Bedrock AgentCore runtime over A2A',
'url' => 'https://bedrock-agentcore.us-east-1.amazonaws.com/',
'capabilities' => [
'streaming' => false
],
'defaultInputModes' => [
'text'
],
'defaultOutputModes' => [
'text'
],
'skills' => [
[
'id' => 'echo',
'name' => 'Echo',
'description' => 'echoes text',
'tags' => [
'demo'
]
]
]
],
'forceai_params' => [
'model' => 'bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent',
'custom_llm_provider' => 'bedrock'
]
]),
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://gateway.your-domain.com/v1/agents"
payload := strings.NewReader("{\n \"agent_name\": \"forceai-echo-agentcore\",\n \"agent_card_params\": {\n \"protocolVersion\": \"0.3\",\n \"name\": \"AgentCore Echo\",\n \"description\": \"Bedrock AgentCore runtime over A2A\",\n \"url\": \"https://bedrock-agentcore.us-east-1.amazonaws.com/\",\n \"capabilities\": {\n \"streaming\": false\n },\n \"defaultInputModes\": [\n \"text\"\n ],\n \"defaultOutputModes\": [\n \"text\"\n ],\n \"skills\": [\n {\n \"id\": \"echo\",\n \"name\": \"Echo\",\n \"description\": \"echoes text\",\n \"tags\": [\n \"demo\"\n ]\n }\n ]\n },\n \"forceai_params\": {\n \"model\": \"bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent\",\n \"custom_llm_provider\": \"bedrock\"\n }\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://gateway.your-domain.com/v1/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_name\": \"forceai-echo-agentcore\",\n \"agent_card_params\": {\n \"protocolVersion\": \"0.3\",\n \"name\": \"AgentCore Echo\",\n \"description\": \"Bedrock AgentCore runtime over A2A\",\n \"url\": \"https://bedrock-agentcore.us-east-1.amazonaws.com/\",\n \"capabilities\": {\n \"streaming\": false\n },\n \"defaultInputModes\": [\n \"text\"\n ],\n \"defaultOutputModes\": [\n \"text\"\n ],\n \"skills\": [\n {\n \"id\": \"echo\",\n \"name\": \"Echo\",\n \"description\": \"echoes text\",\n \"tags\": [\n \"demo\"\n ]\n }\n ]\n },\n \"forceai_params\": {\n \"model\": \"bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent\",\n \"custom_llm_provider\": \"bedrock\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.your-domain.com/v1/agents")
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 \"agent_name\": \"forceai-echo-agentcore\",\n \"agent_card_params\": {\n \"protocolVersion\": \"0.3\",\n \"name\": \"AgentCore Echo\",\n \"description\": \"Bedrock AgentCore runtime over A2A\",\n \"url\": \"https://bedrock-agentcore.us-east-1.amazonaws.com/\",\n \"capabilities\": {\n \"streaming\": false\n },\n \"defaultInputModes\": [\n \"text\"\n ],\n \"defaultOutputModes\": [\n \"text\"\n ],\n \"skills\": [\n {\n \"id\": \"echo\",\n \"name\": \"Echo\",\n \"description\": \"echoes text\",\n \"tags\": [\n \"demo\"\n ]\n }\n ]\n },\n \"forceai_params\": {\n \"model\": \"bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent\",\n \"custom_llm_provider\": \"bedrock\"\n }\n}"
response = http.request(request)
puts response.read_body{
"agent_id": "7e2dbe6d-...",
"agent_name": "forceai-echo-agentcore",
"state": "pending",
"forceai_params": {
"model": "bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent",
"custom_llm_provider": "bedrock"
},
"litellm_params": {
"model": "bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent",
"custom_llm_provider": "bedrock"
}
}{
"error": {
"message": "Authentication Error, No api key passed in."
}
}Agents
Add an A2A agent
Register an external agent (Snowflake Cortex, Bedrock AgentCore, M365 Copilot) over A2A.
POST
/
v1
/
agents
Add an A2A agent
curl --request POST \
--url https://gateway.your-domain.com/v1/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_name": "forceai-echo-agentcore",
"agent_card_params": {
"protocolVersion": "0.3",
"name": "AgentCore Echo",
"description": "Bedrock AgentCore runtime over A2A",
"url": "https://bedrock-agentcore.us-east-1.amazonaws.com/",
"capabilities": {
"streaming": false
},
"defaultInputModes": [
"text"
],
"defaultOutputModes": [
"text"
],
"skills": [
{
"id": "echo",
"name": "Echo",
"description": "echoes text",
"tags": [
"demo"
]
}
]
},
"forceai_params": {
"model": "bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent",
"custom_llm_provider": "bedrock"
}
}
'import requests
url = "https://gateway.your-domain.com/v1/agents"
payload = {
"agent_name": "forceai-echo-agentcore",
"agent_card_params": {
"protocolVersion": "0.3",
"name": "AgentCore Echo",
"description": "Bedrock AgentCore runtime over A2A",
"url": "https://bedrock-agentcore.us-east-1.amazonaws.com/",
"capabilities": { "streaming": False },
"defaultInputModes": ["text"],
"defaultOutputModes": ["text"],
"skills": [
{
"id": "echo",
"name": "Echo",
"description": "echoes text",
"tags": ["demo"]
}
]
},
"forceai_params": {
"model": "bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent",
"custom_llm_provider": "bedrock"
}
}
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({
agent_name: 'forceai-echo-agentcore',
agent_card_params: {
protocolVersion: '0.3',
name: 'AgentCore Echo',
description: 'Bedrock AgentCore runtime over A2A',
url: 'https://bedrock-agentcore.us-east-1.amazonaws.com/',
capabilities: {streaming: false},
defaultInputModes: ['text'],
defaultOutputModes: ['text'],
skills: [{id: 'echo', name: 'Echo', description: 'echoes text', tags: ['demo']}]
},
forceai_params: {
model: 'bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent',
custom_llm_provider: 'bedrock'
}
})
};
fetch('https://gateway.your-domain.com/v1/agents', 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://gateway.your-domain.com/v1/agents",
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([
'agent_name' => 'forceai-echo-agentcore',
'agent_card_params' => [
'protocolVersion' => '0.3',
'name' => 'AgentCore Echo',
'description' => 'Bedrock AgentCore runtime over A2A',
'url' => 'https://bedrock-agentcore.us-east-1.amazonaws.com/',
'capabilities' => [
'streaming' => false
],
'defaultInputModes' => [
'text'
],
'defaultOutputModes' => [
'text'
],
'skills' => [
[
'id' => 'echo',
'name' => 'Echo',
'description' => 'echoes text',
'tags' => [
'demo'
]
]
]
],
'forceai_params' => [
'model' => 'bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent',
'custom_llm_provider' => 'bedrock'
]
]),
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://gateway.your-domain.com/v1/agents"
payload := strings.NewReader("{\n \"agent_name\": \"forceai-echo-agentcore\",\n \"agent_card_params\": {\n \"protocolVersion\": \"0.3\",\n \"name\": \"AgentCore Echo\",\n \"description\": \"Bedrock AgentCore runtime over A2A\",\n \"url\": \"https://bedrock-agentcore.us-east-1.amazonaws.com/\",\n \"capabilities\": {\n \"streaming\": false\n },\n \"defaultInputModes\": [\n \"text\"\n ],\n \"defaultOutputModes\": [\n \"text\"\n ],\n \"skills\": [\n {\n \"id\": \"echo\",\n \"name\": \"Echo\",\n \"description\": \"echoes text\",\n \"tags\": [\n \"demo\"\n ]\n }\n ]\n },\n \"forceai_params\": {\n \"model\": \"bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent\",\n \"custom_llm_provider\": \"bedrock\"\n }\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://gateway.your-domain.com/v1/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_name\": \"forceai-echo-agentcore\",\n \"agent_card_params\": {\n \"protocolVersion\": \"0.3\",\n \"name\": \"AgentCore Echo\",\n \"description\": \"Bedrock AgentCore runtime over A2A\",\n \"url\": \"https://bedrock-agentcore.us-east-1.amazonaws.com/\",\n \"capabilities\": {\n \"streaming\": false\n },\n \"defaultInputModes\": [\n \"text\"\n ],\n \"defaultOutputModes\": [\n \"text\"\n ],\n \"skills\": [\n {\n \"id\": \"echo\",\n \"name\": \"Echo\",\n \"description\": \"echoes text\",\n \"tags\": [\n \"demo\"\n ]\n }\n ]\n },\n \"forceai_params\": {\n \"model\": \"bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent\",\n \"custom_llm_provider\": \"bedrock\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.your-domain.com/v1/agents")
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 \"agent_name\": \"forceai-echo-agentcore\",\n \"agent_card_params\": {\n \"protocolVersion\": \"0.3\",\n \"name\": \"AgentCore Echo\",\n \"description\": \"Bedrock AgentCore runtime over A2A\",\n \"url\": \"https://bedrock-agentcore.us-east-1.amazonaws.com/\",\n \"capabilities\": {\n \"streaming\": false\n },\n \"defaultInputModes\": [\n \"text\"\n ],\n \"defaultOutputModes\": [\n \"text\"\n ],\n \"skills\": [\n {\n \"id\": \"echo\",\n \"name\": \"Echo\",\n \"description\": \"echoes text\",\n \"tags\": [\n \"demo\"\n ]\n }\n ]\n },\n \"forceai_params\": {\n \"model\": \"bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent\",\n \"custom_llm_provider\": \"bedrock\"\n }\n}"
response = http.request(request)
puts response.read_body{
"agent_id": "7e2dbe6d-...",
"agent_name": "forceai-echo-agentcore",
"state": "pending",
"forceai_params": {
"model": "bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent",
"custom_llm_provider": "bedrock"
},
"litellm_params": {
"model": "bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent",
"custom_llm_provider": "bedrock"
}
}{
"error": {
"message": "Authentication Error, No api key passed in."
}
}Authorizations
A ForceAI virtual key or the master key, sent as Authorization: Bearer <key>.
Body
application/json