Add Edge to Graph
curl --request POST \
--url https://api.beamstudio.ai/agent-graphs/add-edge \
--header 'Content-Type: application/json' \
--header 'current-workspace-id: <current-workspace-id>' \
--header 'x-api-key: <api-key>' \
--data '
{
"sourceNodeId": "<string>",
"targetNodeId": "<string>",
"agentId": "<string>",
"agentGraphId": "<string>",
"isAttachmentDataPulledIn": true,
"condition": "<string>",
"groups": [
{
"rules": [
{
"sourceAgentToolConfigurationOutputParamsId": "<string>",
"comparisonValue": "<string>",
"comparisonAgentToolConfigurationOutputParamsId": "<string>"
}
]
}
]
}
'import requests
url = "https://api.beamstudio.ai/agent-graphs/add-edge"
payload = {
"sourceNodeId": "<string>",
"targetNodeId": "<string>",
"agentId": "<string>",
"agentGraphId": "<string>",
"isAttachmentDataPulledIn": True,
"condition": "<string>",
"groups": [{ "rules": [
{
"sourceAgentToolConfigurationOutputParamsId": "<string>",
"comparisonValue": "<string>",
"comparisonAgentToolConfigurationOutputParamsId": "<string>"
}
] }]
}
headers = {
"current-workspace-id": "<current-workspace-id>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'current-workspace-id': '<current-workspace-id>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
sourceNodeId: '<string>',
targetNodeId: '<string>',
agentId: '<string>',
agentGraphId: '<string>',
isAttachmentDataPulledIn: true,
condition: '<string>',
groups: [
{
rules: [
{
sourceAgentToolConfigurationOutputParamsId: '<string>',
comparisonValue: '<string>',
comparisonAgentToolConfigurationOutputParamsId: '<string>'
}
]
}
]
})
};
fetch('https://api.beamstudio.ai/agent-graphs/add-edge', 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.beamstudio.ai/agent-graphs/add-edge",
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([
'sourceNodeId' => '<string>',
'targetNodeId' => '<string>',
'agentId' => '<string>',
'agentGraphId' => '<string>',
'isAttachmentDataPulledIn' => true,
'condition' => '<string>',
'groups' => [
[
'rules' => [
[
'sourceAgentToolConfigurationOutputParamsId' => '<string>',
'comparisonValue' => '<string>',
'comparisonAgentToolConfigurationOutputParamsId' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"current-workspace-id: <current-workspace-id>",
"x-api-key: <api-key>"
],
]);
$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.beamstudio.ai/agent-graphs/add-edge"
payload := strings.NewReader("{\n \"sourceNodeId\": \"<string>\",\n \"targetNodeId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"agentGraphId\": \"<string>\",\n \"isAttachmentDataPulledIn\": true,\n \"condition\": \"<string>\",\n \"groups\": [\n {\n \"rules\": [\n {\n \"sourceAgentToolConfigurationOutputParamsId\": \"<string>\",\n \"comparisonValue\": \"<string>\",\n \"comparisonAgentToolConfigurationOutputParamsId\": \"<string>\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("current-workspace-id", "<current-workspace-id>")
req.Header.Add("x-api-key", "<api-key>")
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.beamstudio.ai/agent-graphs/add-edge")
.header("current-workspace-id", "<current-workspace-id>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sourceNodeId\": \"<string>\",\n \"targetNodeId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"agentGraphId\": \"<string>\",\n \"isAttachmentDataPulledIn\": true,\n \"condition\": \"<string>\",\n \"groups\": [\n {\n \"rules\": [\n {\n \"sourceAgentToolConfigurationOutputParamsId\": \"<string>\",\n \"comparisonValue\": \"<string>\",\n \"comparisonAgentToolConfigurationOutputParamsId\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beamstudio.ai/agent-graphs/add-edge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["current-workspace-id"] = '<current-workspace-id>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceNodeId\": \"<string>\",\n \"targetNodeId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"agentGraphId\": \"<string>\",\n \"isAttachmentDataPulledIn\": true,\n \"condition\": \"<string>\",\n \"groups\": [\n {\n \"rules\": [\n {\n \"sourceAgentToolConfigurationOutputParamsId\": \"<string>\",\n \"comparisonValue\": \"<string>\",\n \"comparisonAgentToolConfigurationOutputParamsId\": \"<string>\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"sourceAgentGraphNodeId": "<string>",
"targetAgentGraphNodeId": "<string>",
"isAttachmentDataPulledIn": true,
"conditionGroups": [
{
"agentGraphEdgeId": "<string>",
"edge": "<unknown>",
"rules": [
{
"agentGraphEdgeConditionGroupId": "<string>",
"sourceAgentToolConfigurationOutputParamsId": "<string>",
"group": "<unknown>",
"sourceOutputParam": {
"id": "param-123e4567-e89b-12d3-a456-426614174000",
"agentToolConfigurationId": "config-123e4567-e89b-12d3-a456-426614174000",
"isArray": false,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"paramName": "customerData",
"position": 1,
"paramDescription": "The customer data retrieved from the database.",
"parentId": "<string>",
"paramPath": "response.data.customer",
"outputExample": "{\"name\": \"John Doe\", \"email\": \"john@example.com\"}",
"dataType": "string",
"typeOptions": {}
},
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"comparisonValue": "<string>",
"comparisonAgentToolConfigurationOutputParamsId": "<string>",
"comparisonOutputParam": {
"id": "param-123e4567-e89b-12d3-a456-426614174000",
"agentToolConfigurationId": "config-123e4567-e89b-12d3-a456-426614174000",
"isArray": false,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"paramName": "customerData",
"position": 1,
"paramDescription": "The customer data retrieved from the database.",
"parentId": "<string>",
"paramPath": "response.data.customer",
"outputExample": "{\"name\": \"John Doe\", \"email\": \"john@example.com\"}",
"dataType": "string",
"typeOptions": {}
}
}
],
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"condition": "<string>"
}Agent Graph
Add Edge to Graph
Add a new edge (connection) between two nodes in the agent workflow graph. Edges define the flow of execution between nodes.
POST
/
agent-graphs
/
add-edge
Add Edge to Graph
curl --request POST \
--url https://api.beamstudio.ai/agent-graphs/add-edge \
--header 'Content-Type: application/json' \
--header 'current-workspace-id: <current-workspace-id>' \
--header 'x-api-key: <api-key>' \
--data '
{
"sourceNodeId": "<string>",
"targetNodeId": "<string>",
"agentId": "<string>",
"agentGraphId": "<string>",
"isAttachmentDataPulledIn": true,
"condition": "<string>",
"groups": [
{
"rules": [
{
"sourceAgentToolConfigurationOutputParamsId": "<string>",
"comparisonValue": "<string>",
"comparisonAgentToolConfigurationOutputParamsId": "<string>"
}
]
}
]
}
'import requests
url = "https://api.beamstudio.ai/agent-graphs/add-edge"
payload = {
"sourceNodeId": "<string>",
"targetNodeId": "<string>",
"agentId": "<string>",
"agentGraphId": "<string>",
"isAttachmentDataPulledIn": True,
"condition": "<string>",
"groups": [{ "rules": [
{
"sourceAgentToolConfigurationOutputParamsId": "<string>",
"comparisonValue": "<string>",
"comparisonAgentToolConfigurationOutputParamsId": "<string>"
}
] }]
}
headers = {
"current-workspace-id": "<current-workspace-id>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'current-workspace-id': '<current-workspace-id>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
sourceNodeId: '<string>',
targetNodeId: '<string>',
agentId: '<string>',
agentGraphId: '<string>',
isAttachmentDataPulledIn: true,
condition: '<string>',
groups: [
{
rules: [
{
sourceAgentToolConfigurationOutputParamsId: '<string>',
comparisonValue: '<string>',
comparisonAgentToolConfigurationOutputParamsId: '<string>'
}
]
}
]
})
};
fetch('https://api.beamstudio.ai/agent-graphs/add-edge', 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.beamstudio.ai/agent-graphs/add-edge",
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([
'sourceNodeId' => '<string>',
'targetNodeId' => '<string>',
'agentId' => '<string>',
'agentGraphId' => '<string>',
'isAttachmentDataPulledIn' => true,
'condition' => '<string>',
'groups' => [
[
'rules' => [
[
'sourceAgentToolConfigurationOutputParamsId' => '<string>',
'comparisonValue' => '<string>',
'comparisonAgentToolConfigurationOutputParamsId' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"current-workspace-id: <current-workspace-id>",
"x-api-key: <api-key>"
],
]);
$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.beamstudio.ai/agent-graphs/add-edge"
payload := strings.NewReader("{\n \"sourceNodeId\": \"<string>\",\n \"targetNodeId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"agentGraphId\": \"<string>\",\n \"isAttachmentDataPulledIn\": true,\n \"condition\": \"<string>\",\n \"groups\": [\n {\n \"rules\": [\n {\n \"sourceAgentToolConfigurationOutputParamsId\": \"<string>\",\n \"comparisonValue\": \"<string>\",\n \"comparisonAgentToolConfigurationOutputParamsId\": \"<string>\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("current-workspace-id", "<current-workspace-id>")
req.Header.Add("x-api-key", "<api-key>")
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.beamstudio.ai/agent-graphs/add-edge")
.header("current-workspace-id", "<current-workspace-id>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sourceNodeId\": \"<string>\",\n \"targetNodeId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"agentGraphId\": \"<string>\",\n \"isAttachmentDataPulledIn\": true,\n \"condition\": \"<string>\",\n \"groups\": [\n {\n \"rules\": [\n {\n \"sourceAgentToolConfigurationOutputParamsId\": \"<string>\",\n \"comparisonValue\": \"<string>\",\n \"comparisonAgentToolConfigurationOutputParamsId\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beamstudio.ai/agent-graphs/add-edge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["current-workspace-id"] = '<current-workspace-id>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceNodeId\": \"<string>\",\n \"targetNodeId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"agentGraphId\": \"<string>\",\n \"isAttachmentDataPulledIn\": true,\n \"condition\": \"<string>\",\n \"groups\": [\n {\n \"rules\": [\n {\n \"sourceAgentToolConfigurationOutputParamsId\": \"<string>\",\n \"comparisonValue\": \"<string>\",\n \"comparisonAgentToolConfigurationOutputParamsId\": \"<string>\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"sourceAgentGraphNodeId": "<string>",
"targetAgentGraphNodeId": "<string>",
"isAttachmentDataPulledIn": true,
"conditionGroups": [
{
"agentGraphEdgeId": "<string>",
"edge": "<unknown>",
"rules": [
{
"agentGraphEdgeConditionGroupId": "<string>",
"sourceAgentToolConfigurationOutputParamsId": "<string>",
"group": "<unknown>",
"sourceOutputParam": {
"id": "param-123e4567-e89b-12d3-a456-426614174000",
"agentToolConfigurationId": "config-123e4567-e89b-12d3-a456-426614174000",
"isArray": false,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"paramName": "customerData",
"position": 1,
"paramDescription": "The customer data retrieved from the database.",
"parentId": "<string>",
"paramPath": "response.data.customer",
"outputExample": "{\"name\": \"John Doe\", \"email\": \"john@example.com\"}",
"dataType": "string",
"typeOptions": {}
},
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"comparisonValue": "<string>",
"comparisonAgentToolConfigurationOutputParamsId": "<string>",
"comparisonOutputParam": {
"id": "param-123e4567-e89b-12d3-a456-426614174000",
"agentToolConfigurationId": "config-123e4567-e89b-12d3-a456-426614174000",
"isArray": false,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"paramName": "customerData",
"position": 1,
"paramDescription": "The customer data retrieved from the database.",
"parentId": "<string>",
"paramPath": "response.data.customer",
"outputExample": "{\"name\": \"John Doe\", \"email\": \"john@example.com\"}",
"dataType": "string",
"typeOptions": {}
}
}
],
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"condition": "<string>"
}Authorizations
Headers
Body
application/json
Response
201 - application/json
Edge added successfully
⌘I